fix(downloads): preserve live progress across lifecycle edges

This commit is contained in:
NimBold
2026-07-15 20:50:46 +03:30
parent 1d197432b2
commit 6e6ae51395
9 changed files with 150 additions and 23 deletions
+2
View File
@@ -762,12 +762,14 @@ function App() {
};
window.addEventListener('focus', handleForegroundChange);
window.addEventListener('blur', handleForegroundChange);
document.addEventListener('visibilitychange', handleForegroundChange);
handleForegroundChange();
return () => {
active = false;
window.removeEventListener('focus', handleForegroundChange);
window.removeEventListener('blur', handleForegroundChange);
document.removeEventListener('visibilitychange', handleForegroundChange);
};
}, [autoAddClipboardLinks, coreReady]);