diff --git a/ts/components/ConversationListItem.tsx b/ts/components/ConversationListItem.tsx index 076e13976..0b2a71ef5 100644 --- a/ts/components/ConversationListItem.tsx +++ b/ts/components/ConversationListItem.tsx @@ -309,7 +309,7 @@ export class ConversationListItem extends React.PureComponent { mentionedUs, } = this.props; - const triggerId = `${phoneNumber}-ctxmenu-${Date.now()}`; + const triggerId = `conversation-item-${phoneNumber}-ctxmenu`; return (
diff --git a/ts/components/conversation/ConversationHeader.tsx b/ts/components/conversation/ConversationHeader.tsx index 25c4cc45b..c097a2ad1 100644 --- a/ts/components/conversation/ConversationHeader.tsx +++ b/ts/components/conversation/ConversationHeader.tsx @@ -389,7 +389,7 @@ export class ConversationHeader extends React.Component { public render() { const { id, isKickedFromGroup } = this.props; - const triggerId = `conversation-${id}-${Date.now()}`; + const triggerId = `conversation-header-${id}`; return ( <> diff --git a/ts/components/conversation/Message.tsx b/ts/components/conversation/Message.tsx index 6d1974ff2..be36185be 100644 --- a/ts/components/conversation/Message.tsx +++ b/ts/components/conversation/Message.tsx @@ -1073,11 +1073,11 @@ export class Message extends React.PureComponent { // It needs to be unique. // The Date.now() is a workaround to be sure a single triggerID with this id exists const triggerId = id - ? String(`${id}-${Date.now()}`) - : String(`${authorPhoneNumber}-${timestamp}`); + ? String(`message-${id}-${Date.now()}`) + : String(`message-${authorPhoneNumber}-${timestamp}`); const rightClickTriggerId = id - ? String(`${id}-ctx-${Date.now()}`) - : String(`${authorPhoneNumber}-ctx-${timestamp}`); + ? String(`message-ctx-${id}-${Date.now()}`) + : String(`message-ctx-${authorPhoneNumber}-${timestamp}`); if (expired) { return null; } diff --git a/ts/session/utils/Menu.tsx b/ts/session/utils/Menu.tsx index 2d7637f43..2fe4b77f6 100644 --- a/ts/session/utils/Menu.tsx +++ b/ts/session/utils/Menu.tsx @@ -304,7 +304,14 @@ export function getResetSessionMenuItem( action: any, i18n: LocalizerType ): JSX.Element | null { - if (showResetSession(Boolean(isPublic), Boolean(isRss), Boolean(isGroup), Boolean(isBlocked),)) { + if ( + showResetSession( + Boolean(isPublic), + Boolean(isRss), + Boolean(isGroup), + Boolean(isBlocked) + ) + ) { return {i18n('resetSession')}; } return null;