Skip to content

Commit

Permalink
[lib] Remove dangling reduceUserInfos function from update specs
Browse files Browse the repository at this point in the history
Summary: After some refactoring of `user-reducer.js` some time ago, this function is no longer used, and can be removed.

Test Plan: Flow, consulting Tomek

Reviewers: tomek

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D13502
  • Loading branch information
Ashoat committed Sep 27, 2024
1 parent 39553e6 commit 1329310
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
9 changes: 0 additions & 9 deletions lib/shared/updates/delete-account-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type {
AccountDeletionUpdateData,
AccountDeletionUpdateInfo,
} from '../../types/update-types.js';
import type { UserInfos } from '../../types/user-types.js';
import { tNumber, tShape, tUserID } from '../../utils/validation-utils.js';

export const deleteAccountSpec: UpdateSpec<
Expand Down Expand Up @@ -60,14 +59,6 @@ export const deleteAccountSpec: UpdateSpec<
}
return operations;
},
reduceUserInfos(state: UserInfos, update: AccountDeletionUpdateInfo) {
const { deletedUserID } = update;
if (!state[deletedUserID]) {
return state;
}
const { [deletedUserID]: deleted, ...rest } = state;
return rest;
},
rawUpdateInfoFromRow(row: Object) {
const content = JSON.parse(row.content);
return {
Expand Down
1 change: 0 additions & 1 deletion lib/shared/updates/update-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export type UpdateSpec<
state: ?CurrentUserInfo,
update: UpdateInfo,
) => ?CurrentUserInfo,
+reduceUserInfos?: (state: UserInfos, update: UpdateInfo) => UserInfos,
+reduceCalendarThreadFilters?: (
filteredThreadIDs: $ReadOnlySet<string>,
update: UpdateInfo,
Expand Down

0 comments on commit 1329310

Please sign in to comment.