Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3299721
D13448.id44484.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13448.id44484.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
@@ -48,6 +48,7 @@
import {
threadTypes,
threadTypeIsSidebar,
+ threadTypeIsThick,
} from 'lib/types/thread-types-enum.js';
import type { UserInfos } from 'lib/types/user-types.js';
import {
@@ -702,6 +703,10 @@
const listData: ChatSettingsItem[] = [];
const limit = 6;
+ if (threadTypeIsThick(threadInfo.type)) {
+ return listData;
+ }
+
listData.push({
itemType: 'mediaGallery',
key: 'mediaGallery',
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
@@ -106,17 +106,19 @@
[popModal, pushModal, threadInfo],
);
- const threadMediaGalleryItem = React.useMemo(
- () => (
+ const threadMediaGalleryItem = React.useMemo(() => {
+ if (threadTypeIsThick(threadInfo.type)) {
+ return null;
+ }
+ return (
<MenuItem
key="threadMediaGallery"
text="Media"
icon="image-1"
onClick={onClickThreadMediaGallery}
/>
- ),
- [onClickThreadMediaGallery],
- );
+ );
+ }, [onClickThreadMediaGallery, threadInfo.type]);
const childThreads = useSelector(
state => childThreadInfos(state)[threadInfo.id],
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 3:03 PM (21 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2534959
Default Alt Text
D13448.id44484.diff (1 KB)
Attached To
Mode
D13448: [web][native] hide media gallery for thick threads
Attached
Detach File
Event Timeline
Log In to Comment