diff --git a/keyserver/src/creators/update-creator.js b/keyserver/src/creators/update-creator.js --- a/keyserver/src/creators/update-creator.js +++ b/keyserver/src/creators/update-creator.js @@ -31,7 +31,7 @@ redisMessageTypes, type NewUpdatesRedisMessage, } from 'lib/types/redis-types.js'; -import type { LegacyRawThreadInfos } from 'lib/types/thread-types'; +import type { RawThreadInfos } from 'lib/types/thread-types'; import { type ServerUpdateInfo, type UpdateData, @@ -92,7 +92,7 @@ viewer: Viewer, calendarQuery: ?CalendarQuery, updatesForCurrentSession?: UpdatesForCurrentSession, - threadInfos: LegacyRawThreadInfos, + threadInfos: RawThreadInfos, }; const defaultUpdateCreationResult = { viewerUpdates: [], userInfos: {} }; const sortFunction = ( diff --git a/lib/reducers/calendar-filters-reducer.js b/lib/reducers/calendar-filters-reducer.js --- a/lib/reducers/calendar-filters-reducer.js +++ b/lib/reducers/calendar-filters-reducer.js @@ -37,10 +37,7 @@ fullStateSyncActionType, incrementalStateSyncActionType, } from '../types/socket-types.js'; -import type { - LegacyRawThreadInfos, - ThreadStore, -} from '../types/thread-types.js'; +import type { RawThreadInfos, ThreadStore } from '../types/thread-types.js'; import { type ClientUpdateInfo, processUpdatesActionType, @@ -161,7 +158,7 @@ function removeDeletedThreadIDsFromFilterList( state: $ReadOnlyArray, - threadInfos: LegacyRawThreadInfos, + threadInfos: RawThreadInfos, ): $ReadOnlyArray { const currentlyFilteredIDs = filteredThreadIDs(state); if (!currentlyFilteredIDs) { diff --git a/lib/reducers/entry-reducer.js b/lib/reducers/entry-reducer.js --- a/lib/reducers/entry-reducer.js +++ b/lib/reducers/entry-reducer.js @@ -54,7 +54,7 @@ fullStateSyncActionType, incrementalStateSyncActionType, } from '../types/socket-types.js'; -import { type LegacyRawThreadInfos } from '../types/thread-types.js'; +import { type RawThreadInfos } from '../types/thread-types.js'; import { type ClientUpdateInfo, processUpdatesActionType, @@ -90,7 +90,7 @@ currentEntryInfos: { +[id: string]: RawEntryInfo }, currentDaysToEntries: ?{ +[day: string]: string[] }, newEntryInfos: $ReadOnlyArray, - threadInfos: LegacyRawThreadInfos, + threadInfos: RawThreadInfos, ) { const mergedEntryInfos: { [string]: RawEntryInfo } = {}; let someEntryUpdated = false; @@ -163,7 +163,7 @@ function reduceEntryInfos( entryStore: EntryStore, action: BaseAction, - newThreadInfos: LegacyRawThreadInfos, + newThreadInfos: RawThreadInfos, ): [EntryStore, $ReadOnlyArray] { const { entryInfos, daysToEntries, lastUserInteractionCalendar } = entryStore; if ( diff --git a/lib/reducers/message-reducer.js b/lib/reducers/message-reducer.js --- a/lib/reducers/message-reducer.js +++ b/lib/reducers/message-reducer.js @@ -97,6 +97,7 @@ import type { LegacyRawThreadInfos, RawThreadInfo, + RawThreadInfos, } from '../types/thread-types.js'; import { type ClientUpdateInfo, @@ -149,7 +150,7 @@ messageInfos: $ReadOnlyArray, truncationStatus: { [threadID: string]: MessageTruncationStatus }, currentAsOf: { +[keyserverID: string]: number }, - threadInfos: LegacyRawThreadInfos, + threadInfos: RawThreadInfos, ): FreshMessageStoreResult { const unshimmed = unshimMessageInfos(messageInfos); const orderedMessageInfos = sortMessageInfoList(unshimmed); @@ -215,7 +216,7 @@ function reassignMessagesToRealizedThreads( messageStore: MessageStore, - threadInfos: LegacyRawThreadInfos, + threadInfos: RawThreadInfos, ): ReassignmentResult { const pendingToRealizedThreadIDs = pendingToRealizedThreadIDsSelector(threadInfos); @@ -700,7 +701,7 @@ function ensureRealizedThreadIDIsUsedWhenPossible( payload: T, - threadInfos: LegacyRawThreadInfos, + threadInfos: RawThreadInfos, ): T { const pendingToRealizedThreadIDs = pendingToRealizedThreadIDsSelector(threadInfos); diff --git a/lib/selectors/thread-selectors.js b/lib/selectors/thread-selectors.js --- a/lib/selectors/thread-selectors.js +++ b/lib/selectors/thread-selectors.js @@ -52,6 +52,7 @@ type RelativeMemberInfo, type ThreadInfo, type RawThreadInfo, + type RawThreadInfos, } from '../types/thread-types.js'; import { dateString, dateFromString } from '../utils/date-utils.js'; import { values } from '../utils/objects.js'; @@ -414,10 +415,10 @@ }, ); const pendingToRealizedThreadIDsSelector: ( - rawThreadInfos: LegacyRawThreadInfos, + rawThreadInfos: RawThreadInfos, ) => $ReadOnlyMap = createSelector( - (rawThreadInfos: LegacyRawThreadInfos) => rawThreadInfos, - (rawThreadInfos: LegacyRawThreadInfos) => { + (rawThreadInfos: RawThreadInfos) => rawThreadInfos, + (rawThreadInfos: RawThreadInfos) => { const result = new Map(); for (const threadID in rawThreadInfos) { const rawThreadInfo = rawThreadInfos[threadID];