showtag: Implement showtag. Finally.

Closes #30
This commit is contained in:
ave 2020-07-30 01:50:26 +03:00
parent 39936489cd
commit 470cf56160
Signed by: a
GPG key ID: 398DD7BD03276F6D
3 changed files with 53 additions and 2 deletions

View file

@ -73,9 +73,8 @@ Video demonstration: https://www.youtube.com/watch?v=NMRPsAgqtWQ
![An image of pseudoNitro](https://lasagna.cat/i/nw0kfk2r.png) ![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. - 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. - **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). - **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) ![account switching on cutthecord](https://wildcard.elixi.re/t/sdi6aq1l6.png)

View file

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

15
patches/showtag/README.md Normal file
View file

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