File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import { sdk } from '../../../app/utils/client/lib/SDKClient';
55import { t } from '../../../app/utils/lib/i18n' ;
66import { PublicSettingsCachedStore , SubscriptionsCachedStore } from '../../cachedStores' ;
77import { dispatchToastMessage } from '../../lib/toast' ;
8- import { userIdStore } from '../../lib/user' ;
8+ import { getUserId , userIdStore } from '../../lib/user' ;
99import { useUserDataSyncReady } from '../../lib/userData' ;
1010
1111const whenMainReady = ( ) : Promise < void > => {
1212 const isMainReady = ( ) : boolean => {
13- const uid = userIdStore . getState ( ) ;
13+ const uid = getUserId ( ) ;
1414 if ( ! uid ) return true ;
1515
1616 const subscriptionsReady = SubscriptionsCachedStore . useReady . getState ( ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import { useIdleConnection } from '../../hooks/useIdleConnection';
2424import type { IDocumentMapStore } from '../../lib/cachedStores/DocumentMapStore' ;
2525import { applyQueryOptions } from '../../lib/cachedStores/applyQueryOptions' ;
2626import { createReactiveSubscriptionFactory } from '../../lib/createReactiveSubscriptionFactory' ;
27- import { userIdStore } from '../../lib/user' ;
27+ import { getUser , userIdStore } from '../../lib/user' ;
2828import { Users , Rooms , Subscriptions } from '../../stores' ;
2929import { useSamlInviteToken } from '../../views/invite/hooks/useSamlInviteToken' ;
3030
@@ -36,9 +36,7 @@ const ee = new Emitter();
3636Accounts . onLogout ( ( ) => ee . emit ( 'logout' ) ) ;
3737
3838ee . on ( 'logout' , async ( ) => {
39- const userId = userIdStore . getState ( ) ;
40- if ( ! userId ) return ;
41- const user = Users . state . get ( userId ) ;
39+ const user = getUser ( ) ;
4240 if ( ! user ) return ;
4341
4442 await afterLogoutCleanUpCallback . run ( user ) ;
You can’t perform that action at this time.
0 commit comments