mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-22 18:30:09 +00:00
fix(electron): don't send idle time all the time
This commit is contained in:
parent
1e0bc39c78
commit
dc164a9258
2 changed files with 2 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
export const CONFIG = {
|
||||
D_BUS_ID: 'com.super.productivity.service',
|
||||
IDLE_PING_INTERVAL: 5000,
|
||||
MIN_IDLE_TIME: 15000,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue