parent
e436e28f01
commit
cc1f68296e
|
@ -473,12 +473,7 @@ function textForPowerEvent(event): () => string | null {
|
|||
});
|
||||
}
|
||||
|
||||
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 = () => {
|
||||
const onPinnedMessagesClick = (): void => {
|
||||
defaultDispatcher.dispatch<SetRightPanelPhasePayload>({
|
||||
action: Action.SetRightPanelPhase,
|
||||
phase: RightPanelPhases.PinnedMessages,
|
||||
|
@ -486,6 +481,11 @@ function textForPinnedEvent(event: MatrixEvent, allowJSX: boolean): () => string
|
|||
});
|
||||
}
|
||||
|
||||
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) {
|
||||
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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue