mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-10-12 08:14:49 -05:00
Electron-262
Implemented a method to reset badge count on window navigation/reload
This commit is contained in:
1 parent
d49cffb185
commit
a3af9abdf9
1 file changed
+9
@@ -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();
|
||||
}
|
||||
Reference in new issue
Block a user