forked from distok/cutthecord
Add showtag
This commit is contained in:
parent
66b238bb1b
commit
9d7138b6a6
2 changed files with 80 additions and 0 deletions
73
patches/showtag/78204.patch
Normal file
73
patches/showtag/78204.patch
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
Binary files com.discord-base/build/apk/classes.dex and com.discord/build/apk/classes.dex differ
|
||||||
|
Binary files com.discord-base/dist/com.discord-78204.apk and com.discord/dist/com.discord-78204.apk differ
|
||||||
|
diff -crB com.discord-base/smali/com/discord/models/member/GuildMember$Companion.smali com.discord/smali/com/discord/models/member/GuildMember$Companion.smali
|
||||||
|
*** com.discord-base/smali/com/discord/models/member/GuildMember$Companion.smali 2021-05-31 14:05:54.000000000 +0300
|
||||||
|
--- com.discord/smali/com/discord/models/member/GuildMember$Companion.smali 2021-05-31 18:27:22.000000000 +0300
|
||||||
|
***************
|
||||||
|
*** 530,535 ****
|
||||||
|
--- 530,567 ----
|
||||||
|
:goto_4
|
||||||
|
if-eqz v0, :cond_8
|
||||||
|
|
||||||
|
+ new-instance v1, Ljava/lang/StringBuilder;
|
||||||
|
+
|
||||||
|
+ invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
||||||
|
+
|
||||||
|
+ const-string v2, " ("
|
||||||
|
+
|
||||||
|
+ invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||||||
|
+
|
||||||
|
+ invoke-interface {p1}, Lcom/discord/models/user/User;->getUsername()Ljava/lang/String;
|
||||||
|
+
|
||||||
|
+ move-result-object v2
|
||||||
|
+
|
||||||
|
+ invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||||||
|
+
|
||||||
|
+ const-string v2, "#"
|
||||||
|
+
|
||||||
|
+ invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||||||
|
+
|
||||||
|
+ invoke-interface {p1}, Lcom/discord/models/user/User;->getDiscriminator()I
|
||||||
|
+
|
||||||
|
+ move-result v2
|
||||||
|
+
|
||||||
|
+ invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
||||||
|
+
|
||||||
|
+ const-string v2, ")"
|
||||||
|
+
|
||||||
|
+ invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||||||
|
+
|
||||||
|
+ invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||||||
|
+
|
||||||
|
+ move-result-object v0
|
||||||
|
+
|
||||||
|
goto :goto_5
|
||||||
|
|
||||||
|
:cond_8
|
||||||
|
***************
|
||||||
|
*** 537,542 ****
|
||||||
|
--- 569,592 ----
|
||||||
|
|
||||||
|
move-result-object v0
|
||||||
|
|
||||||
|
+ new-instance v1, Ljava/lang/StringBuilder;
|
||||||
|
+
|
||||||
|
+ invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
||||||
|
+
|
||||||
|
+ const-string v2, "#"
|
||||||
|
+
|
||||||
|
+ invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||||||
|
+
|
||||||
|
+ invoke-interface {p1}, Lcom/discord/models/user/User;->getDiscriminator()I
|
||||||
|
+
|
||||||
|
+ move-result v2
|
||||||
|
+
|
||||||
|
+ invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
||||||
|
+
|
||||||
|
+ invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||||||
|
+
|
||||||
|
+ move-result-object v0
|
||||||
|
+
|
||||||
|
:goto_5
|
||||||
|
return-object v0
|
||||||
|
.end method
|
|
@ -10,6 +10,13 @@ Example, with nickname:
|
||||||
|
|
||||||
![](https://lasagna.cat/i/uy68njkr.png)
|
![](https://lasagna.cat/i/uy68njkr.png)
|
||||||
|
|
||||||
|
|
||||||
|
#### Technical notes
|
||||||
|
|
||||||
|
This hooks into `getNickOrUsername` function, specifically after `getNickname` is verified to be not empty. It creates a stringbuilder and appends ` (username#discriminator)` to it.
|
||||||
|
|
||||||
|
As of 78.4 - Alpha, it also appends `#discriminator` to username.
|
||||||
|
|
||||||
#### Available and tested on:
|
#### Available and tested on:
|
||||||
- 33.1
|
- 33.1
|
||||||
- 34.0
|
- 34.0
|
||||||
|
|
Loading…
Reference in a new issue