diff --git a/web/chat/thread-menu.react.js b/web/chat/thread-menu.react.js
--- a/web/chat/thread-menu.react.js
+++ b/web/chat/thread-menu.react.js
@@ -31,6 +31,7 @@
import SidebarPromoteModal from '../modals/chat/sidebar-promote-modal.react.js';
import ConfirmLeaveThreadModal from '../modals/threads/confirm-leave-thread-modal.react.js';
import ComposeSubchannelModal from '../modals/threads/create/compose-subchannel-modal.react.js';
+import ThreadSettingsMediaGalleryModal from '../modals/threads/gallery/thread-settings-media-gallery.react.js';
import ThreadMembersModal from '../modals/threads/members/members-modal.react.js';
import ThreadNotificationsModal from '../modals/threads/notifications/notifications-modal.react.js';
import ThreadSettingsModal from '../modals/threads/settings/thread-settings-modal.react.js';
@@ -84,6 +85,37 @@
);
}, [onClickMembers, threadInfo.type]);
+ const canViewThreadMediaGallery = React.useMemo(() => {
+ return threadInfo.parentThreadID === '1';
+ }, [threadInfo]);
+
+ const onClickThreadMediaGallery = React.useCallback(
+ () =>
+ pushModal(
+ ,
+ ),
+ [popModal, pushModal, threadInfo],
+ );
+
+ const threadMediaGalleryItem = React.useMemo(() => {
+ if (!canViewThreadMediaGallery) {
+ return null;
+ }
+ return (
+
+ );
+ }, [canViewThreadMediaGallery, onClickThreadMediaGallery]);
+
const childThreads = useSelector(
state => childThreadInfos(state)[threadInfo.id],
);
@@ -262,6 +294,7 @@
settingsItem,
notificationsItem,
membersItem,
+ threadMediaGalleryItem,
sidebarItem,
viewSubchannelsItem,
createSubchannelsItem,
@@ -274,6 +307,7 @@
settingsItem,
notificationsItem,
membersItem,
+ threadMediaGalleryItem,
sidebarItem,
viewSubchannelsItem,
promoteSidebar,