Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3528985
D10671.id35740.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
26 KB
Referenced Files
None
Subscribers
None
D10671.id35740.diff
View Options
diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js
--- a/web/chat/chat-input-bar.react.js
+++ b/web/chat/chat-input-bar.react.js
@@ -40,7 +40,6 @@
import {
type ClientThreadJoinRequest,
type ThreadJoinPayload,
- type LegacyThreadInfo,
} from 'lib/types/thread-types.js';
import { type UserInfos } from 'lib/types/user-types.js';
import {
@@ -67,7 +66,7 @@
} from '../utils/typeahead-utils.js';
type BaseProps = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+inputState: InputState,
};
type Props = {
@@ -83,7 +82,7 @@
+joinThread: (request: ClientThreadJoinRequest) => Promise<ThreadJoinPayload>,
+typeaheadMatchedStrings: ?TypeaheadMatchedStrings,
+suggestions: $ReadOnlyArray<MentionTypeaheadSuggestionItem>,
- +parentThreadInfo: ?LegacyThreadInfo | ?ThreadInfo,
+ +parentThreadInfo: ?ThreadInfo,
};
class ChatInputBar extends React.PureComponent<Props> {
diff --git a/web/chat/chat-message-list.react.js b/web/chat/chat-message-list.react.js
--- a/web/chat/chat-message-list.react.js
+++ b/web/chat/chat-message-list.react.js
@@ -28,7 +28,6 @@
import type { FetchMessageInfosPayload } from 'lib/types/message-types.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import {
type DispatchActionPromise,
useDispatchActionPromise,
@@ -56,7 +55,7 @@
const editBoxTopMargin = 10;
type BaseProps = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
type Props = {
diff --git a/web/chat/composed-message.react.js b/web/chat/composed-message.react.js
--- a/web/chat/composed-message.react.js
+++ b/web/chat/composed-message.react.js
@@ -13,7 +13,6 @@
import { getMessageLabel } from 'lib/shared/edit-messages-utils.js';
import { assertComposableMessageType } from 'lib/types/message-types.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { getComposedMessageID } from './chat-constants.js';
import css from './chat-message-list.css';
@@ -51,7 +50,7 @@
type BaseProps = {
+item: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+shouldDisplayPinIndicator: boolean,
+sendFailed: boolean,
+children: React.Node,
diff --git a/web/chat/edit-message-provider.js b/web/chat/edit-message-provider.js
--- a/web/chat/edit-message-provider.js
+++ b/web/chat/edit-message-provider.js
@@ -6,7 +6,6 @@
import ModalOverlay from 'lib/components/modal-overlay.react.js';
import type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types';
import { EditTextMessage } from './edit-text-message.react.js';
@@ -19,7 +18,7 @@
export type EditState = {
+messageInfo: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+editedMessageDraft: ?string,
+isError: boolean,
+position?: ModalPosition,
diff --git a/web/chat/edit-text-message.react.js b/web/chat/edit-text-message.react.js
--- a/web/chat/edit-text-message.react.js
+++ b/web/chat/edit-text-message.react.js
@@ -9,7 +9,6 @@
import { useEditMessage } from 'lib/shared/edit-messages-utils.js';
import { trimMessage } from 'lib/shared/message-utils.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { editBoxBottomRowHeight } from './chat-constants.js';
import ChatInputTextArea from './chat-input-text-area.react.js';
@@ -21,7 +20,7 @@
type Props = {
+item: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+background: boolean,
};
diff --git a/web/chat/failed-send.react.js b/web/chat/failed-send.react.js
--- a/web/chat/failed-send.react.js
+++ b/web/chat/failed-send.react.js
@@ -12,7 +12,6 @@
type RawComposableMessageInfo,
} from 'lib/types/message-types.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import css from './chat-message-list.css';
import multimediaMessageSendFailed from './multimedia-message-send-failed.js';
@@ -23,13 +22,13 @@
type BaseProps = {
+item: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
type Props = {
...BaseProps,
+rawMessageInfo: RawComposableMessageInfo,
+inputState: ?InputState,
- +parentThreadInfo: ?LegacyThreadInfo | ?ThreadInfo,
+ +parentThreadInfo: ?ThreadInfo,
};
class FailedSend extends React.PureComponent<Props> {
retryingText = false;
diff --git a/web/chat/message.react.js b/web/chat/message.react.js
--- a/web/chat/message.react.js
+++ b/web/chat/message.react.js
@@ -6,7 +6,6 @@
import { type ChatMessageInfoItem } from 'lib/selectors/chat-selectors.js';
import { messageTypes } from 'lib/types/message-types-enum.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { longAbsoluteDate } from 'lib/utils/date-utils.js';
import css from './chat-message-list.css';
@@ -18,7 +17,7 @@
type Props = {
+item: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+shouldDisplayPinIndicator: boolean,
};
function Message(props: Props): React.Node {
diff --git a/web/chat/multimedia-message.react.js b/web/chat/multimedia-message.react.js
--- a/web/chat/multimedia-message.react.js
+++ b/web/chat/multimedia-message.react.js
@@ -10,7 +10,6 @@
import { type ChatMessageInfoItem } from 'lib/selectors/chat-selectors.js';
import { messageTypes } from 'lib/types/message-types-enum.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import css from './chat-message-list.css';
import ComposedMessage from './composed-message.react.js';
@@ -20,7 +19,7 @@
type BaseProps = {
+item: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+shouldDisplayPinIndicator: boolean,
};
type Props = {
diff --git a/web/chat/pinned-messages-banner.react.js b/web/chat/pinned-messages-banner.react.js
--- a/web/chat/pinned-messages-banner.react.js
+++ b/web/chat/pinned-messages-banner.react.js
@@ -5,7 +5,6 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { pinnedMessageCountText } from 'lib/utils/message-pinning-utils.js';
import css from './pinned-messages-banner.css';
@@ -13,7 +12,7 @@
import PinnedMessagesModal from '../modals/chat/pinned-messages-modal.react.js';
type Props = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function PinnedMessagesBanner(props: Props): React.Node {
diff --git a/web/chat/robotext-message.react.js b/web/chat/robotext-message.react.js
--- a/web/chat/robotext-message.react.js
+++ b/web/chat/robotext-message.react.js
@@ -35,7 +35,7 @@
type Props = {
+item: RobotextChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function RobotextMessage(props: Props): React.Node {
let inlineEngagement;
diff --git a/web/chat/text-message.react.js b/web/chat/text-message.react.js
--- a/web/chat/text-message.react.js
+++ b/web/chat/text-message.react.js
@@ -9,7 +9,6 @@
import { onlyEmojiRegex } from 'lib/shared/emojis.js';
import { messageTypes } from 'lib/types/message-types-enum.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import css from './chat-message-list.css';
import ComposedMessage from './composed-message.react.js';
@@ -19,7 +18,7 @@
type Props = {
+item: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+shouldDisplayPinIndicator: boolean,
};
function TextMessage(props: Props): React.Node {
diff --git a/web/chat/thread-menu.react.js b/web/chat/thread-menu.react.js
--- a/web/chat/thread-menu.react.js
+++ b/web/chat/thread-menu.react.js
@@ -18,7 +18,6 @@
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './thread-menu.css';
@@ -36,7 +35,7 @@
import { useSelector } from '../redux/redux-utils.js';
type ThreadMenuProps = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function ThreadMenu(props: ThreadMenuProps): React.Node {
diff --git a/web/chat/thread-top-bar.react.js b/web/chat/thread-top-bar.react.js
--- a/web/chat/thread-top-bar.react.js
+++ b/web/chat/thread-top-bar.react.js
@@ -6,7 +6,6 @@
import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
import { threadIsPending } from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import PinnedMessagesBanner from './pinned-messages-banner.react.js';
@@ -18,7 +17,7 @@
import MessageSearchModal from '../modals/search/message-search-modal.react.js';
type ThreadTopBarProps = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function ThreadTopBar(props: ThreadTopBarProps): React.Node {
const { threadInfo } = props;
diff --git a/web/components/message-result.react.js b/web/components/message-result.react.js
--- a/web/components/message-result.react.js
+++ b/web/components/message-result.react.js
@@ -7,7 +7,6 @@
import { useStringForUser } from 'lib/hooks/ens-cache.js';
import type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { longAbsoluteDate } from 'lib/utils/date-utils.js';
import css from './message-result.css';
@@ -17,7 +16,7 @@
type MessageResultProps = {
+item: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+scrollable: boolean,
};
diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js
--- a/web/input/input-state-container.react.js
+++ b/web/input/input-state-container.react.js
@@ -636,8 +636,8 @@
this.cancelPendingUpload(threadID, localUploadID),
sendTextMessage: (
messageInfo: RawTextMessageInfo,
- threadInfo: LegacyThreadInfo | ThreadInfo,
- parentThreadInfo: ?LegacyThreadInfo | ?ThreadInfo,
+ threadInfo: ThreadInfo,
+ parentThreadInfo: ?ThreadInfo,
) =>
this.sendTextMessage(messageInfo, threadInfo, parentThreadInfo),
createMultimediaMessage: (
@@ -1244,8 +1244,8 @@
async sendTextMessage(
messageInfo: RawTextMessageInfo,
- inputThreadInfo: LegacyThreadInfo | ThreadInfo,
- parentThreadInfo: ?LegacyThreadInfo | ?ThreadInfo,
+ inputThreadInfo: ThreadInfo,
+ parentThreadInfo: ?ThreadInfo,
) {
this.props.sendCallbacks.forEach(callback => callback());
diff --git a/web/input/input-state.js b/web/input/input-state.js
--- a/web/input/input-state.js
+++ b/web/input/input-state.js
@@ -70,8 +70,8 @@
+cancelPendingUpload: (localUploadID: string) => void,
+sendTextMessage: (
messageInfo: RawTextMessageInfo,
- threadInfo: LegacyThreadInfo | ThreadInfo,
- parentThreadInfo: ?LegacyThreadInfo | ?ThreadInfo,
+ threadInfo: ThreadInfo,
+ parentThreadInfo: ?ThreadInfo,
) => mixed,
+createMultimediaMessage: (
localID: number,
diff --git a/web/modals/chat/pinned-messages-modal.react.js b/web/modals/chat/pinned-messages-modal.react.js
--- a/web/modals/chat/pinned-messages-modal.react.js
+++ b/web/modals/chat/pinned-messages-modal.react.js
@@ -19,7 +19,6 @@
} from 'lib/shared/message-utils.js';
import type { RawMessageInfo } from 'lib/types/message-types.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { pinnedMessageCountText } from 'lib/utils/message-pinning-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
@@ -30,7 +29,7 @@
import Modal from '../modal.react.js';
type Props = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
const loadingStatusSelector = createLoadingStatusSelector(
diff --git a/web/modals/chat/sidebar-promote-modal.react.js b/web/modals/chat/sidebar-promote-modal.react.js
--- a/web/modals/chat/sidebar-promote-modal.react.js
+++ b/web/modals/chat/sidebar-promote-modal.react.js
@@ -3,7 +3,6 @@
import * as React from 'react';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import css from './sidebar-promote-modal.css';
@@ -13,7 +12,7 @@
type Props = {
+onClose: () => void,
+onConfirm: () => void,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function SidebarPromoteModal(props: Props): React.Node {
diff --git a/web/modals/chat/toggle-pin-modal.react.js b/web/modals/chat/toggle-pin-modal.react.js
--- a/web/modals/chat/toggle-pin-modal.react.js
+++ b/web/modals/chat/toggle-pin-modal.react.js
@@ -12,7 +12,6 @@
import { modifyItemForResultScreen } from 'lib/shared/message-utils.js';
import type { RawMessageInfo } from 'lib/types/message-types.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './toggle-pin-modal.css';
@@ -22,7 +21,7 @@
type TogglePinModalProps = {
+item: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function TogglePinModal(props: TogglePinModalProps): React.Node {
diff --git a/web/modals/search/message-search-modal.react.js b/web/modals/search/message-search-modal.react.js
--- a/web/modals/search/message-search-modal.react.js
+++ b/web/modals/search/message-search-modal.react.js
@@ -5,7 +5,6 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
import type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import css from './message-search-modal.css';
@@ -19,7 +18,7 @@
import Modal from '../modal.react.js';
type ContentProps = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function MessageSearchModal(props: ContentProps): React.Node {
diff --git a/web/modals/threads/confirm-leave-thread-modal.react.js b/web/modals/threads/confirm-leave-thread-modal.react.js
--- a/web/modals/threads/confirm-leave-thread-modal.react.js
+++ b/web/modals/threads/confirm-leave-thread-modal.react.js
@@ -3,7 +3,6 @@
import * as React from 'react';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import css from './confirm-leave-thread-modal.css';
@@ -11,7 +10,7 @@
import Modal from '../modal.react.js';
type Props = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+onClose: () => void,
+onConfirm: () => void,
};
diff --git a/web/modals/threads/create/compose-subchannel-modal.react.js b/web/modals/threads/create/compose-subchannel-modal.react.js
--- a/web/modals/threads/create/compose-subchannel-modal.react.js
+++ b/web/modals/threads/create/compose-subchannel-modal.react.js
@@ -9,7 +9,6 @@
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
@@ -27,7 +26,7 @@
type Props = {
+onClose: () => void,
- +parentThreadInfo: LegacyThreadInfo | ThreadInfo,
+ +parentThreadInfo: ThreadInfo,
};
const getThreadType = (visibility: VisibilityType, announcement: boolean) => {
diff --git a/web/modals/threads/create/steps/subchannel-members.react.js b/web/modals/threads/create/steps/subchannel-members.react.js
--- a/web/modals/threads/create/steps/subchannel-members.react.js
+++ b/web/modals/threads/create/steps/subchannel-members.react.js
@@ -5,14 +5,13 @@
import { useUserSearchIndex } from 'lib/selectors/nav-selectors.js';
import { useAncestorThreads } from 'lib/shared/ancestor-threads.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import MembersList from './subchannel-members-list.react.js';
import css from './subchannel-members.css';
import Search from '../../../../components/search.react.js';
type SubchannelMembersProps = {
- +parentThreadInfo: LegacyThreadInfo | ThreadInfo,
+ +parentThreadInfo: ThreadInfo,
+selectedUsers: $ReadOnlySet<string>,
+searchText: string,
+setSearchText: string => void,
diff --git a/web/modals/threads/thread-picker-modal.react.js b/web/modals/threads/thread-picker-modal.react.js
--- a/web/modals/threads/thread-picker-modal.react.js
+++ b/web/modals/threads/thread-picker-modal.react.js
@@ -6,7 +6,6 @@
import { useGlobalThreadSearchIndex } from 'lib/selectors/nav-selectors.js';
import { onScreenEntryEditableThreadInfos } from 'lib/selectors/thread-selectors.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import css from './thread-picker-modal.css';
@@ -17,7 +16,7 @@
import Modal, { type ModalOverridableProps } from '../modal.react.js';
type OptionProps = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
+createNewEntry: (threadID: string) => void,
+onCloseModal: () => void,
};
diff --git a/web/navigation-panels/chat-thread-ancestors.react.js b/web/navigation-panels/chat-thread-ancestors.react.js
--- a/web/navigation-panels/chat-thread-ancestors.react.js
+++ b/web/navigation-panels/chat-thread-ancestors.react.js
@@ -6,13 +6,12 @@
import { useAncestorThreads } from 'lib/shared/ancestor-threads.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import css from './chat-thread-ancestors.css';
type ThreadAncestorsProps = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function ThreadAncestors(props: ThreadAncestorsProps): React.Node {
const { threadInfo } = props;
diff --git a/web/navigation-panels/nav-state-info-bar.react.js b/web/navigation-panels/nav-state-info-bar.react.js
--- a/web/navigation-panels/nav-state-info-bar.react.js
+++ b/web/navigation-panels/nav-state-info-bar.react.js
@@ -4,14 +4,13 @@
import * as React from 'react';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import ThreadAncestors from './chat-thread-ancestors.react.js';
import css from './nav-state-info-bar.css';
import ThreadAvatar from '../avatars/thread-avatar.react.js';
type NavStateInfoBarProps = {
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function NavStateInfoBar(props: NavStateInfoBarProps): React.Node {
const { threadInfo } = props;
@@ -27,7 +26,7 @@
}
type PossiblyEmptyNavStateInfoBarProps = {
- +threadInfoInput: ?LegacyThreadInfo | ?ThreadInfo,
+ +threadInfoInput: ?ThreadInfo,
};
function PossiblyEmptyNavStateInfoBar(
props: PossiblyEmptyNavStateInfoBarProps,
diff --git a/web/selectors/chat-selectors.js b/web/selectors/chat-selectors.js
--- a/web/selectors/chat-selectors.js
+++ b/web/selectors/chat-selectors.js
@@ -15,7 +15,7 @@
import { threadIsPending } from 'lib/shared/thread-utils.js';
import type { MessageInfo, MessageStore } from 'lib/types/message-types.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyThreadInfo, SidebarInfo } from 'lib/types/thread-types.js';
+import type { SidebarInfo } from 'lib/types/thread-types.js';
import type { AppState } from '../redux/redux-setup.js';
import { useSelector } from '../redux/redux-utils.js';
@@ -30,12 +30,12 @@
sidebarInfoSelector,
(
threadInfos: {
- +[id: string]: LegacyThreadInfo | ThreadInfo,
+ +[id: string]: ThreadInfo,
},
messageStore: MessageStore,
messageInfos: { +[id: string]: ?MessageInfo },
activeChatThreadID: ?string,
- pendingThreadInfo: ?LegacyThreadInfo | ?ThreadInfo,
+ pendingThreadInfo: ?ThreadInfo,
sidebarInfos: { +[id: string]: $ReadOnlyArray<SidebarInfo> },
): ?ChatThreadItem => {
if (!activeChatThreadID) {
@@ -58,9 +58,7 @@
},
);
-function useChatThreadItem(
- threadInfo: ?LegacyThreadInfo | ?ThreadInfo,
-): ?ChatThreadItem {
+function useChatThreadItem(threadInfo: ?ThreadInfo): ?ChatThreadItem {
const messageInfos = useSelector(messageInfoSelector);
const sidebarInfos = useSelector(sidebarInfoSelector);
const messageStore = useSelector(state => state.messageStore);
diff --git a/web/tooltips/tooltip-action-utils.js b/web/tooltips/tooltip-action-utils.js
--- a/web/tooltips/tooltip-action-utils.js
+++ b/web/tooltips/tooltip-action-utils.js
@@ -19,7 +19,6 @@
import { messageTypes } from 'lib/types/message-types-enum.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { longAbsoluteDate } from 'lib/utils/date-utils.js';
import { canToggleMessagePin } from 'lib/utils/message-pinning-utils.js';
@@ -130,7 +129,7 @@
function useMessageTooltipSidebarAction(
item: ChatMessageInfoItem,
- threadInfo: LegacyThreadInfo | ThreadInfo,
+ threadInfo: ThreadInfo,
): ?MessageTooltipAction {
const { threadCreatedFromMessage, messageInfo } = item;
const { popModal } = useModalContext();
@@ -172,7 +171,7 @@
function useMessageTooltipReplyAction(
item: ChatMessageInfoItem,
- threadInfo: LegacyThreadInfo | ThreadInfo,
+ threadInfo: ThreadInfo,
): ?MessageTooltipAction {
const { messageInfo } = item;
const { popModal } = useModalContext();
@@ -237,7 +236,7 @@
function useMessageReactAction(
item: ChatMessageInfoItem,
- threadInfo: LegacyThreadInfo | ThreadInfo,
+ threadInfo: ThreadInfo,
): ?MessageTooltipAction {
const { messageInfo } = item;
@@ -272,7 +271,7 @@
function useMessageTogglePinAction(
item: ChatMessageInfoItem,
- threadInfo: LegacyThreadInfo | ThreadInfo,
+ threadInfo: ThreadInfo,
): ?MessageTooltipAction {
const { pushModal } = useModalContext();
const { messageInfo, isPinned } = item;
@@ -308,7 +307,7 @@
function useMessageEditAction(
item: ChatMessageInfoItem,
- threadInfo: LegacyThreadInfo | ThreadInfo,
+ threadInfo: ThreadInfo,
): ?MessageTooltipAction {
const { messageInfo } = item;
@@ -351,7 +350,7 @@
function useMessageTooltipActions(
item: ChatMessageInfoItem,
- threadInfo: LegacyThreadInfo | ThreadInfo,
+ threadInfo: ThreadInfo,
): $ReadOnlyArray<MessageTooltipAction> {
const sidebarAction = useMessageTooltipSidebarAction(item, threadInfo);
const replyAction = useMessageTooltipReplyAction(item, threadInfo);
@@ -388,7 +387,7 @@
type UseMessageTooltipArgs = {
+availablePositions: $ReadOnlyArray<TooltipPosition>,
+item: ChatMessageInfoItem,
- +threadInfo: LegacyThreadInfo | ThreadInfo,
+ +threadInfo: ThreadInfo,
};
function useMessageTooltip({
diff --git a/web/types/nav-types.js b/web/types/nav-types.js
--- a/web/types/nav-types.js
+++ b/web/types/nav-types.js
@@ -4,7 +4,6 @@
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { type BaseNavInfo } from 'lib/types/nav-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import { legacyThreadInfoValidator } from 'lib/types/thread-types.js';
import {
type AccountUserInfo,
@@ -34,7 +33,7 @@
...$Exact<BaseNavInfo>,
+tab: NavigationTab,
+activeChatThreadID: ?string,
- +pendingThread?: LegacyThreadInfo | ThreadInfo,
+ +pendingThread?: ThreadInfo,
+settingsSection?: NavigationSettingsSection,
+selectedUserList?: $ReadOnlyArray<AccountUserInfo>,
+chatMode?: NavigationChatMode,
diff --git a/web/utils/thread-utils.js b/web/utils/thread-utils.js
--- a/web/utils/thread-utils.js
+++ b/web/utils/thread-utils.js
@@ -12,7 +12,6 @@
} from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
import type { AccountUserInfo } from 'lib/types/user-types.js';
import { useSelector } from '../redux/redux-utils.js';
@@ -40,7 +39,7 @@
function useThreadInfoForPossiblyPendingThread(
activeChatThreadID: ?string,
-): ?LegacyThreadInfo | ?ThreadInfo {
+): ?ThreadInfo {
const { isChatCreation, selectedUserInfos } = useInfosForPendingThread();
const loggedInUserInfo = useLoggedInUserInfo();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 11:36 AM (1 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2702605
Default Alt Text
D10671.id35740.diff (26 KB)
Attached To
Mode
D10671: [web] Remove instances of `LegacyThreadInfo` throughout `web`
Attached
Detach File
Event Timeline
Log In to Comment