Page MenuHomePhabricator

D6864.id23036.diff
No OneTemporary

D6864.id23036.diff

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,31 @@
);
}, [onClickMembers, threadInfo.type]);
+ const onClickThreadMediaGallery = React.useCallback(
+ () =>
+ pushModal(
+ <ThreadSettingsMediaGalleryModal
+ onClose={popModal}
+ parentThreadInfo={threadInfo}
+ limit={36}
+ activeTab="All"
+ />,
+ ),
+ [popModal, pushModal, threadInfo],
+ );
+
+ const threadMediaGalleryItem = React.useMemo(
+ () => (
+ <MenuItem
+ key="threadMediaGallery"
+ text="Media"
+ icon="image-1"
+ onClick={onClickThreadMediaGallery}
+ />
+ ),
+ [onClickThreadMediaGallery],
+ );
+
const childThreads = useSelector(
state => childThreadInfos(state)[threadInfo.id],
);
@@ -262,6 +288,7 @@
settingsItem,
notificationsItem,
membersItem,
+ threadMediaGalleryItem,
sidebarItem,
viewSubchannelsItem,
createSubchannelsItem,
@@ -274,6 +301,7 @@
settingsItem,
notificationsItem,
membersItem,
+ threadMediaGalleryItem,
sidebarItem,
viewSubchannelsItem,
promoteSidebar,

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 10:36 PM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2577254
Default Alt Text
D6864.id23036.diff (1 KB)

Event Timeline