Page MenuHomePhabricator

D10655.id36042.diff
No OneTemporary

D10655.id36042.diff

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,13 +5,16 @@
import genesis from '../facts/genesis.js';
import { threadInfoSelector } from '../selectors/thread-selectors.js';
import SentencePrefixSearchIndex from '../shared/sentence-prefix-search-index.js';
-import type { ThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js';
+import type {
+ MinimallyEncodedResolvedThreadInfo,
+ ThreadInfo,
+} from '../types/minimally-encoded-thread-permissions-types.js';
import { threadTypes } from '../types/thread-types-enum.js';
import type {
ChatMentionCandidate,
ChatMentionCandidatesObj,
+ LegacyResolvedThreadInfo,
LegacyThreadInfo,
- ResolvedThreadInfo,
} from '../types/thread-types.js';
import { useResolvedThreadInfosObj } from '../utils/entity-helpers.js';
import { getNameForThreadEntity } from '../utils/entity-text.js';
@@ -75,7 +78,11 @@
function getChatMentionCandidates(
threadInfos: { +[id: string]: LegacyThreadInfo | ThreadInfo },
- resolvedThreadInfos: { +[id: string]: ResolvedThreadInfo },
+ resolvedThreadInfos: {
+ +[id: string]:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+ },
): {
chatMentionCandidatesObj: ChatMentionCandidatesObj,
communityThreadIDForGenesisThreads: { +[id: string]: string },
@@ -211,7 +218,11 @@
function useChatMentionCandidatesObjAndUtils(): {
chatMentionCandidatesObj: ChatMentionCandidatesObj,
- resolvedThreadInfos: { +[id: string]: ResolvedThreadInfo },
+ resolvedThreadInfos: {
+ +[id: string]:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+ },
communityThreadIDForGenesisThreads: { +[id: string]: string },
} {
const threadInfos = useSelector(threadInfoSelector);
diff --git a/lib/shared/markdown.js b/lib/shared/markdown.js
--- a/lib/shared/markdown.js
+++ b/lib/shared/markdown.js
@@ -8,10 +8,11 @@
decodeChatMentionText,
} from './mention-utils.js';
import { useENSNames } from '../hooks/ens-cache.js';
+import type { MinimallyEncodedResolvedThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js';
import type {
ChatMentionCandidates,
+ LegacyResolvedThreadInfo,
RelativeMemberInfo,
- ResolvedThreadInfo,
} from '../types/thread-types.js';
// simple-markdown types
@@ -285,7 +286,7 @@
chatMentionCandidates: ChatMentionCandidates,
capture: Capture,
): {
- threadInfo: ?ResolvedThreadInfo,
+ threadInfo: ?(LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo),
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
@@ -7,13 +7,16 @@
import { stringForUserExplicit } from './user-utils.js';
import { useENSNames } from '../hooks/ens-cache.js';
import { useUserSearchIndex } from '../selectors/nav-selectors.js';
-import type { ThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js';
+import type {
+ MinimallyEncodedResolvedThreadInfo,
+ ThreadInfo,
+} from '../types/minimally-encoded-thread-permissions-types.js';
import { threadTypes } from '../types/thread-types-enum.js';
import type {
ChatMentionCandidates,
+ LegacyResolvedThreadInfo,
LegacyThreadInfo,
RelativeMemberInfo,
- ResolvedThreadInfo,
} from '../types/thread-types.js';
import { chatNameMaxLength, idSchemaRegex } from '../utils/validation-utils.js';
@@ -34,7 +37,7 @@
type MentionTypeaheadChatSuggestionItem = {
+type: 'chat',
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
};
export type MentionTypeaheadSuggestionItem =
@@ -74,7 +77,9 @@
return text.replace(/\\]/g, ']');
}
-function getRawChatMention(threadInfo: ResolvedThreadInfo): string {
+function getRawChatMention(
+ threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+): 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,8 @@
getRawChatMention,
renderChatMentionsWithAltText,
} from './mention-utils.js';
-import type { ResolvedThreadInfo } from '../types/thread-types.js';
+import type { MinimallyEncodedResolvedThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js';
+import type { LegacyResolvedThreadInfo } from '../types/thread-types.js';
describe('encodeChatMentionText', () => {
it('should encode closing brackets', () => {
@@ -36,7 +37,9 @@
it('should return raw chat mention', () =>
expect(
getRawChatMention({
- ...(({}: any): ResolvedThreadInfo),
+ ...(({}: any):
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo),
id: '256|123',
uiName: 'thread-name',
}),
@@ -45,7 +48,9 @@
it('should return raw chat mention with encoded text', () =>
expect(
getRawChatMention({
- ...(({}: any): ResolvedThreadInfo),
+ ...(({}: any):
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo),
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,7 +2,8 @@
import t, { type TUnion } from 'tcomb';
-import type { ResolvedThreadInfo } from './thread-types.js';
+import type { MinimallyEncodedResolvedThreadInfo } from './minimally-encoded-thread-permissions-types.js';
+import type { LegacyResolvedThreadInfo } from './thread-types.js';
import { tID, tShape, tString } from '../utils/validation-utils.js';
export const calendarThreadFilterTypes = Object.freeze({
@@ -41,6 +42,6 @@
};
export type FilterThreadInfo = {
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+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
@@ -211,10 +211,6 @@
+pinnedCount?: number,
};
-export type ResolvedThreadInfo =
- | LegacyResolvedThreadInfo
- | MinimallyEncodedResolvedThreadInfo;
-
export type ServerMemberInfo = {
+id: string,
+role: ?string,
@@ -491,7 +487,7 @@
export type ThreadStoreThreadInfos = LegacyRawThreadInfos;
export type ChatMentionCandidate = {
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+rawChatName: string | ThreadEntity,
};
export type 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
@@ -6,12 +6,13 @@
import { threadInFilterList, threadIsChannel } from '../shared/thread-utils.js';
import type {
ThreadInfo,
+ MinimallyEncodedResolvedThreadInfo,
RawThreadInfo,
} from '../types/minimally-encoded-thread-permissions-types.js';
import { communitySubthreads } from '../types/thread-types-enum.js';
import type {
+ LegacyResolvedThreadInfo,
LegacyThreadInfo,
- ResolvedThreadInfo,
} from '../types/thread-types.js';
type WritableCommunityDrawerItemData<T> = {
@@ -28,7 +29,9 @@
childThreadInfosMap: {
+[id: string]: $ReadOnlyArray<ThreadInfo>,
},
- communities: $ReadOnlyArray<ResolvedThreadInfo>,
+ communities: $ReadOnlyArray<
+ LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+ >,
labelStyles: $ReadOnlyArray<LabelStyleType>,
maxDepth: number,
): $ReadOnlyArray<CommunityDrawerItemData<LabelStyleType>> {
@@ -80,10 +83,17 @@
}
function useAppendCommunitySuffix(
- communities: $ReadOnlyArray<ResolvedThreadInfo>,
-): $ReadOnlyArray<ResolvedThreadInfo> {
+ communities: $ReadOnlyArray<
+ LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+ >,
+): $ReadOnlyArray<
+ LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+> {
return React.useMemo(() => {
- const result: ResolvedThreadInfo[] = [];
+ const result: (
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo
+ )[] = [];
const names = new Map<string, number>();
for (const chat of communities) {
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,17 +9,22 @@
useENSNamesForEntityText,
} from './entity-text.js';
import type { UseENSNamesOptions } from '../hooks/ens-cache.js';
-import type { ThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js';
import type {
+ MinimallyEncodedResolvedThreadInfo,
+ ThreadInfo,
+} from '../types/minimally-encoded-thread-permissions-types.js';
+import type {
+ LegacyResolvedThreadInfo,
LegacyThreadInfo,
- ResolvedThreadInfo,
} from '../types/thread-types.js';
import { values } from '../utils/objects.js';
function useResolvedThreadInfos(
threadInfos: $ReadOnlyArray<LegacyThreadInfo | ThreadInfo>,
options?: ?UseENSNamesOptions,
-): $ReadOnlyArray<ResolvedThreadInfo> {
+): $ReadOnlyArray<
+ LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+> {
const entityText = React.useMemo(
() => threadInfos.map(threadInfo => threadInfo.uiName),
[threadInfos],
@@ -57,7 +62,9 @@
function useResolvedOptionalThreadInfos(
threadInfos: ?$ReadOnlyArray<LegacyThreadInfo | ThreadInfo>,
-): ?$ReadOnlyArray<ResolvedThreadInfo> {
+): ?$ReadOnlyArray<
+ LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+> {
const entityText = React.useMemo(() => {
if (!threadInfos) {
return null;
@@ -96,7 +103,7 @@
},
options?: ?UseENSNamesOptions,
): {
- +[id: string]: ResolvedThreadInfo,
+ +[id: string]: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
} {
const threadInfosArray = React.useMemo(
() => values(threadInfosObj),
@@ -108,7 +115,7 @@
);
return React.useMemo(() => {
const obj: {
- [string]: ResolvedThreadInfo,
+ [string]: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
} = {};
for (const resolvedThreadInfo of resolvedThreadInfosArray) {
obj[resolvedThreadInfo.id] = resolvedThreadInfo;
@@ -119,7 +126,7 @@
function useResolvedThreadInfo(
threadInfo: LegacyThreadInfo | ThreadInfo,
-): ResolvedThreadInfo {
+): LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo {
const resolutionInput = React.useMemo(() => [threadInfo], [threadInfo]);
const [resolvedThreadInfo] = useResolvedThreadInfos(resolutionInput);
return resolvedThreadInfo;
@@ -127,7 +134,7 @@
function useResolvedOptionalThreadInfo(
threadInfo: ?LegacyThreadInfo | ?ThreadInfo,
-): ?ResolvedThreadInfo {
+): ?(LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo) {
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
@@ -10,12 +10,13 @@
import type { AvatarSize } from 'lib/types/avatar-types.js';
import type {
ThreadInfo,
+ MinimallyEncodedResolvedThreadInfo,
RawThreadInfo,
} from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import type {
+ LegacyResolvedThreadInfo,
LegacyThreadInfo,
- ResolvedThreadInfo,
} from 'lib/types/thread-types.js';
import Avatar from './avatar.react.js';
@@ -26,7 +27,8 @@
| RawThreadInfo
| LegacyThreadInfo
| ThreadInfo
- | ResolvedThreadInfo,
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+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,12 +42,15 @@
SaveEntryResult,
} from 'lib/types/entry-types.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
-import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
+import type {
+ MinimallyEncodedResolvedThreadInfo,
+ ThreadInfo,
+} 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,
LegacyThreadInfo,
- ResolvedThreadInfo,
} from 'lib/types/thread-types.js';
import { dateString } from 'lib/utils/date-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
@@ -195,7 +198,7 @@
};
type Props = {
...SharedProps,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
// 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,14 @@
identifyInvalidatedThreads,
} from 'lib/shared/thread-utils.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
-import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
+import type {
+ MinimallyEncodedResolvedThreadInfo,
+ ThreadInfo,
+} from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type {
LeaveThreadPayload,
+ LegacyResolvedThreadInfo,
LegacyThreadInfo,
- ResolvedThreadInfo,
} from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import {
@@ -115,7 +118,7 @@
type Props = {
...BaseProps,
// Redux state
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+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,13 +3,14 @@
import * as React from 'react';
import { View } from 'react-native';
-import type { ResolvedThreadInfo } from 'lib/types/thread-types.js';
+import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
+import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js';
import EditThreadAvatar from '../../avatars/edit-thread-avatar.react.js';
import { useStyles } from '../../themes/colors.js';
type Props = {
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+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,7 +3,8 @@
import * as React from 'react';
import { Text, View } from 'react-native';
-import type { ResolvedThreadInfo } from 'lib/types/thread-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 { ThreadSettingsNavigate } from './thread-settings.react.js';
import Button from '../../components/button.react.js';
@@ -12,7 +13,7 @@
import type { ViewStyle } from '../../types/styles.js';
type Props = {
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+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,10 +15,11 @@
} 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 {
ChangeThreadSettingsPayload,
+ LegacyResolvedThreadInfo,
UpdateThreadRequest,
- ResolvedThreadInfo,
} from 'lib/types/thread-types.js';
import {
useDispatchActionPromise,
@@ -61,7 +62,7 @@
};
type BaseProps = {
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+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,17 @@
viewerIsMember,
} from 'lib/shared/thread-utils.js';
import threadWatcher from 'lib/shared/thread-watcher.js';
-import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
+import type {
+ MinimallyEncodedResolvedThreadInfo,
+ ThreadInfo,
+} 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,
LegacyThreadInfo,
RelativeMemberInfo,
- ResolvedThreadInfo,
} from 'lib/types/thread-types.js';
import type { UserInfos } from 'lib/types/user-types.js';
import {
@@ -137,20 +140,26 @@
| {
+itemType: 'avatar',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+canChangeSettings: boolean,
}
| {
+itemType: 'name',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+nameEditValue: ?string,
+canChangeSettings: boolean,
}
| {
+itemType: 'color',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+colorEditValue: string,
+canChangeSettings: boolean,
+navigate: ThreadSettingsNavigate,
@@ -159,7 +168,9 @@
| {
+itemType: 'description',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+descriptionEditValue: ?string,
+descriptionTextHeight: ?number,
+canChangeSettings: boolean,
@@ -167,23 +178,34 @@
| {
+itemType: 'parent',
+key: string,
- +threadInfo: ResolvedThreadInfo,
- +parentThreadInfo: ?ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+ +parentThreadInfo: ?(
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo
+ ),
}
| {
+itemType: 'visibility',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
}
| {
+itemType: 'pushNotifs',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
}
| {
+itemType: 'homeNotifs',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
}
| {
+itemType: 'seeMore',
@@ -193,7 +215,9 @@
| {
+itemType: 'childThread',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+firstListItem: boolean,
+lastListItem: boolean,
}
@@ -205,7 +229,9 @@
+itemType: 'member',
+key: string,
+memberInfo: RelativeMemberInfo,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+canEdit: boolean,
+navigate: ThreadSettingsNavigate,
+firstListItem: boolean,
@@ -227,14 +253,18 @@
| {
+itemType: 'promoteSidebar' | 'leaveThread' | 'deleteThread',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+navigate: ThreadSettingsNavigate,
+buttonStyle: ViewStyle,
}
| {
+itemType: 'editRelationship',
+key: string,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+navigate: ThreadSettingsNavigate,
+buttonStyle: ViewStyle,
+relationshipButton: RelationshipButton,
@@ -266,9 +296,14 @@
// Redux state
+userInfos: UserInfos,
+viewerID: ?string,
- +threadInfo: ResolvedThreadInfo,
- +parentThreadInfo: ?ResolvedThreadInfo,
- +childThreadInfos: ?$ReadOnlyArray<ResolvedThreadInfo>,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+ +parentThreadInfo: ?(
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo
+ ),
+ +childThreadInfos: ?$ReadOnlyArray<
+ LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+ >,
+somethingIsSaving: boolean,
+styles: $ReadOnly<typeof unboundStyles>,
+indicatorStyle: IndicatorStyle,
@@ -346,8 +381,13 @@
(propsAndState: PropsAndState) => propsAndState.navigation.navigate,
(propsAndState: PropsAndState) => propsAndState.route.key,
(
- threadInfo: ResolvedThreadInfo,
- parentThreadInfo: ?ResolvedThreadInfo,
+ threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+ parentThreadInfo: ?(
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo
+ ),
nameEditValue: ?string,
colorEditValue: string,
descriptionEditValue: ?string,
@@ -502,9 +542,13 @@
(propsAndState: PropsAndState) => propsAndState.childThreadInfos,
(propsAndState: PropsAndState) => propsAndState.numSubchannelsShowing,
(
- threadInfo: ResolvedThreadInfo,
+ threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
navigate: ThreadSettingsNavigate,
- childThreads: ?$ReadOnlyArray<ResolvedThreadInfo>,
+ childThreads: ?$ReadOnlyArray<
+ LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+ >,
numSubchannelsShowing: number,
) => {
const listData: ChatSettingsItem[] = [];
@@ -569,7 +613,9 @@
(propsAndState: PropsAndState) => propsAndState.numSidebarsShowing,
(
navigate: ThreadSettingsNavigate,
- childThreads: ?$ReadOnlyArray<ResolvedThreadInfo>,
+ childThreads: ?$ReadOnlyArray<
+ LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+ >,
numSidebarsShowing: number,
) => {
const listData: ChatSettingsItem[] = [];
@@ -628,7 +674,9 @@
(propsAndState: PropsAndState) => propsAndState.numMembersShowing,
(propsAndState: PropsAndState) => propsAndState.verticalBounds,
(
- threadInfo: ResolvedThreadInfo,
+ threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
canStartEditing: boolean,
navigate: ThreadSettingsNavigate,
routeKey: string,
@@ -741,8 +789,13 @@
(propsAndState: PropsAndState) => propsAndState.userInfos,
(propsAndState: PropsAndState) => propsAndState.viewerID,
(
- threadInfo: ResolvedThreadInfo,
- parentThreadInfo: ?ResolvedThreadInfo,
+ threadInfo:
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo,
+ parentThreadInfo: ?(
+ | LegacyResolvedThreadInfo
+ | MinimallyEncodedResolvedThreadInfo
+ ),
navigate: ThreadSettingsNavigate,
styles: $ReadOnly<typeof unboundStyles>,
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,10 +2,13 @@
import * as React from 'react';
-import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import type {
+ MinimallyEncodedResolvedThreadInfo,
+ ThreadInfo,
+} from 'lib/types/minimally-encoded-thread-permissions-types.js';
+import type {
+ LegacyResolvedThreadInfo,
LegacyThreadInfo,
- ResolvedThreadInfo,
} from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
@@ -41,7 +44,7 @@
};
type Props = {
...SharedProps,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+colors: Colors,
+styles: $ReadOnly<typeof unboundStyles>,
};
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,15 @@
import * as React from 'react';
import { Text, StyleSheet } from 'react-native';
-import type { ResolvedThreadInfo } from 'lib/types/thread-types.js';
+import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
+import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js';
import { useMarkdownOnPressUtils } from './markdown-utils.js';
import { useNavigateToThreadWithFadeAnimation } from '../chat/message-list-types.js';
type TextProps = React.ElementConfig<typeof Text>;
type Props = {
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+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
@@ -14,8 +14,8 @@
concurrentModificationResetActionType,
} from 'lib/actions/entry-actions.js';
import {
- useModalContext,
type PushModal,
+ useModalContext,
} from 'lib/components/modal-provider.react.js';
import { connectionSelector } from 'lib/selectors/keyserver-selectors.js';
import { threadInfoSelector } from 'lib/selectors/thread-selectors.js';
@@ -34,9 +34,10 @@
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 { ResolvedThreadInfo } from 'lib/types/thread-types.js';
+import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js';
import { dateString } from 'lib/utils/date-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import { ServerError } from 'lib/utils/errors.js';
@@ -64,7 +65,7 @@
};
type Props = {
...BaseProps,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+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,13 +2,14 @@
import * as React from 'react';
-import type { ResolvedThreadInfo } from 'lib/types/thread-types.js';
+import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
+import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js';
import css from './markdown.css';
import { useOnClickThread } from '../selectors/thread-selectors.js';
type MarkdownChatMentionProps = {
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+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,7 +20,8 @@
type RestoreEntryPayload,
} from 'lib/types/entry-types.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
-import type { ResolvedThreadInfo } from 'lib/types/thread-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 { UserInfo } from 'lib/types/user-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import {
@@ -40,7 +41,7 @@
};
type Props = {
...BaseProps,
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
+loggedIn: boolean,
+restoreLoadingStatus: LoadingStatus,
+calendarQuery: () => CalendarQuery,
diff --git a/web/navigation-sidebar/community-list-item.react.js b/web/navigation-sidebar/community-list-item.react.js
--- a/web/navigation-sidebar/community-list-item.react.js
+++ b/web/navigation-sidebar/community-list-item.react.js
@@ -3,7 +3,8 @@
import * as React from 'react';
import { unreadCountSelectorForCommunity } from 'lib/selectors/thread-selectors.js';
-import type { ResolvedThreadInfo } from 'lib/types/thread-types.js';
+import type { MinimallyEncodedResolvedThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
+import type { LegacyResolvedThreadInfo } from 'lib/types/thread-types.js';
import css from './community-list-item.css';
import { navigationSidebarLabelTooltipMargin } from './navigation-sidebar-constants.js';
@@ -14,7 +15,7 @@
import { tooltipPositions } from '../tooltips/tooltip-utils.js';
type Props = {
- +threadInfo: ResolvedThreadInfo,
+ +threadInfo: LegacyResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo,
};
function CommunityListItem(props: Props): React.Node {

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 3:40 PM (18 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2430711
Default Alt Text
D10655.id36042.diff (30 KB)

Event Timeline