feat: moving notifications

This commit is contained in:
Chubby Granny Chaser 2024-06-05 14:18:40 +01:00
parent d6e57c20c7
commit ef036d6f57
No known key found for this signature in database
17 changed files with 179 additions and 87 deletions

View file

@ -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);