summaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
index 69fcf1a..e5bb0ab 100644
--- a/src/app.js
+++ b/src/app.js
@@ -2051,6 +2051,12 @@ function onAppVisible() {
const awayAt = _awayAt(); _clearAwayAt();
if (awayAt) evaluateOverdue(Date.now() - awayAt);
armUnlockDeadline(); // background tabs throttle timers — recheck on return
+ // A phone freezes a backgrounded tab: timers stop, relay sockets are cut,
+ // and nothing that happened while you were away ever arrives. Features that
+ // hold live connections get told how long the app was gone so they can
+ // catch up rather than sit on a dead subscription.
+ const away = awayAt ? Date.now() - awayAt : 0;
+ for (const f of FEATURES) { try { f.resumed && f.resumed(away); } catch {} }
}
// At boot the in-memory timer is gone (reload / discarded tab). Drop overdue