Pinned messages UI fixes

This commit is contained in:
Jamie
2026-01-13 12:01:07 -08:00
committed by GitHub
parent a27a87a934
commit 560224f516
14 changed files with 133 additions and 187 deletions

View File

@@ -54,7 +54,7 @@ export type PropsData = {
canRetryDeleteForEveryone: boolean;
canReact: boolean;
canReply: boolean;
canPinMessages: boolean;
canPinMessage: boolean;
hasMaxPinnedMessages: boolean;
selectedReaction?: string;
isTargeted?: boolean;
@@ -114,7 +114,7 @@ export function TimelineMessage(props: Props): React.JSX.Element {
canReply,
canRetry,
canRetryDeleteForEveryone,
canPinMessages,
canPinMessage,
containerElementRef,
containerWidthBreakpoint,
conversationId,
@@ -368,11 +368,9 @@ export function TimelineMessage(props: Props): React.JSX.Element {
});
}}
onPinMessage={
canPinMessages && !isPinned ? handleOpenPinMessageDialog : null
}
onUnpinMessage={
canPinMessages && isPinned ? handleUnpinMessage : null
canPinMessage && !isPinned ? handleOpenPinMessageDialog : null
}
onUnpinMessage={canPinMessage && isPinned ? handleUnpinMessage : null}
onMoreInfo={() =>
pushPanelForConversation({
type: PanelType.MessageDetails,
@@ -388,7 +386,7 @@ export function TimelineMessage(props: Props): React.JSX.Element {
canCopy,
canEditMessage,
canForward,
canPinMessages,
canPinMessage,
canRetry,
canSelect,
canEndPoll,