diff options
author | Vendicated <vendicated@riseup.net> | 2023-03-31 00:15:51 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-03-31 00:15:51 +0200 |
commit | 906c265aea19c3e25a1d9ddb49d11e3d341f50c4 (patch) | |
tree | dccaed9a4d8c4b8ba10152ac733b0de8a73f4a1e /src/plugins | |
parent | 708c16176b9a8353a7460dd313a0cc441f679c21 (diff) | |
download | Vencord-906c265aea19c3e25a1d9ddb49d11e3d341f50c4.tar.gz Vencord-906c265aea19c3e25a1d9ddb49d11e3d341f50c4.tar.bz2 Vencord-906c265aea19c3e25a1d9ddb49d11e3d341f50c4.zip |
FakeNitro: Fix fake emote rendering incorrectly in thread previews
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/fakeNitro.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/fakeNitro.tsx b/src/plugins/fakeNitro.tsx index 5e8c381..e703af5 100644 --- a/src/plugins/fakeNitro.tsx +++ b/src/plugins/fakeNitro.tsx @@ -204,7 +204,7 @@ export default definePlugin({ }, { match: /(?=return{hasSpoilerEmbeds:\i,content:(\i)})/, - replace: (_, content) => `${content}=$self.patchFakeNitroEmojis(${content});` + replace: (_, content) => `${content}=$self.patchFakeNitroEmojis(${content},arguments[2]?.formatInline);` } ] }, @@ -333,7 +333,7 @@ export default definePlugin({ EmojiComponent: null as any, - patchFakeNitroEmojis(content: Array<any>) { + patchFakeNitroEmojis(content: Array<any>, inline: boolean) { if (!this.EmojiComponent) return content; const newContent: Array<any> = []; @@ -353,7 +353,7 @@ export default definePlugin({ newContent.push(( <this.EmojiComponent node={{ type: "customEmoji", - jumboable: content.length === 1, + jumboable: !inline && content.length === 1, animated: fakeNitroMatch[2] === "gif", name: ":FakeNitroEmoji:", emojiId: fakeNitroMatch[1] |