Close popup & notify on download finish

This commit is contained in:
Lncvrt committed 2026-03-27 12:45:29 -07:00
1 parent df522122ac
commit 57441a8872
1 file changed
+26
+26
View File
@@ -692,6 +692,32 @@ export default function RootLayout ({
})()
}, [serverVersionList, downloadedVersionsConfig, downloadVersions])
useEffect(() => {
if (
downloadProgress.length === 0 &&
downloadQueue.length === 0 &&
showPopup &&
popupMode === 1
) {
setTimeout(async () => {
if (notificationsAllowed) {
await notifyUser('Downloads Complete', 'All downloads finished!')
}
await getCurrentWindow().requestUserAttention(
UserAttentionType.Informational
)
closePopup()
}, 0)
}
}, [
downloadProgress,
downloadQueue,
showPopup,
popupMode,
closePopup,
notificationsAllowed
])
useEffect(() => {
if (!settings) return
const unlisteners: Promise<() => void>[] = []