Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33311555
D10139.1768811904.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D10139.1768811904.diff
View Options
diff --git a/native/calendar/calendar.react.js b/native/calendar/calendar.react.js
--- a/native/calendar/calendar.react.js
+++ b/native/calendar/calendar.react.js
@@ -36,7 +36,7 @@
import type { CalendarFilter } from 'lib/types/filter-types.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { ConnectionStatus } from 'lib/types/socket-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import {
useDispatchActionPromise,
type DispatchActionPromise,
@@ -114,7 +114,7 @@
| {
itemType: 'entryInfo',
entryInfo: EntryInfoWithHeight,
- threadInfo: LegacyThreadInfo,
+ threadInfo: ThreadInfo,
};
type ExtraData = {
+activeEntries: { +[key: string]: boolean },
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,7 +6,7 @@
import { createSelector } from 'reselect';
import SearchIndex from 'lib/shared/search-index.js';
-import type { LegacyThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import Search from './search.react.js';
import ThreadListThread from './thread-list-thread.react.js';
@@ -25,7 +25,7 @@
};
type BaseProps = {
- +threadInfos: $ReadOnlyArray<LegacyThreadInfo>,
+ +threadInfos: $ReadOnlyArray<ThreadInfo>,
+onSelect: (threadID: string) => void,
+itemStyle?: ViewStyle,
+itemTextStyle?: TextStyle,
@@ -49,7 +49,7 @@
};
textInput: ?React.ElementRef<typeof TextInput>;
- listDataSelector: PropsAndState => $ReadOnlyArray<LegacyThreadInfo> =
+ listDataSelector: PropsAndState => $ReadOnlyArray<ThreadInfo> =
createSelector(
(propsAndState: PropsAndState) => propsAndState.threadInfos,
(propsAndState: PropsAndState) => propsAndState.searchText,
@@ -57,10 +57,10 @@
(propsAndState: PropsAndState) => propsAndState.itemStyle,
(propsAndState: PropsAndState) => propsAndState.itemTextStyle,
(
- threadInfos: $ReadOnlyArray<LegacyThreadInfo>,
+ threadInfos: $ReadOnlyArray<ThreadInfo>,
text: string,
searchResults: Set<string>,
- ): $ReadOnlyArray<LegacyThreadInfo> =>
+ ): $ReadOnlyArray<ThreadInfo> =>
text
? threadInfos.filter(threadInfo => searchResults.has(threadInfo.id))
: // We spread to make sure the result of this selector updates when
@@ -68,7 +68,7 @@
[...threadInfos],
);
- get listData(): $ReadOnlyArray<LegacyThreadInfo> {
+ get listData(): $ReadOnlyArray<ThreadInfo> {
return this.listDataSelector({ ...this.props, ...this.state });
}
diff --git a/native/keyboard/keyboard-input-host.react.js b/native/keyboard/keyboard-input-host.react.js
--- a/native/keyboard/keyboard-input-host.react.js
+++ b/native/keyboard/keyboard-input-host.react.js
@@ -6,7 +6,7 @@
import { KeyboardAccessoryView } from 'react-native-keyboard-input';
import type { MediaLibrarySelection } from 'lib/types/media-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import { type KeyboardState, KeyboardContext } from './keyboard-state.js';
import { type InputState, InputStateContext } from '../input/input-state.js';
@@ -75,7 +75,7 @@
keyboardName: string,
result: {
+selections: $ReadOnlyArray<MediaLibrarySelection>,
- +threadInfo: ?LegacyThreadInfo,
+ +threadInfo: ?ThreadInfo,
},
) => {
const { keyboardState } = this.props;
diff --git a/native/roles/community-roles-screen.react.js b/native/roles/community-roles-screen.react.js
--- a/native/roles/community-roles-screen.react.js
+++ b/native/roles/community-roles-screen.react.js
@@ -9,7 +9,7 @@
useRoleMemberCountsForCommunity,
useRoleUserSurfacedPermissions,
} from 'lib/shared/thread-utils.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import RolePanelEntry from './role-panel-entry.react.js';
import type { RolesNavigationProp } from './roles-navigator.react.js';
@@ -20,7 +20,7 @@
import { useStyles } from '../themes/colors.js';
export type CommunityRolesScreenParams = {
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
};
type CommunityRolesScreenProps = {
@@ -37,7 +37,7 @@
// manually pull in the threadInfo from the redux store, since the threadInfo
// passed into the route params will not be updated automatically.
const threadID = threadInfo.id;
- const reduxThreadInfo: ?LegacyThreadInfo = useSelector(
+ const reduxThreadInfo: ?ThreadInfo = useSelector(
state => threadInfoSelector(state)[threadID],
);
diff --git a/web/roles/community-roles-modal.react.js b/web/roles/community-roles-modal.react.js
--- a/web/roles/community-roles-modal.react.js
+++ b/web/roles/community-roles-modal.react.js
@@ -6,7 +6,7 @@
import { threadInfoSelector } from 'lib/selectors/thread-selectors.js';
import { useRoleMemberCountsForCommunity } from 'lib/shared/thread-utils.js';
import type { UserSurfacedPermission } from 'lib/types/thread-permission-types.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import css from './community-roles-modal.css';
import CreateRolesModal from './create-roles-modal.react.js';
@@ -16,17 +16,16 @@
import { useSelector } from '../redux/redux-utils.js';
type CommunityRolesModalProps = {
- +community: LegacyThreadInfo,
+ +community: ThreadInfo,
};
function CommunityRolesModal(props: CommunityRolesModalProps): React.Node {
const { popModal, pushModal } = useModalContext();
const { community } = props;
- const [threadInfo, setThreadInfo] =
- React.useState<LegacyThreadInfo>(community);
+ const [threadInfo, setThreadInfo] = React.useState<ThreadInfo>(community);
const threadID = threadInfo.id;
- const reduxThreadInfo: ?LegacyThreadInfo = useSelector(
+ const reduxThreadInfo: ?ThreadInfo = useSelector(
state => threadInfoSelector(state)[threadID],
);
diff --git a/web/roles/role-actions-menu.react.js b/web/roles/role-actions-menu.react.js
--- a/web/roles/role-actions-menu.react.js
+++ b/web/roles/role-actions-menu.react.js
@@ -6,7 +6,7 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
import { useRoleUserSurfacedPermissions } from 'lib/shared/thread-utils.js';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import { useRoleDeletableAndEditableStatus } from 'lib/utils/role-utils.js';
import CreateRolesModal from './create-roles-modal.react.js';
@@ -18,7 +18,7 @@
const menuIcon = <SWMansionIcon icon="menu-horizontal" size={20} />;
type RoleActionsMenuProps = {
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
+roleName: string,
};
diff --git a/web/roles/role-panel-entry.react.js b/web/roles/role-panel-entry.react.js
--- a/web/roles/role-panel-entry.react.js
+++ b/web/roles/role-panel-entry.react.js
@@ -2,14 +2,14 @@
import * as React from 'react';
-import type { LegacyThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadInfo } from 'lib/types/thread-types.js';
import RoleActionsMenu from './role-actions-menu.react.js';
import css from './role-panel-entry.css';
import CommIcon from '../CommIcon.react.js';
type RolePanelEntryProps = {
- +threadInfo: LegacyThreadInfo,
+ +threadInfo: ThreadInfo,
+roleName: string,
+memberCount: number,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 8:38 AM (15 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5955445
Default Alt Text
D10139.1768811904.diff (7 KB)
Attached To
Mode
D10139: [native][web] Remove `LegacyThreadInfo` where possible after updating `useRoleUserSurfacedPermissions`
Attached
Detach File
Event Timeline
Log In to Comment