hideunusableemojis: Implement patch

Closes #45

Thanks to @BlueMods for contributing this!
This commit is contained in:
ave 2020-07-31 15:37:51 +03:00
parent ce167af965
commit 38112bd90f
Signed by untrusted user: a
GPG key ID: 398DD7BD03276F6D
3 changed files with 35 additions and 3 deletions

View file

@ -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)

View file

@ -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;

View file

@ -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