Skip to content
Permalink
Browse files
Remove service reload on app-resume
  • Loading branch information
adlk committed Mar 30, 2020
1 parent b2d5315 commit a2aae55b7a947029b69be9b806764cdbe542d274
Showing 1 changed file with 0 additions and 21 deletions.
@@ -30,7 +30,6 @@ const debug = require('debug')('Franz:AppStore');
const {
app,
screen,
powerMonitor,
nativeTheme,
} = remote;

@@ -199,26 +198,6 @@ export default class AppStore extends Store {
gaPage(pathname);
});
powerMonitor.on('suspend', () => {
debug('System suspended starting timer');
this.timeSuspensionStart = moment();
});
powerMonitor.on('resume', () => {
debug('System resumed, last suspended on', this.timeSuspensionStart.toString());
if (this.timeSuspensionStart.add(10, 'm').isBefore(moment())) {
debug('Reloading services, user info and features');
setTimeout(() => {
window.location.reload();
}, ms('2s'));
statsEvent('resumed-app');
}
});
// macOS catalina notifications hack
// notifications got stuck after upgrade but forcing a notification
// via `new Notification` triggered the permission request

0 comments on commit a2aae55

Please sign in to comment.