Only reload with SWITCH_ACCOUNT (for now)

This commit is contained in:
Alex Gleason
2021-03-24 16:24:46 -05:00
parent ee9b4cb969
commit b4cab46553

View File

@ -120,8 +120,7 @@ export default function auth(oldState = initialState, action) {
const state = reducer(oldState, action);
localStorage.setItem('soapbox:auth', JSON.stringify(state.toJS()));
// Reload the page when the current user changes.
if (state.get('me') !== oldState.get('me')) {
if (action.type === SWITCH_ACCOUNT) {
location.reload();
}