fix(electron): don't send idle time all the time

This commit is contained in:
Johannes Millan 2019-01-27 20:52:11 +01:00
parent 1e0bc39c78
commit dc164a9258
2 changed files with 2 additions and 1 deletions

View file

@ -1,4 +1,5 @@
export const CONFIG = {
D_BUS_ID: 'com.super.productivity.service',
IDLE_PING_INTERVAL: 5000,
MIN_IDLE_TIME: 15000,
};

View file

@ -258,7 +258,7 @@ function idleChecker() {
// don't update if the user is about to close
// tslint:disable-next-line
if (!app_.isQuiting) {
if (!app_.isQuiting && idleTime > CONFIG.MIN_IDLE_TIME) {
mainWin.webContents.send(IPC_IDLE_TIME, idleTime);
}
});