diff --git a/native/calendar/calendar.react.js b/native/calendar/calendar.react.js --- a/native/calendar/calendar.react.js +++ b/native/calendar/calendar.react.js @@ -36,7 +36,7 @@ import type { CalendarFilter } from 'lib/types/filter-types.js'; import type { LoadingStatus } from 'lib/types/loading-types.js'; import type { ConnectionStatus } from 'lib/types/socket-types.js'; -import type { LegacyThreadInfo } from 'lib/types/thread-types.js'; +import type { ThreadInfo } from 'lib/types/thread-types.js'; import { useDispatchActionPromise, type DispatchActionPromise, @@ -114,7 +114,7 @@ | { itemType: 'entryInfo', entryInfo: EntryInfoWithHeight, - threadInfo: LegacyThreadInfo, + threadInfo: ThreadInfo, }; type ExtraData = { +activeEntries: { +[key: string]: boolean }, diff --git a/native/components/thread-list.react.js b/native/components/thread-list.react.js --- a/native/components/thread-list.react.js +++ b/native/components/thread-list.react.js @@ -6,7 +6,7 @@ import { createSelector } from 'reselect'; import SearchIndex from 'lib/shared/search-index.js'; -import type { LegacyThreadInfo, ThreadInfo } from 'lib/types/thread-types.js'; +import type { ThreadInfo } from 'lib/types/thread-types.js'; import Search from './search.react.js'; import ThreadListThread from './thread-list-thread.react.js'; @@ -25,7 +25,7 @@ }; type BaseProps = { - +threadInfos: $ReadOnlyArray, + +threadInfos: $ReadOnlyArray, +onSelect: (threadID: string) => void, +itemStyle?: ViewStyle, +itemTextStyle?: TextStyle, @@ -49,7 +49,7 @@ }; textInput: ?React.ElementRef; - listDataSelector: PropsAndState => $ReadOnlyArray = + listDataSelector: PropsAndState => $ReadOnlyArray = createSelector( (propsAndState: PropsAndState) => propsAndState.threadInfos, (propsAndState: PropsAndState) => propsAndState.searchText, @@ -57,10 +57,10 @@ (propsAndState: PropsAndState) => propsAndState.itemStyle, (propsAndState: PropsAndState) => propsAndState.itemTextStyle, ( - threadInfos: $ReadOnlyArray, + threadInfos: $ReadOnlyArray, text: string, searchResults: Set, - ): $ReadOnlyArray => + ): $ReadOnlyArray => text ? threadInfos.filter(threadInfo => searchResults.has(threadInfo.id)) : // We spread to make sure the result of this selector updates when @@ -68,7 +68,7 @@ [...threadInfos], ); - get listData(): $ReadOnlyArray { + get listData(): $ReadOnlyArray { return this.listDataSelector({ ...this.props, ...this.state }); } diff --git a/native/keyboard/keyboard-input-host.react.js b/native/keyboard/keyboard-input-host.react.js --- a/native/keyboard/keyboard-input-host.react.js +++ b/native/keyboard/keyboard-input-host.react.js @@ -6,7 +6,7 @@ import { KeyboardAccessoryView } from 'react-native-keyboard-input'; import type { MediaLibrarySelection } from 'lib/types/media-types.js'; -import type { LegacyThreadInfo } from 'lib/types/thread-types.js'; +import type { ThreadInfo } from 'lib/types/thread-types.js'; import { type KeyboardState, KeyboardContext } from './keyboard-state.js'; import { type InputState, InputStateContext } from '../input/input-state.js'; @@ -75,7 +75,7 @@ keyboardName: string, result: { +selections: $ReadOnlyArray, - +threadInfo: ?LegacyThreadInfo, + +threadInfo: ?ThreadInfo, }, ) => { const { keyboardState } = this.props; diff --git a/native/roles/community-roles-screen.react.js b/native/roles/community-roles-screen.react.js --- a/native/roles/community-roles-screen.react.js +++ b/native/roles/community-roles-screen.react.js @@ -9,7 +9,7 @@ useRoleMemberCountsForCommunity, useRoleUserSurfacedPermissions, } from 'lib/shared/thread-utils.js'; -import type { LegacyThreadInfo } from 'lib/types/thread-types.js'; +import type { ThreadInfo } from 'lib/types/thread-types.js'; import RolePanelEntry from './role-panel-entry.react.js'; import type { RolesNavigationProp } from './roles-navigator.react.js'; @@ -20,7 +20,7 @@ import { useStyles } from '../themes/colors.js'; export type CommunityRolesScreenParams = { - +threadInfo: LegacyThreadInfo, + +threadInfo: ThreadInfo, }; type CommunityRolesScreenProps = { @@ -37,7 +37,7 @@ // manually pull in the threadInfo from the redux store, since the threadInfo // passed into the route params will not be updated automatically. const threadID = threadInfo.id; - const reduxThreadInfo: ?LegacyThreadInfo = useSelector( + const reduxThreadInfo: ?ThreadInfo = useSelector( state => threadInfoSelector(state)[threadID], ); diff --git a/web/roles/community-roles-modal.react.js b/web/roles/community-roles-modal.react.js --- a/web/roles/community-roles-modal.react.js +++ b/web/roles/community-roles-modal.react.js @@ -6,7 +6,7 @@ import { threadInfoSelector } from 'lib/selectors/thread-selectors.js'; import { useRoleMemberCountsForCommunity } from 'lib/shared/thread-utils.js'; import type { UserSurfacedPermission } from 'lib/types/thread-permission-types.js'; -import type { LegacyThreadInfo } from 'lib/types/thread-types.js'; +import type { ThreadInfo } from 'lib/types/thread-types.js'; import css from './community-roles-modal.css'; import CreateRolesModal from './create-roles-modal.react.js'; @@ -16,17 +16,16 @@ import { useSelector } from '../redux/redux-utils.js'; type CommunityRolesModalProps = { - +community: LegacyThreadInfo, + +community: ThreadInfo, }; function CommunityRolesModal(props: CommunityRolesModalProps): React.Node { const { popModal, pushModal } = useModalContext(); const { community } = props; - const [threadInfo, setThreadInfo] = - React.useState(community); + const [threadInfo, setThreadInfo] = React.useState(community); const threadID = threadInfo.id; - const reduxThreadInfo: ?LegacyThreadInfo = useSelector( + const reduxThreadInfo: ?ThreadInfo = useSelector( state => threadInfoSelector(state)[threadID], ); diff --git a/web/roles/role-actions-menu.react.js b/web/roles/role-actions-menu.react.js --- a/web/roles/role-actions-menu.react.js +++ b/web/roles/role-actions-menu.react.js @@ -6,7 +6,7 @@ import { useModalContext } from 'lib/components/modal-provider.react.js'; import SWMansionIcon from 'lib/components/SWMansionIcon.react.js'; import { useRoleUserSurfacedPermissions } from 'lib/shared/thread-utils.js'; -import type { LegacyThreadInfo } from 'lib/types/thread-types.js'; +import type { ThreadInfo } from 'lib/types/thread-types.js'; import { useRoleDeletableAndEditableStatus } from 'lib/utils/role-utils.js'; import CreateRolesModal from './create-roles-modal.react.js'; @@ -18,7 +18,7 @@ const menuIcon = ; type RoleActionsMenuProps = { - +threadInfo: LegacyThreadInfo, + +threadInfo: ThreadInfo, +roleName: string, }; diff --git a/web/roles/role-panel-entry.react.js b/web/roles/role-panel-entry.react.js --- a/web/roles/role-panel-entry.react.js +++ b/web/roles/role-panel-entry.react.js @@ -2,14 +2,14 @@ import * as React from 'react'; -import type { LegacyThreadInfo } from 'lib/types/thread-types.js'; +import type { ThreadInfo } from 'lib/types/thread-types.js'; import RoleActionsMenu from './role-actions-menu.react.js'; import css from './role-panel-entry.css'; import CommIcon from '../CommIcon.react.js'; type RolePanelEntryProps = { - +threadInfo: LegacyThreadInfo, + +threadInfo: ThreadInfo, +roleName: string, +memberCount: number, };