summaryrefslogtreecommitdiffstats
path: root/webapp/components/logged_in.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-01-06 08:54:02 -0500
committerJoram Wilander <jwawilander@gmail.com>2017-01-06 08:54:02 -0500
commitc81efa0b4e11fc1d86c6b16efd8670cf29756d81 (patch)
tree9354843434967f0fccdae99697dd112544a65b27 /webapp/components/logged_in.jsx
parent858ce02fc83832d7b5b994320115f62d50784fdc (diff)
downloadchat-c81efa0b4e11fc1d86c6b16efd8670cf29756d81.tar.gz
chat-c81efa0b4e11fc1d86c6b16efd8670cf29756d81.tar.bz2
chat-c81efa0b4e11fc1d86c6b16efd8670cf29756d81.zip
PLT-4758 fixing signaling of logout (#4984)
Diffstat (limited to 'webapp/components/logged_in.jsx')
-rw-r--r--webapp/components/logged_in.jsx25
1 files changed, 0 insertions, 25 deletions
diff --git a/webapp/components/logged_in.jsx b/webapp/components/logged_in.jsx
index 841061d48..9282e74ca 100644
--- a/webapp/components/logged_in.jsx
+++ b/webapp/components/logged_in.jsx
@@ -4,7 +4,6 @@
import LoadingScreen from 'components/loading_screen.jsx';
import UserStore from 'stores/user_store.jsx';
-import BrowserStore from 'stores/browser_store.jsx';
import PreferenceStore from 'stores/preference_store.jsx';
import * as GlobalActions from 'actions/global_actions.jsx';
@@ -29,30 +28,6 @@ export default class LoggedIn extends React.Component {
this.onUserChanged = this.onUserChanged.bind(this);
this.setupUser = this.setupUser.bind(this);
- // Force logout of all tabs if one tab is logged out
- $(window).bind('storage', (e) => {
- // when one tab on a browser logs out, it sets __logout__ in localStorage to trigger other tabs to log out
- if (e.originalEvent.key === '__logout__' && e.originalEvent.storageArea === localStorage && e.originalEvent.newValue) {
- // make sure it isn't this tab that is sending the logout signal (only necessary for IE11)
- if (BrowserStore.isSignallingLogout(e.originalEvent.newValue)) {
- return;
- }
-
- console.log('detected logout from a different tab'); //eslint-disable-line no-console
- GlobalActions.emitUserLoggedOutEvent('/', false);
- }
-
- if (e.originalEvent.key === '__login__' && e.originalEvent.storageArea === localStorage && e.originalEvent.newValue) {
- // make sure it isn't this tab that is sending the logout signal (only necessary for IE11)
- if (BrowserStore.isSignallingLogin(e.originalEvent.newValue)) {
- return;
- }
-
- console.log('detected login from a different tab'); //eslint-disable-line no-console
- location.reload();
- }
- });
-
// Because current CSS requires the root tag to have specific stuff
$('#root').attr('class', 'channel-view');