Disable header more menu in select mode

This commit is contained in:
Jamie Kyle 2024-01-04 12:15:46 -08:00 committed by GitHub
parent 0aad09682d
commit 66f97b1c25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 25 deletions

View file

@ -15,6 +15,7 @@ import {
getConversationByServiceIdSelector,
getConversationSelector,
getHasPanelOpen,
getSelectedMessageIds,
isMissingRequiredProfileSharing,
} from '../selectors/conversations';
import { CallMode } from '../../types/Calling';
@ -123,6 +124,9 @@ export function SmartConversationHeader({ id }: OwnProps): JSX.Element {
const cannotLeaveBecauseYouAreLastAdmin =
getCannotLeaveBecauseYouAreLastAdmin(groupMemberships.memberships, isAdmin);
const selectedMessageIds = useSelector(getSelectedMessageIds);
const isSelectMode = selectedMessageIds != null;
return (
<ConversationHeader
{...pick(conversation, [
@ -175,6 +179,7 @@ export function SmartConversationHeader({ id }: OwnProps): JSX.Element {
setMuteExpiration={setMuteExpiration}
setPinned={setPinned}
theme={theme}
isSelectMode={isSelectMode}
toggleSelectMode={toggleSelectMode}
viewUserStories={viewUserStories}
/>