[MM-38524] Rework the closing and opening tab logic, fixed login issue (#1735)
* Rework the closing and opening tab logic to better suit adding and removing servers * A couple more fixes * Lint fix * [MM-38524] Fix login issue * Remove unneeded code
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
USER_ACTIVITY_UPDATE,
|
||||
CLOSE_TEAMS_DROPDOWN,
|
||||
BROWSER_HISTORY_PUSH,
|
||||
APP_LOGGED_IN,
|
||||
} from 'common/communication';
|
||||
|
||||
const UNREAD_COUNT_INTERVAL = 1000;
|
||||
@@ -242,4 +243,10 @@ ipcRenderer.on(BROWSER_HISTORY_PUSH, (event, pathName) => {
|
||||
);
|
||||
});
|
||||
|
||||
window.addEventListener('storage', (e) => {
|
||||
if (e.key === '__login__' && e.storageArea === localStorage && e.newValue) {
|
||||
ipcRenderer.send(APP_LOGGED_IN, viewName);
|
||||
}
|
||||
});
|
||||
|
||||
/* eslint-enable no-magic-numbers */
|
||||
|
Reference in New Issue
Block a user