diff options
| author | Shravya Ramesh <shravs1208@gmail.com> | 2021-04-09 11:30:20 -0700 |
|---|---|---|
| committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-04-09 11:30:20 -0700 |
| commit | 9fef149f9c2185c191d1b856d7939449ccc4f1d0 (patch) | |
| tree | 77fd36601c857cdff5be7fb9cc69aa3d5c38a3c5 /src/store/actions | |
| parent | 0a09c73cabc656b85465102b8e266e1a0cc1fdf2 (diff) | |
Added boolean for user connection status
Diffstat (limited to 'src/store/actions')
| -rw-r--r-- | src/store/actions/user.ts | 16 |
1 files changed, 16 insertions, 0 deletions
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<Promise<void>, RootState, unknown, Action<string>> => async ( + dispatch, +) => { + try { + dispatch({ + type: setChatClientReady.type, + payload: {chatClientReady}, + }); + } catch (error) { + console.log(error); + } +}; |
