mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -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('online', updateOnlineStatus, false);
|
||||
window.addEventListener('beforeunload', resetBadgeCount, false);
|
||||
|
||||
updateOnlineStatus();
|
||||
}
|
Loading…
Reference in New Issue
Block a user