Page MenuHomePhabricator

D10728.diff
No OneTemporary

D10728.diff

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
@@ -82,7 +82,6 @@
import type {
ChatMentionCandidates,
ClientThreadJoinRequest,
- LegacyRelativeMemberInfo,
ThreadJoinPayload,
} from 'lib/types/thread-types.js';
import { type UserInfos } from 'lib/types/user-types.js';
@@ -297,9 +296,7 @@
+dispatchActionPromise: DispatchActionPromise,
+joinThread: (request: ClientThreadJoinRequest) => Promise<ThreadJoinPayload>,
+inputState: ?InputState,
- +userMentionsCandidates: $ReadOnlyArray<
- LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
- >,
+ +userMentionsCandidates: $ReadOnlyArray<MinimallyEncodedRelativeMemberInfo>,
+chatMentionSearchIndex: SentencePrefixSearchIndex,
+chatMentionCandidates: ChatMentionCandidates,
+parentThreadInfo: ?ThreadInfo,
diff --git a/native/chat/settings/thread-settings-member-tooltip-modal.react.js b/native/chat/settings/thread-settings-member-tooltip-modal.react.js
--- a/native/chat/settings/thread-settings-member-tooltip-modal.react.js
+++ b/native/chat/settings/thread-settings-member-tooltip-modal.react.js
@@ -9,7 +9,6 @@
MinimallyEncodedRelativeMemberInfo,
ThreadInfo,
} from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyRelativeMemberInfo } from 'lib/types/thread-types.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import ThreadSettingsMemberTooltipButton from './thread-settings-member-tooltip-button.react.js';
@@ -25,7 +24,7 @@
import Alert from '../../utils/alert.js';
export type ThreadSettingsMemberTooltipModalParams = TooltipParams<{
- +memberInfo: LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
+ +memberInfo: MinimallyEncodedRelativeMemberInfo,
+threadInfo: ThreadInfo,
}>;
diff --git a/native/chat/settings/thread-settings-member.react.js b/native/chat/settings/thread-settings-member.react.js
--- a/native/chat/settings/thread-settings-member.react.js
+++ b/native/chat/settings/thread-settings-member.react.js
@@ -23,7 +23,6 @@
MinimallyEncodedRelativeMemberInfo,
ThreadInfo,
} from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyRelativeMemberInfo } from 'lib/types/thread-types.js';
import { useRolesFromCommunityThreadInfo } from 'lib/utils/role-utils.js';
import type { ThreadSettingsNavigate } from './thread-settings.react.js';
@@ -90,7 +89,7 @@
};
type BaseProps = {
- +memberInfo: LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
+ +memberInfo: MinimallyEncodedRelativeMemberInfo,
+threadInfo: ThreadInfo,
+canEdit: boolean,
+navigate: ThreadSettingsNavigate,
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
@@ -41,7 +41,6 @@
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 { LegacyRelativeMemberInfo } from 'lib/types/thread-types.js';
import type { UserInfos } from 'lib/types/user-types.js';
import {
useResolvedOptionalThreadInfo,
@@ -204,9 +203,7 @@
| {
+itemType: 'member',
+key: string,
- +memberInfo:
- | LegacyRelativeMemberInfo
- | MinimallyEncodedRelativeMemberInfo,
+ +memberInfo: MinimallyEncodedRelativeMemberInfo,
+threadInfo: ResolvedThreadInfo,
+canEdit: boolean,
+navigate: ThreadSettingsNavigate,
@@ -1126,9 +1123,7 @@
const threadMembersChangeIsSaving = (
state: AppState,
- threadMembers: $ReadOnlyArray<
- LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
- >,
+ threadMembers: $ReadOnlyArray<MinimallyEncodedRelativeMemberInfo>,
) => {
for (const threadMember of threadMembers) {
const removeUserLoadingStatus = createLoadingStatusSelector(
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
@@ -16,7 +16,6 @@
MinimallyEncodedRelativeMemberInfo,
ThreadInfo,
} from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyRelativeMemberInfo } from 'lib/types/thread-types.js';
import { values } from 'lib/utils/objects.js';
import ChangeRolesHeaderRightButton from './change-roles-header-right-button.react.js';
@@ -29,7 +28,7 @@
export type ChangeRolesScreenParams = {
+threadInfo: ThreadInfo,
- +memberInfo: LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
+ +memberInfo: MinimallyEncodedRelativeMemberInfo,
+role: ?string,
};
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
@@ -13,10 +13,7 @@
MinimallyEncodedRelativeMemberInfo,
ThreadInfo,
} from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type {
- ChatMentionCandidates,
- LegacyRelativeMemberInfo,
-} from 'lib/types/thread-types.js';
+import type { ChatMentionCandidates } from 'lib/types/thread-types.js';
export type PendingMultimediaUpload = {
+localID: string,
@@ -50,9 +47,7 @@
export type TypeaheadState = {
+canBeVisible: boolean,
+keepUpdatingThreadMembers: boolean,
- +frozenUserMentionsCandidates: $ReadOnlyArray<
- LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
- >,
+ +frozenUserMentionsCandidates: $ReadOnlyArray<MinimallyEncodedRelativeMemberInfo>,
+frozenChatMentionsCandidates: ChatMentionCandidates,
+moveChoiceUp: ?() => void,
+moveChoiceDown: ?() => void,
diff --git a/web/modals/threads/create/steps/subchannel-members-list.react.js b/web/modals/threads/create/steps/subchannel-members-list.react.js
--- a/web/modals/threads/create/steps/subchannel-members-list.react.js
+++ b/web/modals/threads/create/steps/subchannel-members-list.react.js
@@ -8,7 +8,6 @@
MinimallyEncodedRelativeMemberInfo,
ThreadInfo,
} from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyRelativeMemberInfo } from 'lib/types/thread-types.js';
import type { UserListItem } from 'lib/types/user-types.js';
import { useSelector } from '../../../../redux/redux-utils.js';
@@ -43,11 +42,7 @@
);
const filterOutParentMembersWithENSNames = React.useCallback(
- (
- members: $ReadOnlyArray<
- LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
- >,
- ) =>
+ (members: $ReadOnlyArray<MinimallyEncodedRelativeMemberInfo>) =>
members
.filter(
user =>
@@ -68,11 +63,7 @@
);
const filterOutOtherMembersWithENSNames = React.useCallback(
- (
- members: $ReadOnlyArray<
- LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
- >,
- ) =>
+ (members: $ReadOnlyArray<MinimallyEncodedRelativeMemberInfo>) =>
members
.filter(
user =>
diff --git a/web/modals/threads/members/change-member-role-modal.react.js b/web/modals/threads/members/change-member-role-modal.react.js
--- a/web/modals/threads/members/change-member-role-modal.react.js
+++ b/web/modals/threads/members/change-member-role-modal.react.js
@@ -15,7 +15,6 @@
MinimallyEncodedRelativeMemberInfo,
ThreadInfo,
} from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyRelativeMemberInfo } from 'lib/types/thread-types';
import { values } from 'lib/utils/objects.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
@@ -28,7 +27,7 @@
import UnsavedChangesModal from '../../unsaved-changes-modal.react.js';
type ChangeMemberRoleModalProps = {
- +memberInfo: LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
+ +memberInfo: MinimallyEncodedRelativeMemberInfo,
+threadInfo: ThreadInfo,
};
diff --git a/web/modals/threads/members/member.react.js b/web/modals/threads/members/member.react.js
--- a/web/modals/threads/members/member.react.js
+++ b/web/modals/threads/members/member.react.js
@@ -15,7 +15,6 @@
MinimallyEncodedRelativeMemberInfo,
ThreadInfo,
} from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyRelativeMemberInfo } from 'lib/types/thread-types.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useRolesFromCommunityThreadInfo } from 'lib/utils/role-utils.js';
@@ -31,7 +30,7 @@
const commIconComponent = <CommIcon size={18} icon="user-edit" />;
type Props = {
- +memberInfo: LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
+ +memberInfo: MinimallyEncodedRelativeMemberInfo,
+threadInfo: ThreadInfo,
+setOpenMenu: SetState<?string>,
};
diff --git a/web/modals/threads/members/members-list.react.js b/web/modals/threads/members/members-list.react.js
--- a/web/modals/threads/members/members-list.react.js
+++ b/web/modals/threads/members/members-list.react.js
@@ -11,16 +11,13 @@
MinimallyEncodedRelativeMemberInfo,
ThreadInfo,
} from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import type { LegacyRelativeMemberInfo } from 'lib/types/thread-types.js';
import ThreadMember from './member.react.js';
import css from './members-modal.css';
type Props = {
+threadInfo: ThreadInfo,
- +threadMembers: $ReadOnlyArray<
- LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
- >,
+ +threadMembers: $ReadOnlyArray<MinimallyEncodedRelativeMemberInfo>,
};
function ThreadMembersList(props: Props): React.Node {
@@ -45,20 +42,14 @@
.map(([letter, users]) => {
const userList = users
.sort((a, b) => stringForUser(a).localeCompare(stringForUser(b)))
- .map(
- (
- user:
- | LegacyRelativeMemberInfo
- | MinimallyEncodedRelativeMemberInfo,
- ) => (
- <ThreadMember
- key={user.id}
- memberInfo={user}
- threadInfo={threadInfo}
- setOpenMenu={setOpenMenu}
- />
- ),
- );
+ .map((user: MinimallyEncodedRelativeMemberInfo) => (
+ <ThreadMember
+ key={user.id}
+ memberInfo={user}
+ threadInfo={threadInfo}
+ setOpenMenu={setOpenMenu}
+ />
+ ));
const letterHeader = (
<h5 className={css.memberletterHeader} key={letter}>
{letter.toUpperCase()}
diff --git a/web/modals/threads/members/members-modal.react.js b/web/modals/threads/members/members-modal.react.js
--- a/web/modals/threads/members/members-modal.react.js
+++ b/web/modals/threads/members/members-modal.react.js
@@ -11,7 +11,6 @@
} from 'lib/shared/thread-utils.js';
import type { MinimallyEncodedRelativeMemberInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
-import type { LegacyRelativeMemberInfo } from 'lib/types/thread-types.js';
import { useRolesFromCommunityThreadInfo } from 'lib/utils/role-utils.js';
import { AddMembersModal } from './add-members-modal.react.js';
@@ -56,9 +55,8 @@
const allMembers = React.useMemo(
() =>
threadMembersNotFiltered.filter(
- (
- member: LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
- ) => searchText.length === 0 || userIDs.includes(member.id),
+ (member: MinimallyEncodedRelativeMemberInfo) =>
+ searchText.length === 0 || userIDs.includes(member.id),
),
[searchText.length, threadMembersNotFiltered, userIDs],
);
@@ -66,10 +64,8 @@
const roles = useRolesFromCommunityThreadInfo(threadInfo, allMembers);
const adminMembers = React.useMemo(
() =>
- allMembers.filter(
- (
- member: LegacyRelativeMemberInfo | MinimallyEncodedRelativeMemberInfo,
- ) => roleIsAdminRole(roles.get(member.id)),
+ allMembers.filter((member: MinimallyEncodedRelativeMemberInfo) =>
+ roleIsAdminRole(roles.get(member.id)),
),
[allMembers, roles],
);

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 11:49 AM (20 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2430853
Default Alt Text
D10728.diff (12 KB)

Event Timeline