kopia lustrzana https://github.com/cheeaun/phanpy
Make emoji's static for all name text
rodzic
755a2268ea
commit
a881d5dfb2
|
|
@ -8,7 +8,7 @@ const shortcodesRegexp = mem((shortcodes) => {
|
|||
return new RegExp(`:(${shortcodes.join('|')}):`, 'g');
|
||||
});
|
||||
|
||||
function EmojiText({ text, emojis }) {
|
||||
function EmojiText({ text, emojis, staticEmoji }) {
|
||||
if (!text) return '';
|
||||
if (!emojis?.length) return text;
|
||||
if (text.indexOf(':') === -1) return text;
|
||||
|
|
@ -23,9 +23,9 @@ function EmojiText({ text, emojis }) {
|
|||
const { url, staticUrl } = emoji;
|
||||
return (
|
||||
<CustomEmoji
|
||||
staticUrl={staticUrl}
|
||||
staticUrl={staticEmoji ? undefined : staticUrl}
|
||||
alt={word}
|
||||
url={url}
|
||||
url={staticEmoji ? staticUrl || url : url}
|
||||
key={word + '-' + i} // Handle >= 2 same shortcodes
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ function NameText({
|
|||
{displayName && !short ? (
|
||||
<>
|
||||
<b dir="auto">
|
||||
<EmojiText text={displayName} emojis={emojis} />
|
||||
<EmojiText text={displayName} emojis={emojis} staticEmoji />
|
||||
</b>
|
||||
{!showAcct && !hideUsername && (
|
||||
<>
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue