Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3386406
D11672.id39265.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11672.id39265.diff
View Options
diff --git a/lib/actions/aux-user-actions.js b/lib/actions/aux-user-actions.js
--- a/lib/actions/aux-user-actions.js
+++ b/lib/actions/aux-user-actions.js
@@ -2,4 +2,6 @@
const setFarcasterFriendsFIDActionType = 'SET_FARCASTER_FRIENDS_FID';
-export { setFarcasterFriendsFIDActionType };
+const clearAuxUserFIDsActionType = 'CLEAR_AUX_USER_FIDS';
+
+export { setFarcasterFriendsFIDActionType, clearAuxUserFIDsActionType };
diff --git a/lib/reducers/aux-user-reducer.js b/lib/reducers/aux-user-reducer.js
--- a/lib/reducers/aux-user-reducer.js
+++ b/lib/reducers/aux-user-reducer.js
@@ -1,6 +1,9 @@
// @flow
-import { setFarcasterFriendsFIDActionType } from '../actions/aux-user-actions.js';
+import {
+ setFarcasterFriendsFIDActionType,
+ clearAuxUserFIDsActionType,
+} from '../actions/aux-user-actions.js';
import { setClientDBStoreActionType } from '../actions/client-db-store-actions.js';
import {
auxUserStoreOpsHandlers,
@@ -33,6 +36,27 @@
},
});
}
+ return {
+ auxUserStore: processStoreOps(state, replaceOperations),
+ auxUserStoreOperations: replaceOperations,
+ };
+ } else if (action.type === clearAuxUserFIDsActionType) {
+ const replaceOperations: ReplaceAuxUserInfoOperation[] = [];
+ for (const userID in state.auxUserInfos) {
+ if (state.auxUserInfos[userID].fid !== null) {
+ replaceOperations.push({
+ type: 'replace_aux_user_info',
+ payload: {
+ id: userID,
+ auxUserInfo: {
+ ...state.auxUserInfos[userID],
+ fid: null,
+ },
+ },
+ });
+ }
+ }
+
return {
auxUserStore: processStoreOps(state, replaceOperations),
auxUserStoreOperations: replaceOperations,
diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js
--- a/lib/types/redux-types.js
+++ b/lib/types/redux-types.js
@@ -1388,6 +1388,10 @@
+type: 'SET_FARCASTER_FRIENDS_FID',
+payload: SetFarcasterFriendsFIDPayload,
}
+ | {
+ +type: 'CLEAR_AUX_USER_FIDS',
+ +payload?: void,
+ }
| {
+type: 'OPS_PROCESSING_FINISHED_ACTION_TYPE',
+payload?: void,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 4:32 AM (21 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2599575
Default Alt Text
D11672.id39265.diff (2 KB)
Attached To
Mode
D11672: create new aux user store action for clearing fids
Attached
Detach File
Event Timeline
Log In to Comment