mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: moving notifications
This commit is contained in:
parent
d6e57c20c7
commit
ef036d6f57
17 changed files with 179 additions and 87 deletions
|
@ -48,13 +48,16 @@ export function Downloads() {
|
|||
};
|
||||
|
||||
const result = library.reduce((prev, next) => {
|
||||
if (lastPacket?.game.id === next.id) {
|
||||
return { ...prev, downloading: [...prev.downloading, next] };
|
||||
}
|
||||
/* Game has been manually added to the library */
|
||||
if (!next.status) return prev;
|
||||
|
||||
if (next.downloadQueue || next.status === "paused") {
|
||||
/* Is downloading */
|
||||
if (lastPacket?.game.id === next.id)
|
||||
return { ...prev, downloading: [...prev.downloading, next] };
|
||||
|
||||
/* Is either queued or paused */
|
||||
if (next.downloadQueue || next.status === "paused")
|
||||
return { ...prev, queued: [...prev.queued, next] };
|
||||
}
|
||||
|
||||
return { ...prev, complete: [...prev.complete, next] };
|
||||
}, initialValue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue