aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/actions')
-rw-r--r--src/store/actions/user.ts27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index 50f810e4..9f1855ce 100644
--- a/src/store/actions/user.ts
+++ b/src/store/actions/user.ts
@@ -8,17 +8,23 @@ import {
editSPSwipeTutorial,
} from '../../services';
import {Action, ThunkAction} from '@reduxjs/toolkit';
+import {loadAvatar, loadCover, loadProfileInfo} from '../../services';
+import {UserType} from '../../types/types';
+import {getTokenOrLogout} from '../../utils';
import {
- userLoggedIn,
- userDetailsFetched,
- socialEdited,
profileCompletionStageUpdated,
setIsOnboardedUser,
setNewNotificationReceived,
+ setNewVersionAvailable,
setReplyPosted,
+ socialEdited,
+ userDetailsFetched,
+ userLoggedIn,
} from '../reducers';
import {getTokenOrLogout} from '../../utils';
import {spSwipeTutorialUpdated} from '../reducers/userReducer';
+import {RootState} from '../rootReducer';
+import {CommentThreadType} from './../../types/types';
/**
* Entry point to our store.
@@ -104,6 +110,21 @@ export const updateIsOnboardedUser = (
}
};
+export const updateNewVersionAvailable = (
+ newVersionAvailable: boolean,
+): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async (
+ dispatch,
+) => {
+ try {
+ dispatch({
+ type: setNewVersionAvailable.type,
+ payload: {newVersionAvailable},
+ });
+ } catch (error) {
+ console.log(error);
+ }
+};
+
export const updateNewNotificationReceived = (
newNotificationReceived: boolean,
): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async (