From 9fef149f9c2185c191d1b856d7939449ccc4f1d0 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 9 Apr 2021 11:30:20 -0700 Subject: Added boolean for user connection status --- src/store/actions/user.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/store/actions') diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts index 3ebd4190..0ed57fe6 100644 --- a/src/store/actions/user.ts +++ b/src/store/actions/user.ts @@ -11,6 +11,7 @@ import {getTokenOrLogout} from '../../utils'; import { clearHeaderAndProfileImages, profileCompletionStageUpdated, + setChatClientReady, setIsOnboardedUser, setNewNotificationReceived, setNewVersionAvailable, @@ -233,3 +234,18 @@ export const suggestedPeopleAnimatedTutorialFinished = ( console.log('Error while updating suggested people linked state: ', error); } }; + +export const updateChatClientReady = ( + chatClientReady: boolean, +): ThunkAction, RootState, unknown, Action> => async ( + dispatch, +) => { + try { + dispatch({ + type: setChatClientReady.type, + payload: {chatClientReady}, + }); + } catch (error) { + console.log(error); + } +}; -- cgit v1.2.3-70-g09d2