call user/signout on signout

fixes sync issues for users with multiple accounts signed in to multiple tabs
This commit is contained in:
Sean Yesmunt 2021-01-11 14:19:54 -05:00
parent 4f1bd23442
commit 148fa4f4cd

View file

@ -22,6 +22,7 @@ import {
DAEMON_SETTINGS,
SETTINGS,
} from 'lbry-redux';
import { Lbryio } from 'lbryinc';
import { selectFollowedTagsList } from 'redux/selectors/tags';
import { doToast, doError, doNotificationList } from 'redux/actions/notifications';
@ -554,8 +555,9 @@ export function doSignIn() {
}
export function doSignOut() {
return dispatch => {
doSignOutCleanup()
return () => {
Lbryio.call('user', 'signout')
.then(doSignOutCleanup)
.then(() => {
// @if TARGET='web'
window.persistor.purge();