Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3374080
D9895.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
36 KB
Referenced Files
None
Subscribers
None
D9895.diff
View Options
diff --git a/native/avatars/edit-thread-avatar.react.js b/native/avatars/edit-thread-avatar.react.js
--- a/native/avatars/edit-thread-avatar.react.js
+++ b/native/avatars/edit-thread-avatar.react.js
@@ -6,6 +6,7 @@
import { ActivityIndicator, TouchableOpacity, View } from 'react-native';
import { EditThreadAvatarContext } from 'lib/components/base-edit-thread-avatar-provider.react.js';
+import type { MinimallyEncodedRawThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { RawThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
import {
@@ -22,7 +23,11 @@
import { useStyles } from '../themes/colors.js';
type Props = {
- +threadInfo: RawThreadInfo | ThreadInfo,
+ +threadInfo:
+ | RawThreadInfo
+ | ThreadInfo
+ | MinimallyEncodedRawThreadInfo
+ | MinimallyEncodedRawThreadInfo,
+disabled?: boolean,
};
function EditThreadAvatar(props: Props): React.Node {
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,6 +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 {
+ MinimallyEncodedRawThreadInfo,
+ MinimallyEncodedThreadInfo,
+} from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import type {
RawThreadInfo,
@@ -19,7 +23,12 @@
import { useSelector } from '../redux/redux-utils.js';
type Props = {
- +threadInfo: RawThreadInfo | ThreadInfo | ResolvedThreadInfo,
+ +threadInfo:
+ | RawThreadInfo
+ | ThreadInfo
+ | ResolvedThreadInfo
+ | MinimallyEncodedRawThreadInfo
+ | MinimallyEncodedThreadInfo,
+size: AvatarSize,
};
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,6 +11,7 @@
} from '@react-navigation/native';
import { StackRouter, CommonActions } from '@react-navigation/native';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { createNavigateToThreadAction } from './message-list-types.js';
@@ -63,9 +64,11 @@
export type ChatRouterNavigationHelpers = {
+clearScreens: (routeNames: $ReadOnlyArray<string>) => void,
- +replaceWithThread: (threadInfo: ThreadInfo) => void,
+ +replaceWithThread: (
+ threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+ ) => void,
+clearThreads: (threadIDs: $ReadOnlyArray<string>) => void,
- +pushNewThread: (threadInfo: ThreadInfo) => void,
+ +pushNewThread: (threadInfo: ThreadInfo | MinimallyEncodedThreadInfo) => void,
};
function ChatRouter(
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
@@ -22,6 +22,7 @@
getThreadListSearchResults,
useThreadListSearch,
} from 'lib/shared/thread-utils.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import type { UserInfo } from 'lib/types/user-types.js';
@@ -66,7 +67,9 @@
+route:
| NavigationRoute<'HomeChatThreadList'>
| NavigationRoute<'BackgroundChatThreadList'>,
- +filterThreads: (threadItem: ThreadInfo) => boolean,
+ +filterThreads: (
+ threadItem: ThreadInfo | MinimallyEncodedThreadInfo,
+ ) => boolean,
+emptyItem?: React.ComponentType<{}>,
};
export type SearchStatus = 'inactive' | 'activating' | 'active';
diff --git a/native/chat/fullscreen-thread-media-gallery.react.js b/native/chat/fullscreen-thread-media-gallery.react.js
--- a/native/chat/fullscreen-thread-media-gallery.react.js
+++ b/native/chat/fullscreen-thread-media-gallery.react.js
@@ -3,6 +3,7 @@
import * as React from 'react';
import { Text, View, TouchableOpacity } from 'react-native';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import type { ChatNavigationProp } from './chat.react.js';
@@ -12,7 +13,7 @@
import type { VerticalBounds } from '../types/layout-types.js';
export type FullScreenThreadMediaGalleryParams = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
};
const Tabs = {
diff --git a/native/chat/inline-engagement.react.js b/native/chat/inline-engagement.react.js
--- a/native/chat/inline-engagement.react.js
+++ b/native/chat/inline-engagement.react.js
@@ -13,6 +13,7 @@
import { getInlineEngagementSidebarText } from 'lib/shared/inline-engagement-utils.js';
import { useNextLocalID } from 'lib/shared/message-utils.js';
import type { MessageInfo } from 'lib/types/message-types.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import {
@@ -32,7 +33,7 @@
import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
function dummyNodeForInlineEngagementHeightMeasurement(
- sidebarInfo: ?ThreadInfo,
+ sidebarInfo: ?ThreadInfo | ?MinimallyEncodedThreadInfo,
reactions: ReactionInfo,
): React.Element<typeof View> {
return (
@@ -48,7 +49,7 @@
type DummyInlineEngagementNodeProps = {
...React.ElementConfig<typeof View>,
+editedLabel?: ?string,
- +sidebarInfo: ?ThreadInfo,
+ +sidebarInfo: ?ThreadInfo | ?MinimallyEncodedThreadInfo,
+reactions: ReactionInfo,
};
function DummyInlineEngagementNode(
diff --git a/native/chat/inner-robotext-message.react.js b/native/chat/inner-robotext-message.react.js
--- a/native/chat/inner-robotext-message.react.js
+++ b/native/chat/inner-robotext-message.react.js
@@ -6,6 +6,7 @@
import type { ReactionInfo } from 'lib/selectors/chat-selectors.js';
import { threadInfoSelector } from 'lib/selectors/thread-selectors.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import {
entityTextToReact,
@@ -26,7 +27,7 @@
function dummyNodeForRobotextMessageHeightMeasurement(
robotext: EntityText,
threadID: string,
- sidebarInfo: ?ThreadInfo,
+ sidebarInfo: ?ThreadInfo | ?MinimallyEncodedThreadInfo,
reactions: ReactionInfo,
): React.Element<typeof View> {
return (
diff --git a/native/chat/inner-text-message.react.js b/native/chat/inner-text-message.react.js
--- a/native/chat/inner-text-message.react.js
+++ b/native/chat/inner-text-message.react.js
@@ -6,6 +6,7 @@
import type { ReactionInfo } from 'lib/selectors/chat-selectors.js';
import { colorIsDark } from 'lib/shared/color-utils.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { useComposedMessageMaxWidth } from './composed-message-width.js';
@@ -33,7 +34,7 @@
function dummyNodeForTextMessageHeightMeasurement(
text: string,
editedLabel?: ?string,
- sidebarInfo: ?ThreadInfo,
+ sidebarInfo: ?ThreadInfo | ?MinimallyEncodedThreadInfo,
reactions: ReactionInfo,
): React.Element<typeof View> {
return (
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
@@ -5,6 +5,7 @@
import * as React from 'react';
import { useThreadChatMentionCandidates } from 'lib/hooks/chat-mention-hooks.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { type UserInfo } from 'lib/types/user-types.js';
@@ -35,7 +36,9 @@
const MessageListContext: React.Context<?MessageListContextType> =
React.createContext<?MessageListContextType>();
-function useMessageListContext(threadInfo: ThreadInfo) {
+function useMessageListContext(
+ threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+) {
const chatMentionCandidates = useThreadChatMentionCandidates(threadInfo);
const getTextMessageMarkdownRules = useTextMessageRulesFunc(
threadInfo,
diff --git a/native/chat/message-list.react.js b/native/chat/message-list.react.js
--- a/native/chat/message-list.react.js
+++ b/native/chat/message-list.react.js
@@ -19,6 +19,7 @@
import { messageKey } from 'lib/shared/message-utils.js';
import { useWatchThread } from 'lib/shared/thread-utils.js';
import type { FetchMessageInfosPayload } from 'lib/types/message-types.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
import {
@@ -55,7 +56,7 @@
import type { ViewableItemsChange } from '../types/react-native.js';
type BaseProps = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+messageListData: $ReadOnlyArray<ChatMessageItemWithHeight>,
+navigation: ChatNavigationProp<'MessageList'>,
+route: NavigationRoute<'MessageList'>,
diff --git a/native/chat/relationship-prompt.react.js b/native/chat/relationship-prompt.react.js
--- a/native/chat/relationship-prompt.react.js
+++ b/native/chat/relationship-prompt.react.js
@@ -5,6 +5,7 @@
import { Text, View } from 'react-native';
import { useRelationshipPrompt } from 'lib/hooks/relationship-prompt.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { userRelationshipStatus } from 'lib/types/relationship-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import type { UserInfo } from 'lib/types/user-types.js';
@@ -15,7 +16,7 @@
type Props = {
+pendingPersonalThreadUserInfo: ?UserInfo,
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
};
const RelationshipPrompt: React.ComponentType<Props> = React.memo<Props>(
diff --git a/native/chat/settings/add-users-modal.react.js b/native/chat/settings/add-users-modal.react.js
--- a/native/chat/settings/add-users-modal.react.js
+++ b/native/chat/settings/add-users-modal.react.js
@@ -16,6 +16,7 @@
} from 'lib/selectors/user-selectors.js';
import { getPotentialMemberItems } from 'lib/shared/search-utils.js';
import { threadActualMembers } from 'lib/shared/thread-utils.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
import { type AccountUserInfo } from 'lib/types/user-types.js';
import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
@@ -42,7 +43,7 @@
export type AddUsersModalParams = {
+presentedFrom: string,
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
};
type Props = {
diff --git a/native/chat/settings/color-selector-modal.react.js b/native/chat/settings/color-selector-modal.react.js
--- a/native/chat/settings/color-selector-modal.react.js
+++ b/native/chat/settings/color-selector-modal.react.js
@@ -8,6 +8,7 @@
changeThreadSettingsActionTypes,
useChangeThreadSettings,
} from 'lib/actions/thread-actions.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import {
type ThreadInfo,
type ChangeThreadSettingsPayload,
@@ -27,7 +28,7 @@
export type ColorSelectorModalParams = {
+presentedFrom: string,
+color: string,
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+setColor: (color: string) => void,
};
diff --git a/native/chat/settings/emoji-thread-avatar-creation.react.js b/native/chat/settings/emoji-thread-avatar-creation.react.js
--- a/native/chat/settings/emoji-thread-avatar-creation.react.js
+++ b/native/chat/settings/emoji-thread-avatar-creation.react.js
@@ -5,6 +5,10 @@
import { EditThreadAvatarContext } from 'lib/components/base-edit-thread-avatar-provider.react.js';
import { savedEmojiAvatarSelectorForThread } from 'lib/selectors/thread-selectors.js';
+import type {
+ MinimallyEncodedRawThreadInfo,
+ MinimallyEncodedThreadInfo,
+} from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { RawThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
import { useNativeSetThreadAvatar } from '../../avatars/avatar-hooks.js';
@@ -15,7 +19,11 @@
import { useSelector } from '../../redux/redux-utils.js';
export type EmojiThreadAvatarCreationParams = {
- +threadInfo: RawThreadInfo | ThreadInfo,
+ +threadInfo:
+ | RawThreadInfo
+ | ThreadInfo
+ | MinimallyEncodedRawThreadInfo
+ | MinimallyEncodedThreadInfo,
};
type Props = {
diff --git a/native/chat/settings/thread-settings-color.react.js b/native/chat/settings/thread-settings-color.react.js
--- a/native/chat/settings/thread-settings-color.react.js
+++ b/native/chat/settings/thread-settings-color.react.js
@@ -6,6 +6,7 @@
import { changeThreadSettingsActionTypes } 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 { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
import type { ThreadSettingsNavigate } from './thread-settings.react.js';
@@ -16,7 +17,7 @@
import { type Colors, useColors, useStyles } from '../../themes/colors.js';
type BaseProps = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+colorEditValue: string,
+setColorEditValue: (color: string) => void,
+canChangeSettings: boolean,
diff --git a/native/chat/settings/thread-settings-description.react.js b/native/chat/settings/thread-settings-description.react.js
--- a/native/chat/settings/thread-settings-description.react.js
+++ b/native/chat/settings/thread-settings-description.react.js
@@ -16,6 +16,7 @@
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import { threadHasPermission } from 'lib/shared/thread-utils.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import {
type ThreadInfo,
@@ -45,7 +46,7 @@
import Alert from '../../utils/alert.js';
type BaseProps = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+descriptionEditValue: ?string,
+setDescriptionEditValue: (value: ?string, callback?: () => void) => void,
+descriptionTextHeight: ?number,
diff --git a/native/chat/settings/thread-settings-edit-relationship.react.js b/native/chat/settings/thread-settings-edit-relationship.react.js
--- a/native/chat/settings/thread-settings-edit-relationship.react.js
+++ b/native/chat/settings/thread-settings-edit-relationship.react.js
@@ -14,6 +14,7 @@
getRelationshipDispatchAction,
} from 'lib/shared/relationship-utils.js';
import { getSingleOtherUser } from 'lib/shared/thread-utils.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import {
type RelationshipAction,
type RelationshipButton,
@@ -31,7 +32,7 @@
import Alert from '../../utils/alert.js';
type Props = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+buttonStyle: ViewStyle,
+relationshipButton: RelationshipButton,
};
diff --git a/native/chat/settings/thread-settings-home-notifs.react.js b/native/chat/settings/thread-settings-home-notifs.react.js
--- a/native/chat/settings/thread-settings-home-notifs.react.js
+++ b/native/chat/settings/thread-settings-home-notifs.react.js
@@ -7,6 +7,7 @@
updateSubscriptionActionTypes,
useUpdateSubscription,
} from 'lib/actions/user-actions.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type {
SubscriptionUpdateRequest,
SubscriptionUpdateResult,
@@ -19,7 +20,7 @@
import { useStyles } from '../../themes/colors.js';
type BaseProps = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
};
type Props = {
...BaseProps,
diff --git a/native/chat/settings/thread-settings-leave-thread.react.js b/native/chat/settings/thread-settings-leave-thread.react.js
--- a/native/chat/settings/thread-settings-leave-thread.react.js
+++ b/native/chat/settings/thread-settings-leave-thread.react.js
@@ -13,6 +13,7 @@
import { otherUsersButNoOtherAdmins } from 'lib/selectors/thread-selectors.js';
import { identifyInvalidatedThreads } from 'lib/shared/thread-utils.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo, LeaveThreadPayload } from 'lib/types/thread-types.js';
import {
type DispatchActionPromise,
@@ -31,7 +32,7 @@
import Alert from '../../utils/alert.js';
type BaseProps = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+buttonStyle: ViewStyle,
};
type Props = {
diff --git a/native/chat/settings/thread-settings-parent.react.js b/native/chat/settings/thread-settings-parent.react.js
--- a/native/chat/settings/thread-settings-parent.react.js
+++ b/native/chat/settings/thread-settings-parent.react.js
@@ -3,6 +3,7 @@
import * as React from 'react';
import { Text, View } from 'react-native';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
import ThreadAvatar from '../../avatars/thread-avatar.react.js';
@@ -34,7 +35,7 @@
}
type ThreadSettingsParentProps = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+parentThreadInfo: ?ThreadInfo,
};
function ThreadSettingsParent(props: ThreadSettingsParentProps): React.Node {
diff --git a/native/chat/settings/thread-settings-promote-sidebar.react.js b/native/chat/settings/thread-settings-promote-sidebar.react.js
--- a/native/chat/settings/thread-settings-promote-sidebar.react.js
+++ b/native/chat/settings/thread-settings-promote-sidebar.react.js
@@ -5,6 +5,7 @@
import { usePromoteSidebar } from 'lib/hooks/promote-sidebar.react.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import Button from '../../components/button.react.js';
@@ -13,7 +14,7 @@
import Alert from '../../utils/alert.js';
type BaseProps = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+buttonStyle: ViewStyle,
};
type Props = {
diff --git a/native/chat/settings/thread-settings-push-notifs.react.js b/native/chat/settings/thread-settings-push-notifs.react.js
--- a/native/chat/settings/thread-settings-push-notifs.react.js
+++ b/native/chat/settings/thread-settings-push-notifs.react.js
@@ -9,6 +9,7 @@
useUpdateSubscription,
} from 'lib/actions/user-actions.js';
import { deviceTokenSelector } from 'lib/selectors/keyserver-selectors.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type {
SubscriptionUpdateRequest,
SubscriptionUpdateResult,
@@ -28,7 +29,7 @@
import Alert from '../../utils/alert.js';
type BaseProps = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
};
type Props = {
...BaseProps,
diff --git a/native/chat/settings/thread-settings-visibility.react.js b/native/chat/settings/thread-settings-visibility.react.js
--- a/native/chat/settings/thread-settings-visibility.react.js
+++ b/native/chat/settings/thread-settings-visibility.react.js
@@ -3,13 +3,14 @@
import * as React from 'react';
import { Text, View } from 'react-native';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import ThreadVisibility from '../../components/thread-visibility.react.js';
import { useStyles, useColors } from '../../themes/colors.js';
type Props = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
};
function ThreadSettingsVisibility(props: Props): React.Node {
const styles = useStyles(unboundStyles);
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
@@ -28,6 +28,7 @@
threadIsChannel,
} from 'lib/shared/thread-utils.js';
import threadWatcher from 'lib/shared/thread-watcher.js';
+import type { MinimallyEncodedThreadInfo } 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';
@@ -213,7 +214,7 @@
| {
+itemType: 'mediaGallery',
+key: string,
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+limit: number,
+verticalBounds: ?VerticalBounds,
}
@@ -668,7 +669,10 @@
mediaGalleryListDataSelector = createSelector(
(propsAndState: PropsAndState) => propsAndState.threadInfo,
(propsAndState: PropsAndState) => propsAndState.verticalBounds,
- (threadInfo: ThreadInfo, verticalBounds: ?VerticalBounds) => {
+ (
+ threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+ verticalBounds: ?VerticalBounds,
+ ) => {
const listData: ChatSettingsItem[] = [];
const limit = 6;
diff --git a/native/components/community-actions-button.react.js b/native/components/community-actions-button.react.js
--- a/native/components/community-actions-button.react.js
+++ b/native/components/community-actions-button.react.js
@@ -8,6 +8,7 @@
import { primaryInviteLinksSelector } from 'lib/selectors/invite-links-selectors.js';
import { threadHasPermission } from 'lib/shared/thread-utils.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
@@ -23,7 +24,7 @@
import { useStyles } from '../themes/colors.js';
type Props = {
- +community: ThreadInfo,
+ +community: ThreadInfo | MinimallyEncodedThreadInfo,
};
function CommunityActionsButton(props: Props): React.Node {
diff --git a/native/components/thread-ancestors-label.react.js b/native/components/thread-ancestors-label.react.js
--- a/native/components/thread-ancestors-label.react.js
+++ b/native/components/thread-ancestors-label.react.js
@@ -5,13 +5,14 @@
import { Text, View } from 'react-native';
import { useAncestorThreads } from 'lib/shared/ancestor-threads.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfos } from 'lib/utils/entity-helpers.js';
import { useColors, useStyles } from '../themes/colors.js';
type Props = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
};
function ThreadAncestorsLabel(props: Props): React.Node {
const { threadInfo } = props;
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,6 +6,7 @@
import { ScrollView } from 'react-native-gesture-handler';
import { ancestorThreadInfos } from 'lib/selectors/thread-selectors.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import Button from './button.react.js';
@@ -16,7 +17,7 @@
import { useColors, useStyles } from '../themes/colors.js';
type Props = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
};
function ThreadAncestors(props: Props): React.Node {
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,6 +6,7 @@
import { createSelector } from 'reselect';
import SearchIndex from 'lib/shared/search-index.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import Search from './search.react.js';
@@ -94,7 +95,9 @@
);
}
- static keyExtractor = (threadInfo: ThreadInfo) => {
+ static keyExtractor = (
+ threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+ ) => {
return threadInfo.id;
};
@@ -109,7 +112,10 @@
);
};
- static getItemLayout = (data: ?$ReadOnlyArray<ThreadInfo>, index: number) => {
+ static getItemLayout = (
+ data: ?$ReadOnlyArray<ThreadInfo | MinimallyEncodedThreadInfo>,
+ index: number,
+ ) => {
return { length: 24, offset: 24 * index, index };
};
diff --git a/native/invite-links/manage-public-link-screen.react.js b/native/invite-links/manage-public-link-screen.react.js
--- a/native/invite-links/manage-public-link-screen.react.js
+++ b/native/invite-links/manage-public-link-screen.react.js
@@ -10,6 +10,7 @@
defaultErrorMessage,
inviteLinkErrorMessages,
} from 'lib/shared/invite-links.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import Button from '../components/button.react.js';
@@ -21,7 +22,7 @@
import Alert from '../utils/alert.js';
export type ManagePublicLinkScreenParams = {
- +community: ThreadInfo,
+ +community: ThreadInfo | MinimallyEncodedThreadInfo,
};
type Props = {
diff --git a/native/invite-links/view-invite-links-screen.react.js b/native/invite-links/view-invite-links-screen.react.js
--- a/native/invite-links/view-invite-links-screen.react.js
+++ b/native/invite-links/view-invite-links-screen.react.js
@@ -9,6 +9,7 @@
import { primaryInviteLinksSelector } from 'lib/selectors/invite-links-selectors.js';
import { threadHasPermission } from 'lib/shared/thread-utils.js';
import type { InviteLink } from 'lib/types/link-types.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
@@ -24,7 +25,7 @@
import { useStyles, useColors } from '../themes/colors.js';
export type ViewInviteLinksScreenParams = {
- +community: ThreadInfo,
+ +community: ThreadInfo | MinimallyEncodedThreadInfo,
};
type Props = {
diff --git a/native/markdown/rules.react.js b/native/markdown/rules.react.js
--- a/native/markdown/rules.react.js
+++ b/native/markdown/rules.react.js
@@ -7,6 +7,10 @@
import * as SharedMarkdown from 'lib/shared/markdown.js';
import { chatMentionRegex } from 'lib/shared/mention-utils.js';
+import type {
+ MinimallyEncodedRelativeMemberInfo,
+ MinimallyEncodedThreadInfo,
+} from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type {
RelativeMemberInfo,
ThreadInfo,
@@ -359,7 +363,7 @@
});
function useTextMessageRulesFunc(
- threadInfo: ThreadInfo,
+ threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
chatMentionCandidates: ChatMentionCandidates,
): (useDarkStyle: boolean) => MarkdownRules {
const { members } = threadInfo;
@@ -373,7 +377,9 @@
}
function textMessageRules(
- members: $ReadOnlyArray<RelativeMemberInfo>,
+ members: $ReadOnlyArray<
+ RelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
+ >,
chatMentionCandidates: ChatMentionCandidates,
useDarkStyle: boolean,
): MarkdownRules {
diff --git a/native/media/media-gallery-keyboard.react.js b/native/media/media-gallery-keyboard.react.js
--- a/native/media/media-gallery-keyboard.react.js
+++ b/native/media/media-gallery-keyboard.react.js
@@ -22,6 +22,7 @@
} from 'lib/media/file-utils.js';
import { useIsAppForegrounded } from 'lib/shared/lifecycle-utils.js';
import type { MediaLibrarySelection } from 'lib/types/media-types.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { getCompatibleMediaURI } from './identifier-utils.js';
@@ -45,7 +46,7 @@
};
type BaseProps = {
- +threadInfo: ?ThreadInfo,
+ +threadInfo: ?ThreadInfo | ?MinimallyEncodedThreadInfo,
};
type Props = {
...BaseProps,
diff --git a/native/navigation/nav-selectors.js b/native/navigation/nav-selectors.js
--- a/native/navigation/nav-selectors.js
+++ b/native/navigation/nav-selectors.js
@@ -15,6 +15,7 @@
ComposableMessageInfo,
RobotextMessageInfo,
} from 'lib/types/message-types.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { GlobalTheme } from 'lib/types/theme-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
@@ -399,7 +400,7 @@
}
function useCanEditMessageNative(
- threadInfo: ThreadInfo,
+ threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
targetMessageInfo: ComposableMessageInfo | RobotextMessageInfo,
): boolean {
const route = useRoute();
diff --git a/native/navigation/subchannels-button.react.js b/native/navigation/subchannels-button.react.js
--- a/native/navigation/subchannels-button.react.js
+++ b/native/navigation/subchannels-button.react.js
@@ -5,13 +5,14 @@
import * as React from 'react';
import { TouchableOpacity, Text, View } from 'react-native';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { SubchannelsListModalRouteName } from './route-names.js';
import { useStyles } from '../themes/colors.js';
type Props = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
};
function SubchnnelsButton(props: Props): React.Node {
diff --git a/native/roles/change-roles-screen.react.js b/native/roles/change-roles-screen.react.js
--- a/native/roles/change-roles-screen.react.js
+++ b/native/roles/change-roles-screen.react.js
@@ -12,6 +12,10 @@
import { otherUsersButNoOtherAdmins } from 'lib/selectors/thread-selectors.js';
import { roleIsAdminRole } from 'lib/shared/thread-utils.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
+import type {
+ MinimallyEncodedRelativeMemberInfo,
+ MinimallyEncodedThreadInfo,
+} from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { RelativeMemberInfo, ThreadInfo } from 'lib/types/thread-types.js';
import { values } from 'lib/utils/objects.js';
@@ -24,8 +28,8 @@
import { useStyles } from '../themes/colors.js';
export type ChangeRolesScreenParams = {
- +threadInfo: ThreadInfo,
- +memberInfo: RelativeMemberInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+ +memberInfo: RelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
+role: ?string,
};
diff --git a/native/roles/create-roles-screen.react.js b/native/roles/create-roles-screen.react.js
--- a/native/roles/create-roles-screen.react.js
+++ b/native/roles/create-roles-screen.react.js
@@ -7,6 +7,7 @@
import { modifyCommunityRoleActionTypes } 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 { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import {
type UserSurfacedPermissionOption,
type UserSurfacedPermission,
@@ -24,7 +25,7 @@
import { useStyles } from '../themes/colors.js';
export type CreateRolesScreenParams = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+action: 'create_role' | 'edit_role',
+existingRoleID?: string,
+roleName: string,
diff --git a/native/roles/role-panel-entry.react.js b/native/roles/role-panel-entry.react.js
--- a/native/roles/role-panel-entry.react.js
+++ b/native/roles/role-panel-entry.react.js
@@ -6,6 +6,7 @@
import { View, Text, TouchableOpacity, Platform } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { UserSurfacedPermission } from 'lib/types/thread-permission-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
@@ -19,7 +20,7 @@
type RolePanelEntryProps = {
+navigation: RolesNavigationProp<'CommunityRolesScreen'>,
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+roleName: string,
+rolePermissions: $ReadOnlySet<UserSurfacedPermission>,
+memberCount: number,
diff --git a/native/roles/role-utils.react.js b/native/roles/role-utils.react.js
--- a/native/roles/role-utils.react.js
+++ b/native/roles/role-utils.react.js
@@ -6,6 +6,7 @@
useDeleteCommunityRole,
deleteCommunityRoleActionTypes,
} from 'lib/actions/thread-actions.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import { constructRoleDeletionMessagePrompt } from 'lib/utils/role-utils.js';
@@ -13,7 +14,7 @@
import Alert from '../utils/alert.js';
function useDisplayDeleteRoleAlert(
- threadInfo: ThreadInfo,
+ threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
existingRoleID: string,
defaultRoleID: string,
memberCount: number,
diff --git a/native/user-profile/user-profile-menu-button.react.js b/native/user-profile/user-profile-menu-button.react.js
--- a/native/user-profile/user-profile-menu-button.react.js
+++ b/native/user-profile/user-profile-menu-button.react.js
@@ -6,6 +6,7 @@
import { View, TouchableOpacity } from 'react-native';
import { useRelationshipPrompt } from 'lib/hooks/relationship-prompt.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { userRelationshipStatus } from 'lib/types/relationship-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import type { UserInfo } from 'lib/types/user-types';
@@ -21,7 +22,7 @@
const onMenuButtonLayout = () => {};
type Props = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+pendingPersonalThreadUserInfo: ?UserInfo,
};
diff --git a/native/user-profile/user-profile-relationship-button.react.js b/native/user-profile/user-profile-relationship-button.react.js
--- a/native/user-profile/user-profile-relationship-button.react.js
+++ b/native/user-profile/user-profile-relationship-button.react.js
@@ -5,6 +5,7 @@
import { useRelationshipPrompt } from 'lib/hooks/relationship-prompt.js';
import type { SetState } from 'lib/types/hook-types.js';
+import type { MinimallyEncodedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { userRelationshipStatus } from 'lib/types/relationship-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import type { UserInfo } from 'lib/types/user-types';
@@ -19,7 +20,7 @@
};
type Props = {
- +threadInfo: ThreadInfo,
+ +threadInfo: ThreadInfo | MinimallyEncodedThreadInfo,
+pendingPersonalThreadUserInfo?: UserInfo,
+setUserProfileRelationshipButtonHeight: SetState<number>,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 1:42 PM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2585677
Default Alt Text
D9895.diff (36 KB)
Attached To
Mode
D9895: [native] Update misc parts of `native` to support `MinimallyEncodedThreadInfo`
Attached
Detach File
Event Timeline
Log In to Comment