mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-01-03 12:47:13 -06:00
Electron-262
Implemented a method to reset badge count on window navigation/reload
This commit is contained in:
parent
d49cffb185
commit
a3af9abdf9
@ -367,8 +367,17 @@ function createAPI() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reset the badge count when ever user refresh
|
||||||
|
function resetBadgeCount() {
|
||||||
|
local.ipcRenderer.send(apiName, {
|
||||||
|
cmd: apiCmds.setBadgeCount,
|
||||||
|
count: 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
window.addEventListener('offline', updateOnlineStatus, false);
|
window.addEventListener('offline', updateOnlineStatus, false);
|
||||||
window.addEventListener('online', updateOnlineStatus, false);
|
window.addEventListener('online', updateOnlineStatus, false);
|
||||||
|
window.addEventListener('beforeunload', resetBadgeCount, false);
|
||||||
|
|
||||||
updateOnlineStatus();
|
updateOnlineStatus();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user