mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: dont set game as removed when deleting instalation folder
This commit is contained in:
parent
d6e57c20c7
commit
7ac7d92a28
5 changed files with 60 additions and 49 deletions
|
@ -47,17 +47,21 @@ export function Downloads() {
|
|||
complete: [],
|
||||
};
|
||||
|
||||
const result = library.reduce((prev, next) => {
|
||||
if (lastPacket?.game.id === next.id) {
|
||||
return { ...prev, downloading: [...prev.downloading, next] };
|
||||
}
|
||||
const result = library
|
||||
.filter((game) => {
|
||||
return game.downloadPath;
|
||||
})
|
||||
.reduce((prev, next) => {
|
||||
if (lastPacket?.game.id === next.id) {
|
||||
return { ...prev, downloading: [...prev.downloading, next] };
|
||||
}
|
||||
|
||||
if (next.downloadQueue || next.status === "paused") {
|
||||
return { ...prev, queued: [...prev.queued, next] };
|
||||
}
|
||||
if (next.downloadQueue || next.status === "paused") {
|
||||
return { ...prev, queued: [...prev.queued, next] };
|
||||
}
|
||||
|
||||
return { ...prev, complete: [...prev.complete, next] };
|
||||
}, initialValue);
|
||||
return { ...prev, complete: [...prev.complete, next] };
|
||||
}, initialValue);
|
||||
|
||||
const queued = orderBy(
|
||||
result.queued,
|
||||
|
@ -66,7 +70,7 @@ export function Downloads() {
|
|||
);
|
||||
|
||||
const complete = orderBy(result.complete, (game) =>
|
||||
game.status === "complete" ? 0 : 1
|
||||
game.progress === 1 ? 0 : 1
|
||||
);
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue