forked from distok/cutthecord
slashcommands: make /ctc not send messages
This commit is contained in:
parent
ddcb459df4
commit
bf789e07a3
1 changed files with 59 additions and 20 deletions
|
@ -24,7 +24,7 @@ diff -crB com.discord-903-base/smali/com/discord/models/domain/ModelChannel.smal
|
|||
|
||||
diff -crB com.discord-903-base/smali/com/discord/stores/StoreMessages.smali com.discord-903/smali/com/discord/stores/StoreMessages.smali
|
||||
*** com.discord-903-base/smali/com/discord/stores/StoreMessages.smali 2019-05-24 23:40:49.670802999 +0300
|
||||
--- com.discord-903/smali/com/discord/stores/StoreMessages.smali 2019-05-26 16:39:58.879207449 +0300
|
||||
--- com.discord-903/smali/com/discord/stores/StoreMessages.smali 2019-05-26 17:06:36.361509248 +0300
|
||||
***************
|
||||
*** 432,437 ****
|
||||
--- 432,441 ----
|
||||
|
@ -40,7 +40,7 @@ diff -crB com.discord-903-base/smali/com/discord/stores/StoreMessages.smali com.
|
|||
|
||||
***************
|
||||
*** 948,953 ****
|
||||
--- 952,3574 ----
|
||||
--- 952,3560 ----
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
@ -2222,6 +2222,8 @@ diff -crB com.discord-903-base/smali/com/discord/stores/StoreMessages.smali com.
|
|||
+ .method public static final slashCtc(Ljava/lang/String;)Ljava/lang/String;
|
||||
+ .locals 2
|
||||
+
|
||||
+ # called from smali/com/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1.smali
|
||||
+
|
||||
+ # Length of command + space
|
||||
+ const/4 v0, 0x5
|
||||
+
|
||||
|
@ -2589,25 +2591,9 @@ diff -crB com.discord-903-base/smali/com/discord/stores/StoreMessages.smali com.
|
|||
+
|
||||
+ move-result v0
|
||||
+
|
||||
+ if-eqz v0, :cond_17
|
||||
+
|
||||
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashMorse(Ljava/lang/String;)Ljava/lang/String;
|
||||
+
|
||||
+ move-result-object p0
|
||||
+
|
||||
+ goto :goto_0
|
||||
+
|
||||
+ # ctc command
|
||||
+ :cond_17
|
||||
+ const-string v0, "/ctc "
|
||||
+
|
||||
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
||||
+
|
||||
+ move-result v0
|
||||
+
|
||||
+ if-eqz v0, :cond_0
|
||||
+
|
||||
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashCtc(Ljava/lang/String;)Ljava/lang/String;
|
||||
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashMorse(Ljava/lang/String;)Ljava/lang/String;
|
||||
+
|
||||
+ move-result-object p0
|
||||
+
|
||||
|
@ -2666,7 +2652,7 @@ diff -crB com.discord-903-base/smali/com/discord/stores/StoreMessages.smali com.
|
|||
.annotation system Ldalvik/annotation/Signature;
|
||||
***************
|
||||
*** 977,982 ****
|
||||
--- 3598,3607 ----
|
||||
--- 3584,3593 ----
|
||||
|
||||
invoke-static {p4, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
||||
|
||||
|
@ -2787,3 +2773,56 @@ diff -crB com.discord-903-base/smali/com/discord/widgets/chat/input/WidgetChatIn
|
|||
.line 222
|
||||
invoke-static {}, Lcom/discord/stores/StoreStream;->getUsersTyping()Lcom/discord/stores/StoreUserTyping;
|
||||
|
||||
diff -crB com.discord-903-base/smali/com/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1.smali com.discord-903/smali/com/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1.smali
|
||||
*** com.discord-903-base/smali/com/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1.smali 2019-05-24 23:40:49.907470826 +0300
|
||||
--- com.discord-903/smali/com/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1.smali 2019-05-26 17:12:27.753183346 +0300
|
||||
***************
|
||||
*** 355,360 ****
|
||||
--- 355,362 ----
|
||||
|
||||
move-result-object v9
|
||||
|
||||
+ # intercept edit here
|
||||
+
|
||||
invoke-static {v9, v3}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
||||
|
||||
.line 63
|
||||
***************
|
||||
*** 399,404 ****
|
||||
--- 401,436 ----
|
||||
|
||||
move-result-object v8
|
||||
|
||||
+ # intercept send here
|
||||
+
|
||||
+ const-string v9, "/ctc "
|
||||
+
|
||||
+ invoke-virtual {v8, v9}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
||||
+
|
||||
+ move-result v9
|
||||
+
|
||||
+ if-eqz v9, :cond_6
|
||||
+
|
||||
+ invoke-static {v8}, Lcom/discord/stores/StoreMessages;->slashCtc(Ljava/lang/String;)Ljava/lang/String;
|
||||
+
|
||||
+ move-result-object v8
|
||||
+
|
||||
+ # invoke-virtual {v9}, Landroid/view/View;->getContext()Landroid/content/Context;
|
||||
+
|
||||
+ # move-result-object v9
|
||||
+
|
||||
+ # const/4 v0, 0x0
|
||||
+
|
||||
+ # invoke-static {v9, v8, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;
|
||||
+
|
||||
+ # move-result-object v9
|
||||
+
|
||||
+ # invoke-virtual {v9}, Landroid/widget/Toast;->show()V
|
||||
+
|
||||
+ goto :goto_2
|
||||
+
|
||||
+ :cond_6
|
||||
+
|
||||
invoke-static {v8, v3}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
||||
|
||||
.line 79
|
||||
|
|
Loading…
Reference in a new issue