Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-06-24 16:58:56 +02:00
parent e436e28f01
commit cc1f68296e
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 9 additions and 12 deletions

View File

@ -473,19 +473,19 @@ function textForPowerEvent(event): () => string | null {
});
}
const onPinnedMessagesClick = (): void => {
defaultDispatcher.dispatch<SetRightPanelPhasePayload>({
action: Action.SetRightPanelPhase,
phase: RightPanelPhases.PinnedMessages,
allowClose: false,
});
}
function textForPinnedEvent(event: MatrixEvent, allowJSX: boolean): () => string | JSX.Element | null {
if (!SettingsStore.getValue("feature_pinning")) return null;
const senderName = event.sender ? event.sender.name : event.getSender();
if (allowJSX) {
const onPinnedMessagesClick = () => {
defaultDispatcher.dispatch<SetRightPanelPhasePayload>({
action: Action.SetRightPanelPhase,
phase: RightPanelPhases.PinnedMessages,
allowClose: false,
});
}
return () => (
<span>
{
@ -498,10 +498,7 @@ function textForPinnedEvent(event: MatrixEvent, allowJSX: boolean): () => string
</span>
);
} else {
return () => _t(
"%(senderName)s changed the pinned messages for the room.",
{ senderName },
);
return () => _t("%(senderName)s changed the pinned messages for the room.", { senderName });
}
}