diff --git a/lib/components/chat-mention-provider.react.js b/lib/components/chat-mention-provider.react.js --- a/lib/components/chat-mention-provider.react.js +++ b/lib/components/chat-mention-provider.react.js @@ -5,12 +5,11 @@ import genesis from '../facts/genesis.js'; import { threadInfoSelector } from '../selectors/thread-selectors.js'; import SentencePrefixSearchIndex from '../shared/sentence-prefix-search-index.js'; -import type { MinimallyEncodedResolvedThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js'; import { threadTypes } from '../types/thread-types-enum.js'; import type { ChatMentionCandidates, ChatMentionCandidatesObj, - LegacyResolvedThreadInfo, + ResolvedThreadInfo, ThreadInfo, } from '../types/thread-types.js'; import { useResolvedThreadInfosObj } from '../utils/entity-helpers.js'; @@ -73,14 +72,14 @@ } function getChatMentionCandidates(threadInfos: { - +[id: string]: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +[id: string]: ResolvedThreadInfo, }): { chatMentionCandidatesObj: ChatMentionCandidatesObj, communityThreadIDForGenesisThreads: { +[id: string]: string }, } { const result: { [string]: { - [string]: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + [string]: ResolvedThreadInfo, }, } = {}; const visitedGenesisThreads = new Set(); diff --git a/lib/shared/markdown.js b/lib/shared/markdown.js --- a/lib/shared/markdown.js +++ b/lib/shared/markdown.js @@ -6,11 +6,10 @@ markdownUserMentionRegex, decodeChatMentionText, } from './mention-utils.js'; -import type { MinimallyEncodedResolvedThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js'; import type { - LegacyResolvedThreadInfo, ChatMentionCandidates, RelativeMemberInfo, + ResolvedThreadInfo, } from '../types/thread-types.js'; // simple-markdown types @@ -257,7 +256,7 @@ chatMentionCandidates: ChatMentionCandidates, capture: Capture, ): { - threadInfo: ?LegacyResolvedThreadInfo | ?MinimallyEncodedResolvedThreadInfo, + threadInfo: ?ResolvedThreadInfo, content: string, hasAccessToChat: boolean, } { diff --git a/lib/shared/mention-utils.js b/lib/shared/mention-utils.js --- a/lib/shared/mention-utils.js +++ b/lib/shared/mention-utils.js @@ -4,13 +4,12 @@ import SentencePrefixSearchIndex from './sentence-prefix-search-index.js'; import { threadOtherMembers } from './thread-utils.js'; import { stringForUserExplicit } from './user-utils.js'; -import type { MinimallyEncodedResolvedThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js'; import { threadTypes } from '../types/thread-types-enum.js'; import type { - LegacyResolvedThreadInfo, ChatMentionCandidates, RelativeMemberInfo, ThreadInfo, + ResolvedThreadInfo, } from '../types/thread-types.js'; import { idSchemaRegex, chatNameMaxLength } from '../utils/validation-utils.js'; @@ -31,7 +30,7 @@ type MentionTypeaheadChatSuggestionItem = { +type: 'chat', - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, }; export type MentionTypeaheadSuggestionItem = @@ -71,9 +70,7 @@ return text.replace(/\\]/g, ']'); } -function getRawChatMention( - threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, -): string { +function getRawChatMention(threadInfo: ResolvedThreadInfo): string { return `@[[${threadInfo.id}:${encodeChatMentionText(threadInfo.uiName)}]]`; } diff --git a/lib/shared/mention-utils.test.js b/lib/shared/mention-utils.test.js --- a/lib/shared/mention-utils.test.js +++ b/lib/shared/mention-utils.test.js @@ -6,7 +6,7 @@ getRawChatMention, renderChatMentionsWithAltText, } from './mention-utils.js'; -import type { LegacyResolvedThreadInfo } from '../types/thread-types.js'; +import type { ResolvedThreadInfo } from '../types/thread-types.js'; describe('encodeChatMentionText', () => { it('should encode closing brackets', () => { @@ -36,7 +36,7 @@ it('should return raw chat mention', () => expect( getRawChatMention({ - ...(({}: any): LegacyResolvedThreadInfo), + ...(({}: any): ResolvedThreadInfo), id: '256|123', uiName: 'thread-name', }), @@ -45,7 +45,7 @@ it('should return raw chat mention with encoded text', () => expect( getRawChatMention({ - ...(({}: any): LegacyResolvedThreadInfo), + ...(({}: any): ResolvedThreadInfo), id: '256|123', uiName: 'thread-]name]]', }), diff --git a/lib/types/filter-types.js b/lib/types/filter-types.js --- a/lib/types/filter-types.js +++ b/lib/types/filter-types.js @@ -2,8 +2,7 @@ import t, { type TUnion } from 'tcomb'; -import type { MinimallyEncodedResolvedThreadInfo } from './minimally-encoded-thread-permissions-types.js'; -import type { LegacyResolvedThreadInfo } from './thread-types.js'; +import type { ResolvedThreadInfo } from './thread-types.js'; import { tID, tShape, tString } from '../utils/validation-utils.js'; export const calendarThreadFilterTypes = Object.freeze({ @@ -42,6 +41,6 @@ }; export type FilterThreadInfo = { - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +numVisibleEntries: number, }; diff --git a/lib/types/thread-types.js b/lib/types/thread-types.js --- a/lib/types/thread-types.js +++ b/lib/types/thread-types.js @@ -208,6 +208,10 @@ +pinnedCount?: number, }; +export type ResolvedThreadInfo = + | LegacyResolvedThreadInfo + | MinimallyEncodedResolvedThreadInfo; + export type ServerMemberInfo = { +id: string, +role: ?string, @@ -484,7 +488,7 @@ export type ThreadStoreThreadInfos = LegacyRawThreadInfos; export type ChatMentionCandidates = { - +[id: string]: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +[id: string]: ResolvedThreadInfo, }; export type ChatMentionCandidatesObj = { +[id: string]: ChatMentionCandidates, diff --git a/lib/utils/drawer-utils.react.js b/lib/utils/drawer-utils.react.js --- a/lib/utils/drawer-utils.react.js +++ b/lib/utils/drawer-utils.react.js @@ -2,11 +2,10 @@ import { values } from './objects.js'; import { threadInFilterList, threadIsChannel } from '../shared/thread-utils.js'; -import type { MinimallyEncodedResolvedThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js'; import { communitySubthreads } from '../types/thread-types-enum.js'; import type { - LegacyResolvedThreadInfo, RawThreadInfo, + ResolvedThreadInfo, ThreadInfo, } from '../types/thread-types.js'; @@ -24,9 +23,7 @@ childThreadInfosMap: { +[id: string]: $ReadOnlyArray, }, - communities: $ReadOnlyArray< - LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, - >, + communities: $ReadOnlyArray, labelStyles: $ReadOnlyArray, maxDepth: number, ): $ReadOnlyArray> { @@ -77,10 +74,10 @@ ); } -function appendSuffix< - T: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, ->(chats: $ReadOnlyArray): T[] { - const result: T[] = []; +function appendSuffix( + chats: $ReadOnlyArray, +): ResolvedThreadInfo[] { + const result: ResolvedThreadInfo[] = []; const names = new Map(); for (const chat of chats) { diff --git a/lib/utils/entity-helpers.js b/lib/utils/entity-helpers.js --- a/lib/utils/entity-helpers.js +++ b/lib/utils/entity-helpers.js @@ -9,20 +9,18 @@ entityTextToRawString, } from './entity-text.js'; import type { UseENSNamesOptions } from '../hooks/ens-cache.js'; -import type { MinimallyEncodedResolvedThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js'; import type { LegacyThreadInfo, LegacyResolvedThreadInfo, ThreadInfo, + ResolvedThreadInfo, } from '../types/thread-types.js'; import { values } from '../utils/objects.js'; function useResolvedThreadInfos( threadInfos: $ReadOnlyArray, options?: ?UseENSNamesOptions, -): $ReadOnlyArray< - LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, -> { +): $ReadOnlyArray { const entityText = React.useMemo( () => threadInfos.map(threadInfo => threadInfo.uiName), [threadInfos], @@ -97,7 +95,7 @@ threadInfosObj: { +[id: string]: ThreadInfo }, options?: ?UseENSNamesOptions, ): { - +[id: string]: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +[id: string]: ResolvedThreadInfo, } { const threadInfosArray = React.useMemo( () => values(threadInfosObj), @@ -109,7 +107,7 @@ ); return React.useMemo(() => { const obj: { - [string]: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + [string]: ResolvedThreadInfo, } = {}; for (const resolvedThreadInfo of resolvedThreadInfosArray) { obj[resolvedThreadInfo.id] = resolvedThreadInfo; @@ -118,9 +116,7 @@ }, [resolvedThreadInfosArray]); } -function useResolvedThreadInfo( - threadInfo: ThreadInfo, -): LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo { +function useResolvedThreadInfo(threadInfo: ThreadInfo): ResolvedThreadInfo { const resolutionInput = React.useMemo(() => [threadInfo], [threadInfo]); const [resolvedThreadInfo] = useResolvedThreadInfos(resolutionInput); return resolvedThreadInfo; @@ -128,7 +124,7 @@ function useResolvedOptionalThreadInfo( threadInfo: ?ThreadInfo, -): ?LegacyResolvedThreadInfo | ?MinimallyEncodedResolvedThreadInfo { +): ?ResolvedThreadInfo { const resolutionInput = React.useMemo( () => (threadInfo ? [threadInfo] : []), [threadInfo], diff --git a/native/avatars/thread-avatar.react.js b/native/avatars/thread-avatar.react.js --- a/native/avatars/thread-avatar.react.js +++ b/native/avatars/thread-avatar.react.js @@ -8,11 +8,10 @@ } from 'lib/shared/avatar-utils.js'; import { getSingleOtherUser } from 'lib/shared/thread-utils.js'; import type { AvatarSize } from 'lib/types/avatar-types.js'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import { threadTypes } from 'lib/types/thread-types-enum.js'; import type { - LegacyResolvedThreadInfo, RawThreadInfo, + ResolvedThreadInfo, ThreadInfo, } from 'lib/types/thread-types.js'; @@ -20,11 +19,7 @@ import { useSelector } from '../redux/redux-utils.js'; type Props = { - +threadInfo: - | RawThreadInfo - | ThreadInfo - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: RawThreadInfo | ThreadInfo | ResolvedThreadInfo, +size: AvatarSize, }; diff --git a/native/calendar/entry.react.js b/native/calendar/entry.react.js --- a/native/calendar/entry.react.js +++ b/native/calendar/entry.react.js @@ -42,13 +42,9 @@ CalendarQuery, } from 'lib/types/entry-types.js'; import type { LoadingStatus } from 'lib/types/loading-types.js'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import type { Dispatch } from 'lib/types/redux-types.js'; import { threadPermissions } from 'lib/types/thread-permission-types.js'; -import type { - LegacyResolvedThreadInfo, - ThreadInfo, -} from 'lib/types/thread-types.js'; +import type { ResolvedThreadInfo, ThreadInfo } from 'lib/types/thread-types.js'; import { useDispatchActionPromise, type DispatchActionPromise, @@ -195,7 +191,7 @@ }; type Props = { ...SharedProps, - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, // Redux state +calendarQuery: () => CalendarQuery, +online: boolean, diff --git a/native/chat/settings/delete-thread.react.js b/native/chat/settings/delete-thread.react.js --- a/native/chat/settings/delete-thread.react.js +++ b/native/chat/settings/delete-thread.react.js @@ -25,11 +25,10 @@ getThreadsToDeleteText, } from 'lib/shared/thread-utils.js'; import type { LoadingStatus } from 'lib/types/loading-types.js'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import type { - LegacyResolvedThreadInfo, LeaveThreadPayload, ThreadInfo, + ResolvedThreadInfo, } from 'lib/types/thread-types.js'; import { useDispatchActionPromise, @@ -115,7 +114,7 @@ type Props = { ...BaseProps, // Redux state - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +shouldUseDeleteConfirmationAlert: boolean, +loadingStatus: LoadingStatus, +colors: Colors, diff --git a/native/chat/settings/thread-settings-avatar.react.js b/native/chat/settings/thread-settings-avatar.react.js --- a/native/chat/settings/thread-settings-avatar.react.js +++ b/native/chat/settings/thread-settings-avatar.react.js @@ -3,14 +3,13 @@ import * as React from 'react'; import { View } from 'react-native'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; -import { type LegacyResolvedThreadInfo } from 'lib/types/thread-types.js'; +import type { ResolvedThreadInfo } from 'lib/types/thread-types.js'; import EditThreadAvatar from '../../avatars/edit-thread-avatar.react.js'; import { useStyles } from '../../themes/colors.js'; type Props = { - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +canChangeSettings: boolean, }; function ThreadSettingsAvatar(props: Props): React.Node { diff --git a/native/chat/settings/thread-settings-delete-thread.react.js b/native/chat/settings/thread-settings-delete-thread.react.js --- a/native/chat/settings/thread-settings-delete-thread.react.js +++ b/native/chat/settings/thread-settings-delete-thread.react.js @@ -3,8 +3,7 @@ import * as React from 'react'; import { Text, View } from 'react-native'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; -import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js'; +import type { ResolvedThreadInfo } from 'lib/types/thread-types.js'; import type { ThreadSettingsNavigate } from './thread-settings.react.js'; import Button from '../../components/button.react.js'; @@ -13,7 +12,7 @@ import type { ViewStyle } from '../../types/styles.js'; type Props = { - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +navigate: ThreadSettingsNavigate, +buttonStyle: ViewStyle, }; diff --git a/native/chat/settings/thread-settings-name.react.js b/native/chat/settings/thread-settings-name.react.js --- a/native/chat/settings/thread-settings-name.react.js +++ b/native/chat/settings/thread-settings-name.react.js @@ -15,11 +15,10 @@ } from 'lib/actions/thread-actions.js'; import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js'; import type { LoadingStatus } from 'lib/types/loading-types.js'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; -import { - type LegacyResolvedThreadInfo, - type ChangeThreadSettingsPayload, - type UpdateThreadRequest, +import type { + ChangeThreadSettingsPayload, + UpdateThreadRequest, + ResolvedThreadInfo, } from 'lib/types/thread-types.js'; import { type DispatchActionPromise, @@ -62,7 +61,7 @@ }; type BaseProps = { - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +nameEditValue: ?string, +setNameEditValue: (value: ?string, callback?: () => void) => void, +canChangeSettings: boolean, diff --git a/native/chat/settings/thread-settings.react.js b/native/chat/settings/thread-settings.react.js --- a/native/chat/settings/thread-settings.react.js +++ b/native/chat/settings/thread-settings.react.js @@ -33,14 +33,14 @@ threadIsChannel, } from 'lib/shared/thread-utils.js'; import threadWatcher from 'lib/shared/thread-watcher.js'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import type { RelationshipButton } from 'lib/types/relationship-types.js'; import { threadPermissions } from 'lib/types/thread-permission-types.js'; import { threadTypes } from 'lib/types/thread-types-enum.js'; -import { - type LegacyResolvedThreadInfo, - type RelativeMemberInfo, - type ThreadInfo, +import type { + LegacyResolvedThreadInfo, + RelativeMemberInfo, + ThreadInfo, + ResolvedThreadInfo, } from 'lib/types/thread-types.js'; import type { UserInfos } from 'lib/types/user-types.js'; import { @@ -137,26 +137,20 @@ | { +itemType: 'avatar', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +canChangeSettings: boolean, } | { +itemType: 'name', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +nameEditValue: ?string, +canChangeSettings: boolean, } | { +itemType: 'color', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +colorEditValue: string, +canChangeSettings: boolean, +navigate: ThreadSettingsNavigate, @@ -165,9 +159,7 @@ | { +itemType: 'description', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +descriptionEditValue: ?string, +descriptionTextHeight: ?number, +canChangeSettings: boolean, @@ -175,33 +167,23 @@ | { +itemType: 'parent', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, - +parentThreadInfo: - | ?LegacyResolvedThreadInfo - | ?MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, + +parentThreadInfo: ?ResolvedThreadInfo, } | { +itemType: 'visibility', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, } | { +itemType: 'pushNotifs', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, } | { +itemType: 'homeNotifs', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, } | { +itemType: 'seeMore', @@ -211,9 +193,7 @@ | { +itemType: 'childThread', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +firstListItem: boolean, +lastListItem: boolean, } @@ -225,9 +205,7 @@ +itemType: 'member', +key: string, +memberInfo: RelativeMemberInfo, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +canEdit: boolean, +navigate: ThreadSettingsNavigate, +firstListItem: boolean, @@ -249,18 +227,14 @@ | { +itemType: 'promoteSidebar' | 'leaveThread' | 'deleteThread', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +navigate: ThreadSettingsNavigate, +buttonStyle: ViewStyle, } | { +itemType: 'editRelationship', +key: string, - +threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +navigate: ThreadSettingsNavigate, +buttonStyle: ViewStyle, +relationshipButton: RelationshipButton, @@ -292,10 +266,8 @@ // Redux state +userInfos: UserInfos, +viewerID: ?string, - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, - +parentThreadInfo: - | ?LegacyResolvedThreadInfo - | ?MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, + +parentThreadInfo: ?ResolvedThreadInfo, +childThreadInfos: ?$ReadOnlyArray, +somethingIsSaving: boolean, +styles: $ReadOnly, @@ -374,12 +346,8 @@ (propsAndState: PropsAndState) => propsAndState.navigation.navigate, (propsAndState: PropsAndState) => propsAndState.route.key, ( - threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, - parentThreadInfo: - | ?LegacyResolvedThreadInfo - | ?MinimallyEncodedResolvedThreadInfo, + threadInfo: ResolvedThreadInfo, + parentThreadInfo: ?ResolvedThreadInfo, nameEditValue: ?string, colorEditValue: string, descriptionEditValue: ?string, @@ -534,13 +502,9 @@ (propsAndState: PropsAndState) => propsAndState.childThreadInfos, (propsAndState: PropsAndState) => propsAndState.numSubchannelsShowing, ( - threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + threadInfo: ResolvedThreadInfo, navigate: ThreadSettingsNavigate, - childThreads: ?$ReadOnlyArray< - LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, - >, + childThreads: ?$ReadOnlyArray, numSubchannelsShowing: number, ) => { const listData: ChatSettingsItem[] = []; @@ -605,9 +569,7 @@ (propsAndState: PropsAndState) => propsAndState.numSidebarsShowing, ( navigate: ThreadSettingsNavigate, - childThreads: ?$ReadOnlyArray< - LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, - >, + childThreads: ?$ReadOnlyArray, numSidebarsShowing: number, ) => { const listData: ChatSettingsItem[] = []; @@ -666,9 +628,7 @@ (propsAndState: PropsAndState) => propsAndState.numMembersShowing, (propsAndState: PropsAndState) => propsAndState.verticalBounds, ( - threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, + threadInfo: ResolvedThreadInfo, canStartEditing: boolean, navigate: ThreadSettingsNavigate, routeKey: string, @@ -778,12 +738,8 @@ (propsAndState: PropsAndState) => propsAndState.userInfos, (propsAndState: PropsAndState) => propsAndState.viewerID, ( - threadInfo: - | LegacyResolvedThreadInfo - | MinimallyEncodedResolvedThreadInfo, - parentThreadInfo: - | ?LegacyResolvedThreadInfo - | ?MinimallyEncodedResolvedThreadInfo, + threadInfo: ResolvedThreadInfo, + parentThreadInfo: ?ResolvedThreadInfo, navigate: ThreadSettingsNavigate, styles: $ReadOnly, userInfos: UserInfos, diff --git a/native/components/thread-list-thread.react.js b/native/components/thread-list-thread.react.js --- a/native/components/thread-list-thread.react.js +++ b/native/components/thread-list-thread.react.js @@ -2,11 +2,7 @@ import * as React from 'react'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; -import type { - LegacyResolvedThreadInfo, - ThreadInfo, -} from 'lib/types/thread-types.js'; +import type { ResolvedThreadInfo, ThreadInfo } from 'lib/types/thread-types.js'; import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js'; import Button from './button.react.js'; @@ -41,7 +37,7 @@ }; type Props = { ...SharedProps, - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +colors: Colors, +styles: $ReadOnly, }; diff --git a/native/markdown/markdown-chat-mention.react.js b/native/markdown/markdown-chat-mention.react.js --- a/native/markdown/markdown-chat-mention.react.js +++ b/native/markdown/markdown-chat-mention.react.js @@ -3,14 +3,14 @@ import * as React from 'react'; import { Text, StyleSheet } from 'react-native'; -import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js'; +import type { ResolvedThreadInfo } from 'lib/types/thread-types.js'; import { useMarkdownOnPressUtils } from './markdown-utils.js'; import { useNavigateToThreadWithFadeAnimation } from '../chat/message-list-types.js'; type TextProps = React.ElementConfig; type Props = { - +threadInfo: LegacyResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +children: React.Node, ...TextProps, }; diff --git a/web/calendar/entry.react.js b/web/calendar/entry.react.js --- a/web/calendar/entry.react.js +++ b/web/calendar/entry.react.js @@ -34,10 +34,9 @@ type CalendarQuery, } from 'lib/types/entry-types.js'; import type { LoadingStatus } from 'lib/types/loading-types.js'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import type { Dispatch } from 'lib/types/redux-types.js'; import { threadPermissions } from 'lib/types/thread-permission-types.js'; -import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js'; +import type { ResolvedThreadInfo } from 'lib/types/thread-types.js'; import { type DispatchActionPromise, useDispatchActionPromise, @@ -65,7 +64,7 @@ }; type Props = { ...BaseProps, - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +loggedIn: boolean, +calendarQuery: () => CalendarQuery, +online: boolean, diff --git a/web/markdown/markdown-chat-mention.react.js b/web/markdown/markdown-chat-mention.react.js --- a/web/markdown/markdown-chat-mention.react.js +++ b/web/markdown/markdown-chat-mention.react.js @@ -2,14 +2,13 @@ import * as React from 'react'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; -import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js'; +import type { ResolvedThreadInfo } from 'lib/types/thread-types.js'; import css from './markdown.css'; import { useOnClickThread } from '../selectors/thread-selectors.js'; type MarkdownChatMentionProps = { - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +hasAccessToChat: boolean, +text: string, }; diff --git a/web/modals/history/history-entry.react.js b/web/modals/history/history-entry.react.js --- a/web/modals/history/history-entry.react.js +++ b/web/modals/history/history-entry.react.js @@ -20,8 +20,7 @@ type RestoreEntryPayload, } from 'lib/types/entry-types.js'; import type { LoadingStatus } from 'lib/types/loading-types.js'; -import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; -import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js'; +import type { ResolvedThreadInfo } from 'lib/types/thread-types.js'; import type { UserInfo } from 'lib/types/user-types.js'; import { type DispatchActionPromise, @@ -41,7 +40,7 @@ }; type Props = { ...BaseProps, - +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, + +threadInfo: ResolvedThreadInfo, +loggedIn: boolean, +restoreLoadingStatus: LoadingStatus, +calendarQuery: () => CalendarQuery,