From 1329310b6956945ee0b76c1357e41598d18b34d0 Mon Sep 17 00:00:00 2001 From: Ashoat Tevosyan Date: Fri, 27 Sep 2024 10:13:31 -0400 Subject: [PATCH] [lib] Remove dangling reduceUserInfos function from update specs 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 --- lib/shared/updates/delete-account-spec.js | 9 --------- lib/shared/updates/update-spec.js | 1 - 2 files changed, 10 deletions(-) diff --git a/lib/shared/updates/delete-account-spec.js b/lib/shared/updates/delete-account-spec.js index 9ec2bd85f6..3c96a276dd 100644 --- a/lib/shared/updates/delete-account-spec.js +++ b/lib/shared/updates/delete-account-spec.js @@ -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< @@ -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 { diff --git a/lib/shared/updates/update-spec.js b/lib/shared/updates/update-spec.js index df63f3820e..b0a3c1608a 100644 --- a/lib/shared/updates/update-spec.js +++ b/lib/shared/updates/update-spec.js @@ -71,7 +71,6 @@ export type UpdateSpec< state: ?CurrentUserInfo, update: UpdateInfo, ) => ?CurrentUserInfo, - +reduceUserInfos?: (state: UserInfos, update: UpdateInfo) => UserInfos, +reduceCalendarThreadFilters?: ( filteredThreadIDs: $ReadOnlySet, update: UpdateInfo,