Page MenuHomePhabricator

D3810.diff
No OneTemporary

D3810.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
@@ -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

Mime Type
text/plain
Expires
Thu, Nov 28, 3:37 PM (17 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594342
Default Alt Text
D3810.diff (1 KB)

Event Timeline