aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2021-02-23 17:02:53 -0500
committerGitHub <noreply@github.com>2021-02-23 17:02:53 -0500
commit5864b997b68ae774a871ee9b43c0e548a2656cc6 (patch)
tree5cbc4145437c0c498903a61b21bef0b4f523c1f8 /src/store/actions
parent21c03cb2a56e211909c08e8354441286bfc590ac (diff)
parent3978bd82db12a4606ebb9a60c15352fb14ee0055 (diff)
Merge pull request #261 from IvanIFChen/hotfix-sp-people-state
[HOTFIX] Fixed SP state inconsistencies
Diffstat (limited to 'src/store/actions')
-rw-r--r--src/store/actions/user.ts16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index 3511dcf3..a9f9d945 100644
--- a/src/store/actions/user.ts
+++ b/src/store/actions/user.ts
@@ -13,6 +13,7 @@ import {
setNewNotificationReceived,
setNewVersionAvailable,
setReplyPosted,
+ setSuggestedPeopleImage,
setSuggestedPeopleLinked,
socialEdited,
userDetailsFetched,
@@ -163,13 +164,16 @@ export const logout = (): ThunkAction<
}
};
-export const uploadedSuggestedPeoplePhoto = (): ThunkAction<
- Promise<void>,
- RootState,
- unknown,
- Action<string>
-> => async (dispatch) => {
+export const uploadedSuggestedPeoplePhoto = (
+ imageUri: string,
+): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async (
+ dispatch,
+) => {
try {
+ await dispatch({
+ type: setSuggestedPeopleImage.type,
+ payload: {suggestedPeopleImage: imageUri},
+ });
dispatch({
type: setSuggestedPeopleLinked.type,
payload: {suggested_people_linked: 1},