Skip to content

Commit

Permalink
[MM-11798] Change landingPageSeen flag to localStorage (mattermost#1641)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudheerDev authored and saturninoabril committed Aug 30, 2018
1 parent 9acfd9d commit df67748
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion actions/global_actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export function emitUserLoggedOutEvent(redirectTo = '/', shouldSignalLogout = tr
}

export function clientLogout(redirectTo = '/') {
BrowserStore.clear({exclude: [Constants.RECENT_EMOJI_KEY, '__landingPageSeen__', 'selected_teams']});
BrowserStore.clear({exclude: [Constants.RECENT_EMOJI_KEY, 'selected_teams']});
ErrorStore.clearLastError();
ChannelStore.clear();
stopPeriodicStatusUpdates();
Expand Down
4 changes: 2 additions & 2 deletions stores/browser_store.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ class BrowserStoreClass {
}

hasSeenLandingPage() {
return this.getItem('__landingPageSeen__', false);
return localStorage.getItem(StoragePrefixes.LANDING_PAGE_SEEN);
}

setLandingPageSeen(landingPageSeen) {
return this.setItem('__landingPageSeen__', landingPageSeen);
localStorage.setItem(StoragePrefixes.LANDING_PAGE_SEEN, landingPageSeen);
}
}

Expand Down
1 change: 1 addition & 0 deletions utils/constants.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ export const StoragePrefixes = {
LOGOUT: '__logout__',
LOGIN: '__login__',
ANNOUNCEMENT: '__announcement__',
LANDING_PAGE_SEEN: '__landingPageSeen__',
};

export const ErrorPageTypes = {
Expand Down

0 comments on commit df67748

Please sign in to comment.