Page MenuHomePhabricator

D13448.id44484.diff
No OneTemporary

D13448.id44484.diff

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

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)

Event Timeline