From 38112bd90fcbae93a3348379eddf338217fae739 Mon Sep 17 00:00:00 2001 From: Ave Date: Fri, 31 Jul 2020 15:37:51 +0300 Subject: [PATCH] hideunusableemojis: Implement patch Closes #45 Thanks to @BlueMods for contributing this! --- patches/README.md | 4 +--- patches/hideunusableemojis/1213.patch | 21 +++++++++++++++++++++ patches/hideunusableemojis/README.md | 13 +++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 patches/hideunusableemojis/1213.patch create mode 100644 patches/hideunusableemojis/README.md diff --git a/patches/README.md b/patches/README.md index 44e5d94..7a2422d 100644 --- a/patches/README.md +++ b/patches/README.md @@ -47,11 +47,9 @@ Video demonstration: https://www.youtube.com/watch?v=NMRPsAgqtWQ - disable-mobileindicator: This is the patch inspired me to start working on CutTheCord. It makes your device act like a desktop client, and disables the "mobile indicator" on discord. However, this breaks notifications. - experiments: Enables some dev-only things, like developer options tab or a secret staff-only, half-assed AMOLED-optimized theme called "pure evil". The developer options tab does not work. - +- hideunusableemojis: Only shows the emojis the user can actually use (mostly hides custom emojis from other guilds when you don't have Nitro). - hqavatars: Uses 256x256 variants of avatars instead of 128x128. - - **litecord**: Changes the server the app connects to, and specifically tries to connect to a Litecord server. [Litecord is a FOSS re-implementation of Discord's backend.](https://wildcard.elixi.re/i/l3lxhd3a.png) - - **mutant**: Replaces official twemoji emojis with [mutant standard emojis](https://mutant.tech/), and injects custom mutantstd emojis to the app. Second patch I ever developed! ![Emoji drawer with mutant standard emojis](https://wildcard.elixi.re/t/ssnmlwgnc.png) diff --git a/patches/hideunusableemojis/1213.patch b/patches/hideunusableemojis/1213.patch new file mode 100644 index 0000000..bbb60fa --- /dev/null +++ b/patches/hideunusableemojis/1213.patch @@ -0,0 +1,21 @@ +Only in com.discord: build +Only in com.discord: dist +diff --color -crB com.discord-base/smali/com/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion.smali com.discord/smali/com/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion.smali +*** com.discord-base/smali/com/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion.smali 2020-07-30 01:52:32.303011366 +0300 +--- com.discord/smali/com/discord/widgets/chat/input/emoji/EmojiPickerViewModel$Companion.smali 2020-07-31 15:28:48.386493702 +0300 +*************** +*** 154,159 **** +--- 154,165 ---- + + if-eqz v4, :cond_2 + ++ invoke-interface {v1}, Lcom/discord/models/domain/emoji/Emoji;->isUsable()Z ++ ++ move-result v4 ++ ++ if-eqz v4, :cond_2 ++ + .line 5 + new-instance v2, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiAdapter$EmojiItem; + + diff --git a/patches/hideunusableemojis/README.md b/patches/hideunusableemojis/README.md new file mode 100644 index 0000000..aff0538 --- /dev/null +++ b/patches/hideunusableemojis/README.md @@ -0,0 +1,13 @@ +## DisTok CutTheCord: Hide Unusable Emojis Patch + +This patch only shows the emojis the user can actually use (mostly hides custom emojis from other guilds when you don't have Nitro). + +![](https://lasagna.cat/i/4g6wfksl.png) + +#### Thanks + +Big thanks to [@BlueMods](https://gitdab.com/BlueMods) for sending in this patch. + +#### Available and tested on: +- 34.0 +