Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3379626
D3810.id12200.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
D3810.id12200.diff
View Options
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
@@ -22,7 +22,6 @@
useServerCall,
useDispatchActionPromise,
} from 'lib/utils/action-utils';
-import { isDev } from 'lib/utils/dev-utils';
import MenuItem from '../components/menu-item.react';
import Menu from '../components/menu.react';
@@ -44,7 +43,7 @@
function ThreadMenu(props: ThreadMenuProps): React.Node {
const { pushModal, popModal } = useModalContext();
const { threadInfo } = props;
- const { onPromoteSidebar } = usePromoteSidebar(threadInfo);
+ const { onPromoteSidebar, canPromoteSidebar } = usePromoteSidebar(threadInfo);
const onClickSettings = React.useCallback(
() => pushModal(<ThreadSettingsModal threadID={threadInfo.id} />),
@@ -230,7 +229,6 @@
// TODO: Enable menu items when the modals are implemented
const SHOW_NOTIFICATIONS = false;
const SHOW_CREATE_SUBCHANNELS = false;
- const SHOW_PROMOTE_SIDEBAR = isDev;
const items = [
settingsItem,
@@ -240,7 +238,7 @@
viewSubchannelsItem,
SHOW_CREATE_SUBCHANNELS && createSubchannelsItem,
leaveThreadItem && separator,
- SHOW_PROMOTE_SIDEBAR && promoteSidebar,
+ canPromoteSidebar && promoteSidebar,
leaveThreadItem,
];
return items.filter(Boolean);
@@ -252,6 +250,7 @@
promoteSidebar,
createSubchannelsItem,
leaveThreadItem,
+ canPromoteSidebar,
]);
const icon = React.useMemo(
() => <SWMansionIcon icon="menu-vertical" size={20} />,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 5:42 PM (19 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594342
Default Alt Text
D3810.id12200.diff (1 KB)
Attached To
Mode
D3810: [web] [feat] [ENG-991] add show promote thread logic to web
Attached
Detach File
Event Timeline
Log In to Comment