Update prompt: ask after at most 45 s instead of waiting up to 8 min for the background download
This commit is contained in:
@@ -8819,9 +8819,10 @@ async function maybeShowUpdateBanner() {
|
|||||||
prefetchUpdate();
|
prefetchUpdate();
|
||||||
// Ask only once the new build is fully on disk, so "Refresh UI" is an
|
// Ask only once the new build is fully on disk, so "Refresh UI" is an
|
||||||
// instant swap. Until then keep downloading quietly and re-check; if the
|
// instant swap. Until then keep downloading quietly and re-check; if the
|
||||||
// download never completes (8 min) ask anyway — Refresh UI then downloads.
|
// download hasn't completed within 45 s, ask anyway (Update now then
|
||||||
|
// downloads): on a slow link a longer wait looked like no update at all.
|
||||||
_updateSeenAt = _updateSeenAt || Date.now();
|
_updateSeenAt = _updateSeenAt || Date.now();
|
||||||
if (!(await updateDownloaded()) && Date.now() - _updateSeenAt < 8 * 60 * 1000) {
|
if (!(await updateDownloaded()) && Date.now() - _updateSeenAt < 45 * 1000) {
|
||||||
setTimeout(maybeShowUpdateBanner, 15000);
|
setTimeout(maybeShowUpdateBanner, 15000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user