Page MenuHomePhabricator

D10127.diff
No OneTemporary

D10127.diff

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
@@ -45,10 +45,7 @@
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 LegacyThreadInfo,
- type ResolvedThreadInfo,
-} from 'lib/types/thread-types.js';
+import type { ResolvedThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
import {
useDispatchActionPromise,
type DispatchActionPromise,
@@ -191,7 +188,7 @@
};
type BaseProps = {
...SharedProps,
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
};
type Props = {
...SharedProps,
diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js
--- a/native/chat/chat-input-bar.react.js
+++ b/native/chat/chat-input-bar.react.js
@@ -74,7 +74,6 @@
import type { Dispatch } from 'lib/types/redux-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import type {
- LegacyThreadInfo,
ClientThreadJoinRequest,
ThreadJoinPayload,
ChatMentionCandidates,
@@ -299,7 +298,7 @@
+userMentionsCandidates: $ReadOnlyArray<RelativeMemberInfo>,
+chatMentionSearchIndex: SentencePrefixSearchIndex,
+chatMentionCandidates: ChatMentionCandidates,
- +parentThreadInfo: ?LegacyThreadInfo,
+ +parentThreadInfo: ?ThreadInfo,
+editedMessagePreview: ?MessagePreviewResult,
+editedMessageInfo: ?MessageInfo,
+editMessage: (
diff --git a/native/chat/chat-router.js b/native/chat/chat-router.js
--- a/native/chat/chat-router.js
+++ b/native/chat/chat-router.js
@@ -11,7 +11,7 @@
} from '@react-navigation/core';
import { StackRouter, CommonActions } from '@react-navigation/native';
-import type { LegacyThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import { createNavigateToThreadAction } from './message-list-types.js';
import {
@@ -39,7 +39,7 @@
type ReplaceWithThreadAction = {
+type: 'REPLACE_WITH_THREAD',
+payload: {
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
},
};
type ClearThreadsAction = {
@@ -51,7 +51,7 @@
type PushNewThreadAction = {
+type: 'PUSH_NEW_THREAD',
+payload: {
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
},
};
export type ChatRouterNavigationAction =
@@ -159,7 +159,7 @@
routeNames,
},
}),
- replaceWithThread: (threadInfo: LegacyThreadInfo) =>
+ replaceWithThread: (threadInfo: ThreadInfo) =>
({
type: replaceWithThreadActionType,
payload: { threadInfo },
@@ -168,7 +168,7 @@
type: clearThreadsActionType,
payload: { threadIDs },
}),
- pushNewThread: (threadInfo: LegacyThreadInfo) =>
+ pushNewThread: (threadInfo: ThreadInfo) =>
({
type: pushNewThreadActionType,
payload: { threadInfo },
diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js
--- a/native/chat/chat-thread-list.react.js
+++ b/native/chat/chat-thread-list.react.js
@@ -126,7 +126,7 @@
);
const onSwipeableWillOpen = React.useCallback(
- (threadInfo: LegacyThreadInfo) => setOpenedSwipeableID(threadInfo.id),
+ (threadInfo: ThreadInfo) => setOpenedSwipeableID(threadInfo.id),
[],
);
@@ -175,10 +175,7 @@
const searchInputRef = React.useRef<?React.ElementRef<typeof TextInput>>();
const onPressItem = React.useCallback(
- (
- threadInfo: LegacyThreadInfo,
- pendingPersonalThreadUserInfo?: UserInfo,
- ) => {
+ (threadInfo: ThreadInfo, pendingPersonalThreadUserInfo?: UserInfo) => {
onChangeSearchText('');
if (searchInputRef.current) {
searchInputRef.current.blur();
diff --git a/native/chat/compose-subchannel.react.js b/native/chat/compose-subchannel.react.js
--- a/native/chat/compose-subchannel.react.js
+++ b/native/chat/compose-subchannel.react.js
@@ -229,7 +229,7 @@
}
return _flow(
_filter(
- (threadInfo: LegacyThreadInfo) =>
+ (threadInfo: ThreadInfo) =>
threadInFilterList(threadInfo) &&
threadInfo.parentThreadID === parentThreadInfo.id &&
userInfoInputIDs.every(userID => userIsMember(threadInfo, userID)),
@@ -237,10 +237,8 @@
_sortBy(
([
'members.length',
- (threadInfo: LegacyThreadInfo) => (threadInfo.name ? 1 : 0),
- ]: $ReadOnlyArray<
- string | ((threadInfo: LegacyThreadInfo) => mixed),
- >),
+ (threadInfo: ThreadInfo) => (threadInfo.name ? 1 : 0),
+ ]: $ReadOnlyArray<string | ((threadInfo: ThreadInfo) => mixed)>),
),
)(threadInfos);
}, [userInfoInputIDs, threadInfos, parentThreadInfo]);
diff --git a/native/chat/failed-send.react.js b/native/chat/failed-send.react.js
--- a/native/chat/failed-send.react.js
+++ b/native/chat/failed-send.react.js
@@ -9,7 +9,7 @@
import { messageTypes } from 'lib/types/message-types-enum.js';
import { assertComposableRawMessage } from 'lib/types/message-types.js';
import type { RawComposableMessageInfo } from 'lib/types/message-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import { multimediaMessageSendFailed } from './multimedia-message-utils.js';
import textMessageSendFailed from './text-message-send-failed.js';
@@ -46,7 +46,7 @@
+rawMessageInfo: ?RawComposableMessageInfo,
+styles: $ReadOnly<typeof unboundStyles>,
+inputState: ?InputState,
- +parentThreadInfo: ?LegacyThreadInfo,
+ +parentThreadInfo: ?ThreadInfo,
};
class FailedSend extends React.PureComponent<Props> {
retryingText = false;
diff --git a/native/chat/message-list-types.js b/native/chat/message-list-types.js
--- a/native/chat/message-list-types.js
+++ b/native/chat/message-list-types.js
@@ -6,7 +6,7 @@
import * as React from 'react';
import { useThreadChatMentionCandidates } from 'lib/hooks/chat-mention-hooks.js';
-import type { LegacyThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import { type UserInfo } from 'lib/types/user-types.js';
import { ChatContext } from './chat-context.js';
@@ -95,7 +95,7 @@
}
function useNavigateToThreadWithFadeAnimation(
- threadInfo: LegacyThreadInfo,
+ threadInfo: ThreadInfo,
messageKey: ?string,
): () => mixed {
const chatContext = React.useContext(ChatContext);
diff --git a/native/chat/message-preview.react.js b/native/chat/message-preview.react.js
--- a/native/chat/message-preview.react.js
+++ b/native/chat/message-preview.react.js
@@ -7,7 +7,7 @@
import { useThreadChatMentionCandidates } from 'lib/hooks/chat-mention-hooks.js';
import { useMessagePreview } from 'lib/shared/message-utils.js';
import { type MessageInfo } from 'lib/types/message-types.js';
-import { type LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import SingleLine from '../components/single-line.react.js';
import { getDefaultTextMessageRules } from '../markdown/rules.react.js';
@@ -15,7 +15,7 @@
type Props = {
+messageInfo: MessageInfo,
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
};
function MessagePreview(props: Props): React.Node {
const { messageInfo, threadInfo } = props;
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
@@ -38,7 +38,6 @@
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import {
- type LegacyThreadInfo,
type ResolvedThreadInfo,
type RelativeMemberInfo,
type ThreadInfo,
@@ -1164,7 +1163,7 @@
);
const threadID = props.route.params.threadInfo.id;
- const reduxThreadInfo: ?LegacyThreadInfo = useSelector(
+ const reduxThreadInfo: ?ThreadInfo = useSelector(
state => threadInfoSelector(state)[threadID],
);
React.useEffect(() => {
@@ -1196,7 +1195,7 @@
}, [threadInfo]);
const parentThreadID = threadInfo.parentThreadID;
- const parentThreadInfo: ?LegacyThreadInfo = useSelector(state =>
+ const parentThreadInfo: ?ThreadInfo = useSelector(state =>
parentThreadID ? threadInfoSelector(state)[parentThreadID] : null,
);
const resolvedParentThreadInfo =
diff --git a/native/chat/thread-list-modal.react.js b/native/chat/thread-list-modal.react.js
--- a/native/chat/thread-list-modal.react.js
+++ b/native/chat/thread-list-modal.react.js
@@ -13,7 +13,11 @@
import type { ThreadSearchState } from 'lib/hooks/search-threads.js';
import type { ChatThreadItem } from 'lib/selectors/chat-selectors.js';
import type { SetState } from 'lib/types/hook-types.js';
-import type { LegacyThreadInfo, SidebarInfo } from 'lib/types/thread-types.js';
+import type {
+ LegacyThreadInfo,
+ SidebarInfo,
+ ThreadInfo,
+} from 'lib/types/thread-types.js';
import { useNavigateToThread } from './message-list-types.js';
import Modal from '../components/modal.react.js';
@@ -34,7 +38,7 @@
}
type Props<U> = {
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
+createRenderItem: (
onPressItem: (threadInfo: LegacyThreadInfo) => void,
) => (row: {
@@ -81,7 +85,7 @@
const navigateToThread = useNavigateToThread();
const onPressItem = React.useCallback(
- (threadInfo: LegacyThreadInfo) => {
+ (threadInfo: ThreadInfo) => {
setSearchState({
text: '',
results: new Set(),
diff --git a/native/chat/toggle-pin-modal.react.js b/native/chat/toggle-pin-modal.react.js
--- a/native/chat/toggle-pin-modal.react.js
+++ b/native/chat/toggle-pin-modal.react.js
@@ -9,7 +9,7 @@
toggleMessagePinActionTypes,
} from 'lib/actions/message-actions.js';
import type { RawMessageInfo } from 'lib/types/message-types.js';
-import { type LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import MessageResult from './message-result.react.js';
@@ -22,7 +22,7 @@
export type TogglePinModalParams = {
+item: ChatMessageInfoItemWithHeight,
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
};
type TogglePinModalProps = {
diff --git a/native/components/thread-ancestors.react.js b/native/components/thread-ancestors.react.js
--- a/native/components/thread-ancestors.react.js
+++ b/native/components/thread-ancestors.react.js
@@ -6,7 +6,7 @@
import { ScrollView } from 'react-native-gesture-handler';
import { ancestorThreadInfos } from 'lib/selectors/thread-selectors.js';
-import type { LegacyThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import Button from './button.react.js';
import CommunityPill from './community-pill.react.js';
@@ -24,7 +24,7 @@
const styles = useStyles(unboundStyles);
const colors = useColors();
- const ancestorThreads: $ReadOnlyArray<LegacyThreadInfo> = useSelector(
+ const ancestorThreads: $ReadOnlyArray<ThreadInfo> = useSelector(
ancestorThreadInfos(threadInfo.id),
);
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
@@ -3,10 +3,7 @@
import * as React from 'react';
import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type {
- LegacyThreadInfo,
- ResolvedThreadInfo,
-} 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';
@@ -37,7 +34,7 @@
};
type BaseProps = {
...SharedProps,
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
};
type Props = {
...SharedProps,
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
@@ -105,7 +105,7 @@
return threadInfo.id;
};
- renderItem = (row: { +item: LegacyThreadInfo, ... }): React.Node => {
+ renderItem = (row: { +item: ThreadInfo, ... }): React.Node => {
return (
<ThreadListThread
threadInfo={row.item}
diff --git a/native/push/push-handler.react.js b/native/push/push-handler.react.js
--- a/native/push/push-handler.react.js
+++ b/native/push/push-handler.react.js
@@ -31,7 +31,7 @@
import type { Dispatch } from 'lib/types/redux-types.js';
import { type ConnectionInfo } from 'lib/types/socket-types.js';
import type { GlobalTheme } from 'lib/types/theme-types.js';
-import { type LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { LegacyThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
import {
useDispatchActionPromise,
type DispatchActionPromise,
@@ -521,7 +521,7 @@
);
}
- navigateToThread(threadInfo: LegacyThreadInfo, clearChatRoutes: boolean) {
+ navigateToThread(threadInfo: ThreadInfo, clearChatRoutes: boolean) {
if (clearChatRoutes) {
this.props.navigation.dispatch({
type: replaceWithThreadActionType,
diff --git a/native/user-profile/user-profile-message-button.react.js b/native/user-profile/user-profile-message-button.react.js
--- a/native/user-profile/user-profile-message-button.react.js
+++ b/native/user-profile/user-profile-message-button.react.js
@@ -4,7 +4,7 @@
import * as React from 'react';
import { Text } from 'react-native';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import type { UserInfo } from 'lib/types/user-types';
import { useNavigateToThread } from '../chat/message-list-types.js';
@@ -13,7 +13,7 @@
import { useStyles } from '../themes/colors.js';
type Props = {
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
+pendingPersonalThreadUserInfo?: UserInfo,
};

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 8:09 AM (6 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596392
Default Alt Text
D10127.diff (14 KB)

Event Timeline