Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3358363
D6467.id22417.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D6467.id22417.diff
View Options
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
@@ -60,6 +60,7 @@
ThreadSettingsAddMember,
ThreadSettingsAddSubchannel,
} from './thread-settings-list-action.react.js';
+import ThreadSettingsMediaGallery from './thread-settings-media-gallery.react.js';
import ThreadSettingsMember from './thread-settings-member.react.js';
import ThreadSettingsName from './thread-settings-name.react.js';
import ThreadSettingsParent from './thread-settings-parent.react.js';
@@ -193,6 +194,11 @@
+itemType: 'addMember',
+key: string,
}
+ | {
+ +itemType: 'mediaGallery',
+ +key: string,
+ +threadInfo: ThreadInfo,
+ }
| {
+itemType: 'promoteSidebar' | 'leaveThread' | 'deleteThread',
+key: string,
@@ -617,6 +623,34 @@
},
);
+ mediaGalleryListDataSelector = createSelector(
+ (propsAndState: PropsAndState) => propsAndState.threadInfo,
+ (threadInfo: ThreadInfo) => {
+ const listData: ChatSettingsItem[] = [];
+
+ listData.push({
+ itemType: 'header',
+ key: 'mediaGalleryHeader',
+ title: 'Media Gallery',
+ categoryType: 'outline',
+ });
+
+ listData.push({
+ itemType: 'mediaGallery',
+ key: 'mediaGallery',
+ threadInfo,
+ });
+
+ listData.push({
+ itemType: 'footer',
+ key: 'mediaGalleryFooter',
+ categoryType: 'outline',
+ });
+
+ return listData;
+ },
+ );
+
actionsListDataSelector = createSelector(
(propsAndState: PropsAndState) => propsAndState.threadInfo,
(propsAndState: PropsAndState) => propsAndState.parentThreadInfo,
@@ -737,18 +771,21 @@
this.subchannelsListDataSelector,
this.sidebarsListDataSelector,
this.threadMembersListDataSelector,
+ this.mediaGalleryListDataSelector,
this.actionsListDataSelector,
(
threadBasicsListData: ChatSettingsItem[],
subchannelsListData: ChatSettingsItem[],
sidebarsListData: ChatSettingsItem[],
threadMembersListData: ChatSettingsItem[],
+ mediaGalleryListData: ChatSettingsItem[],
actionsListData: ChatSettingsItem[],
) => [
...threadBasicsListData,
...subchannelsListData,
...sidebarsListData,
...threadMembersListData,
+ ...mediaGalleryListData,
...actionsListData,
],
);
@@ -891,6 +928,8 @@
);
} else if (item.itemType === 'addMember') {
return <ThreadSettingsAddMember onPress={this.onPressAddMember} />;
+ } else if (item.itemType === 'mediaGallery') {
+ return <ThreadSettingsMediaGallery />;
} else if (item.itemType === 'leaveThread') {
return (
<ThreadSettingsLeaveThread
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 4:25 AM (19 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578335
Default Alt Text
D6467.id22417.diff (2 KB)
Attached To
Mode
D6467: [native] Render the media gallery in the thread settings on native
Attached
Detach File
Event Timeline
Log In to Comment