From 470cf5616084f8647a0f4f9fd5f3b57309c13771 Mon Sep 17 00:00:00 2001 From: Ave Date: Thu, 30 Jul 2020 01:50:26 +0300 Subject: [PATCH] showtag: Implement showtag. Finally. Closes #30 --- patches/README.md | 3 +-- patches/showtag/1208.patch | 37 +++++++++++++++++++++++++++++++++++++ patches/showtag/README.md | 15 +++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 patches/showtag/1208.patch create mode 100644 patches/showtag/README.md diff --git a/patches/README.md b/patches/README.md index 192996e1d3..44e5d94df2 100644 --- a/patches/README.md +++ b/patches/README.md @@ -73,9 +73,8 @@ Video demonstration: https://www.youtube.com/watch?v=NMRPsAgqtWQ ![An image of pseudoNitro](https://lasagna.cat/i/nw0kfk2r.png) - profilemention: Restores the behavior where tapping a user's profile picture adds their mention to the chat box instead of opening their profile. - - **supplemental**: Adds some helper functions needed by certain patches. - +- **showtag**: Shows user's username after their nickname, if user has a nickname. - **slashcommands**: Adds a lot of slash commands (all the decent ones on desktop and more), alongside some other useful features such as an account switcher. Also allows enabling or disabling a couple patches such as `channelleak` (shows all channel names and topics, even those you lack the permissions to read) or `notyping` (disables sending typing event to discord servers). I'm quite proud of this patch :p [Read its own README.md for more information](slashcommands/README.md). ![account switching on cutthecord](https://wildcard.elixi.re/t/sdi6aq1l6.png) diff --git a/patches/showtag/1208.patch b/patches/showtag/1208.patch new file mode 100644 index 0000000000..12dd8fad71 --- /dev/null +++ b/patches/showtag/1208.patch @@ -0,0 +1,37 @@ +Only in com.discord: build +Only in com.discord: dist +diff --color -crB com.discord-base/smali/com/discord/models/domain/ModelUser.smali com.discord/smali/com/discord/models/domain/ModelUser.smali +*** com.discord-base/smali/com/discord/models/domain/ModelUser.smali 2020-07-29 21:27:27.843445644 +0300 +--- com.discord/smali/com/discord/models/domain/ModelUser.smali 2020-07-30 01:46:42.627403991 +0300 +*************** +*** 1709,1714 **** +--- 1709,1736 ---- + :goto_2 + if-eqz p1, :cond_5 + ++ new-instance v0, Ljava/lang/StringBuilder; ++ ++ invoke-direct {v0, p1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V ++ ++ const-string v1, " (" ++ ++ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; ++ ++ invoke-virtual {p0}, Lcom/discord/models/domain/ModelUser;->getUserNameWithDiscriminator()Ljava/lang/String; ++ ++ move-result-object v1 ++ ++ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; ++ ++ const-string v1, ")" ++ ++ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; ++ ++ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; ++ ++ move-result-object p1 ++ + goto :goto_3 + + .line 8 + diff --git a/patches/showtag/README.md b/patches/showtag/README.md new file mode 100644 index 0000000000..ec7a822907 --- /dev/null +++ b/patches/showtag/README.md @@ -0,0 +1,15 @@ +## DisTok CutTheCord: Show Tag Patch + +This patch shows user's username after their nickname, if user has a nickname. + +Example, no nickname: + +![](https://lasagna.cat/i/c28755s6.png) + +Example, with nickname: + +![](https://lasagna.cat/i/uy68njkr.png) + +#### Available and tested on: +- 33.1 +