From 446fe76e08aa1bcd96f12f6b9c8c926d210a9d36 Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Tue, 26 Nov 2019 19:03:48 +0300 Subject: [PATCH] Get 9.2.2 slashcommands fully working god fucking finally --- patches/slashcommands/992.patch | 81 +++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/patches/slashcommands/992.patch b/patches/slashcommands/992.patch index c12d29742..9c9f40664 100644 --- a/patches/slashcommands/992.patch +++ b/patches/slashcommands/992.patch @@ -2775,4 +2775,85 @@ diff -crB com.discord-992-base/smali/com/discord/stores/StoreMessages.smali com. + return-object p0 + .end method \ No newline at end of file +diff -crB com.discord-992-base/smali/com/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1.smali com.discord-992/smali/com/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1.smali +*** com.discord-992-base/smali/com/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1.smali 2019-11-26 16:22:00.891168871 +0300 +--- com.discord-992/smali/com/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1.smali 2019-11-26 19:01:14.585479881 +0300 +*************** +*** 325,330 **** +--- 325,360 ---- + + move-result-object v10 + ++ # intercept edit here ++ ++ const-string v15, "/ctc " ++ ++ invoke-virtual {v10, v15}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z ++ ++ move-result v15 ++ ++ if-eqz v15, :cond_6 ++ ++ invoke-static {v10}, Lcom/discord/stores/StoreMessages;->slashCtc(Ljava/lang/String;)Ljava/lang/String; ++ ++ move-result-object v10 ++ ++ move-object/from16 v14, p0 ++ ++ move-object/from16 v15, p1 ++ ++ sget-object v15, Lcom/discord/widgets/chat/input/WidgetChatInputSend;->INSTANCE:Lcom/discord/widgets/chat/input/WidgetChatInputSend; ++ ++ iget-object v0, v14, Lcom/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1;->$chatInput:Lcom/discord/widgets/chat/input/WidgetChatInputEditText; ++ ++ invoke-static {v15, v0, v10}, Lcom/discord/widgets/chat/input/WidgetChatInputSend;->access$SetInput(Lcom/discord/widgets/chat/input/WidgetChatInputSend;Lcom/discord/widgets/chat/input/WidgetChatInputEditText;Ljava/lang/CharSequence;)Z ++ ++ move-result v15 ++ ++ return v15 ++ ++ :cond_6 ++ + invoke-static {v10, v4}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V + + .line 59 +*************** +*** 375,380 **** +--- 405,440 ---- + + move-result-object v12 + ++ # intercept send here ++ ++ const-string v15, "/ctc " ++ ++ invoke-virtual {v12, v15}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z ++ ++ move-result v15 ++ ++ if-eqz v15, :cond_7 ++ ++ invoke-static {v12}, Lcom/discord/stores/StoreMessages;->slashCtc(Ljava/lang/String;)Ljava/lang/String; ++ ++ move-result-object v12 ++ ++ move-object/from16 v14, p0 ++ ++ move-object/from16 v15, p1 ++ ++ sget-object v15, Lcom/discord/widgets/chat/input/WidgetChatInputSend;->INSTANCE:Lcom/discord/widgets/chat/input/WidgetChatInputSend; ++ ++ iget-object v0, v14, Lcom/discord/widgets/chat/input/WidgetChatInputSend$configureSendListeners$1;->$chatInput:Lcom/discord/widgets/chat/input/WidgetChatInputEditText; ++ ++ invoke-static {v15, v0, v12}, Lcom/discord/widgets/chat/input/WidgetChatInputSend;->access$SetInput(Lcom/discord/widgets/chat/input/WidgetChatInputSend;Lcom/discord/widgets/chat/input/WidgetChatInputEditText;Ljava/lang/CharSequence;)Z ++ ++ move-result v15 ++ ++ return v15 ++ ++ :cond_7 ++ + invoke-static {v12, v4}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V + + .line 76