fix contextmenu caching on Message right click

pull/935/head
Audric Ackermann 5 years ago
parent 55c1410793
commit 84d5cf4541
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -1064,9 +1064,13 @@ export class Message extends React.PureComponent<Props, State> {
// This id is what connects our triple-dot click with our associated pop-up menu.
// It needs to be unique.
const triggerId = String(id || `${authorPhoneNumber}-${timestamp}`);
const rightClickTriggerId = `${authorPhoneNumber}-ctx-${timestamp}`;
// 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}`);
const rightClickTriggerId = id
? String(`${id}-ctx-${Date.now()}`)
: String(`${authorPhoneNumber}-ctx-${timestamp}`);
if (expired) {
return null;
}

Loading…
Cancel
Save