Skip to content

Commit

Permalink
fix(electron): don't send idle time all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Jan 27, 2019
1 parent 1e0bc39 commit dc164a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions electron/CONFIG.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const CONFIG = {
D_BUS_ID: 'com.super.productivity.service',
IDLE_PING_INTERVAL: 5000,
MIN_IDLE_TIME: 15000,
};
2 changes: 1 addition & 1 deletion electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit dc164a9

Please sign in to comment.