aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-06-21 15:45:07 +0100
committerLibravatar GitHub <noreply@github.com>2022-06-21 15:45:07 +0100
commitf81687b03a87a88988d4cce8110d015b046a7436 (patch)
treedcb4f5012979e0184b1c40e6095ca13a56a3eecc /src/stores
parentTurn off the progressbar by default (diff)
downloadferdium-app-f81687b03a87a88988d4cce8110d015b046a7436.tar.gz
ferdium-app-f81687b03a87a88988d4cce8110d015b046a7436.tar.zst
ferdium-app-f81687b03a87a88988d4cce8110d015b046a7436.zip
Fix reload after resume and add idle time setting (#324)
* Fix reload after resume issue * Add idle time option
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/AppStore.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 2d85b9ffe..a8e1ce247 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -232,9 +232,11 @@ export default class AppStore extends Store {
232 debug('System resumed, last suspended on', this.timeSuspensionStart); 232 debug('System resumed, last suspended on', this.timeSuspensionStart);
233 this.actions.service.resetLastPollTimer(); 233 this.actions.service.resetLastPollTimer();
234 234
235 const idleTime = this.stores.settings.app.reloadAfterResumeTime;
236
235 if ( 237 if (
236 this.timeSuspensionStart.add(10, 'm').isBefore(moment()) && 238 this.timeSuspensionStart.add(idleTime, 'm').isBefore(moment()) &&
237 this.stores.settings.app.get('reloadAfterResume') 239 this.stores.settings.app.reloadAfterResume
238 ) { 240 ) {
239 debug('Reloading services, user info and features'); 241 debug('Reloading services, user info and features');
240 242