Collapse lines together to reduce line/indent spam
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>pull/21833/head
parent
6c945ee4ed
commit
94d3dd6bbc
|
@ -442,22 +442,20 @@ function textForPinnedEvent(event: MatrixEvent, allowJSX: boolean): () => string
|
||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<span>
|
<span>
|
||||||
{
|
{ _t(
|
||||||
_t(
|
"%(senderName)s pinned <a>a message</a> to this room. See all <b>pinned messages</b>.",
|
||||||
"%(senderName)s pinned <a>a message</a> to this room. See all <b>pinned messages</b>.",
|
{ senderName },
|
||||||
{ senderName },
|
{
|
||||||
{
|
"a": (sub) =>
|
||||||
"a": (sub) =>
|
<a onClick={(e) => onPinnedOrUnpinnedMessageClick(messageId, roomId)}>
|
||||||
<a onClick={(e) => onPinnedOrUnpinnedMessageClick(messageId, roomId)}>
|
{ sub }
|
||||||
{ sub }
|
</a>,
|
||||||
</a>,
|
"b": (sub) =>
|
||||||
"b": (sub) =>
|
<a onClick={onPinnedMessagesClick}>
|
||||||
<a onClick={onPinnedMessagesClick}>
|
{ sub }
|
||||||
{ sub }
|
</a>,
|
||||||
</a>,
|
},
|
||||||
},
|
) }
|
||||||
)
|
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -472,22 +470,20 @@ function textForPinnedEvent(event: MatrixEvent, allowJSX: boolean): () => string
|
||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<span>
|
<span>
|
||||||
{
|
{ _t(
|
||||||
_t(
|
"%(senderName)s unpinned <a>a message</a> from this room. See all <b>pinned messages</b>.",
|
||||||
"%(senderName)s unpinned <a>a message</a> from this room. See all <b>pinned messages</b>.",
|
{ senderName },
|
||||||
{ senderName },
|
{
|
||||||
{
|
"a": (sub) =>
|
||||||
"a": (sub) =>
|
<a onClick={(e) => onPinnedOrUnpinnedMessageClick(messageId, roomId)}>
|
||||||
<a onClick={(e) => onPinnedOrUnpinnedMessageClick(messageId, roomId)}>
|
{ sub }
|
||||||
{ sub }
|
</a>,
|
||||||
</a>,
|
"b": (sub) =>
|
||||||
"b": (sub) =>
|
<a onClick={onPinnedMessagesClick}>
|
||||||
<a onClick={onPinnedMessagesClick}>
|
{ sub }
|
||||||
{ sub }
|
</a>,
|
||||||
</a>,
|
},
|
||||||
},
|
) }
|
||||||
)
|
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -498,13 +494,11 @@ function textForPinnedEvent(event: MatrixEvent, allowJSX: boolean): () => string
|
||||||
if (allowJSX) {
|
if (allowJSX) {
|
||||||
return () => (
|
return () => (
|
||||||
<span>
|
<span>
|
||||||
{
|
{ _t(
|
||||||
_t(
|
"%(senderName)s changed the <a>pinned messages</a> for the room.",
|
||||||
"%(senderName)s changed the <a>pinned messages</a> for the room.",
|
{ senderName },
|
||||||
{ senderName },
|
{ "a": (sub) => <a onClick={onPinnedMessagesClick}> { sub } </a> },
|
||||||
{ "a": (sub) => <a onClick={onPinnedMessagesClick}> { sub } </a> },
|
) }
|
||||||
)
|
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue