u
This commit is contained in:
@@ -99,13 +99,13 @@ export function initPwa() {
|
|||||||
|
|
||||||
// Check for new updates periodically (every 30 minutes)
|
// Check for new updates periodically (every 30 minutes)
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
registration.update().catch(() => {});
|
registration.update().catch(() => { });
|
||||||
}, 30 * 60 * 1000);
|
}, 1 * 60 * 1000);
|
||||||
|
|
||||||
// Check for updates when tab or PWA returns to foreground
|
// Check for updates when tab or PWA returns to foreground
|
||||||
document.addEventListener('visibilitychange', () => {
|
document.addEventListener('visibilitychange', () => {
|
||||||
if (document.visibilityState === 'visible') {
|
if (document.visibilityState === 'visible') {
|
||||||
registration.update().catch(() => {});
|
registration.update().catch(() => { });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user