Don't refresh when '_legacy' changes
This commit is contained in:
parent
c7c0c41ce6
commit
41c7612b47
|
@ -143,10 +143,14 @@ const reload = state => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// `me` is a user ID string
|
||||||
|
const validMe = state => {
|
||||||
|
const me = state.get('me');
|
||||||
|
return typeof me === 'string' && me !== '_legacy';
|
||||||
|
};
|
||||||
|
|
||||||
// `me` has changed from one valid ID to another
|
// `me` has changed from one valid ID to another
|
||||||
const userSwitched = (oldState, state) => {
|
const userSwitched = (oldState, state) => {
|
||||||
const validMe = state => typeof state.get('me') === 'string';
|
|
||||||
|
|
||||||
const stillValid = validMe(oldState) && validMe(state);
|
const stillValid = validMe(oldState) && validMe(state);
|
||||||
const didChange = oldState.get('me') !== state.get('me');
|
const didChange = oldState.get('me') !== state.get('me');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue