Skip to content

Commit a2aae55

Browse files
committed
Remove service reload on app-resume
1 parent b2d5315 commit a2aae55

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/stores/AppStore.js

-21
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const debug = require('debug')('Franz:AppStore');
3030
const {
3131
app,
3232
screen,
33-
powerMonitor,
3433
nativeTheme,
3534
} = remote;
3635

@@ -199,26 +198,6 @@ export default class AppStore extends Store {
199198
gaPage(pathname);
200199
});
201200

202-
powerMonitor.on('suspend', () => {
203-
debug('System suspended starting timer');
204-
205-
this.timeSuspensionStart = moment();
206-
});
207-
208-
powerMonitor.on('resume', () => {
209-
debug('System resumed, last suspended on', this.timeSuspensionStart.toString());
210-
211-
if (this.timeSuspensionStart.add(10, 'm').isBefore(moment())) {
212-
debug('Reloading services, user info and features');
213-
214-
setTimeout(() => {
215-
window.location.reload();
216-
}, ms('2s'));
217-
218-
statsEvent('resumed-app');
219-
}
220-
});
221-
222201
// macOS catalina notifications hack
223202
// notifications got stuck after upgrade but forcing a notification
224203
// via `new Notification` triggered the permission request

0 commit comments

Comments
 (0)