Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3393211
D3810.id11735.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.id11735.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';
@@ -43,7 +42,7 @@
function ThreadMenu(props: ThreadMenuProps): React.Node {
const { setModal, clearModal } = useModalContext();
const { threadInfo } = props;
- const { onPromoteSidebar } = usePromoteSidebar(threadInfo);
+ const { onPromoteSidebar, canPromoteSidebar } = usePromoteSidebar(threadInfo);
const onClickSettings = React.useCallback(
() => setModal(<ThreadSettingsModal threadID={threadInfo.id} />),
@@ -217,7 +216,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,
@@ -227,7 +225,7 @@
viewSubchannelsItem,
SHOW_CREATE_SUBCHANNELS && createSubchannelsItem,
leaveThreadItem && separator,
- SHOW_PROMOTE_SIDEBAR && promoteSidebar,
+ canPromoteSidebar && promoteSidebar,
leaveThreadItem,
];
return items.filter(Boolean);
@@ -239,6 +237,7 @@
promoteSidebar,
createSubchannelsItem,
leaveThreadItem,
+ canPromoteSidebar,
]);
const icon = React.useMemo(
() => <SWMansionIcon icon="menu-vertical" size={20} />,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 12:32 PM (18 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2604993
Default Alt Text
D3810.id11735.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