cutthecordS/patches/supplemental/1223.patch
Juby210 ec246529e2 add (deleted) to deleted messages (#77)
add (deleted) to deleted messages

Co-authored-by: BlueMods
Reviewed-on: distok/cutthecord#77
2020-08-20 10:05:57 +00:00

822 lines
26 KiB
Diff

diff -crBN from/smali/com/cutthecord/Utils.smali to/smali/com/cutthecord/Utils.smali
*** from/smali/com/cutthecord/Utils.smali Thu Jan 1 01:00:00 1970
--- to/smali/com/cutthecord/Utils.smali Thu Aug 13 14:15:11 2020
***************
*** 0 ****
--- 1,36 ----
+ .class public Lcom/cutthecord/Utils;
+ .super Ljava/lang/Object;
+
+
+ # static fields
+ .field public static messageFragment:Landroidx/fragment/app/Fragment;
+
+
+ # direct methods
+ .method public constructor <init>()V
+ .locals 0
+
+ invoke-direct {p0}, Ljava/lang/Object;-><init>()V
+
+ return-void
+ .end method
+
+ .method public static refreshView()V
+ .locals 2
+
+ new-instance v0, Landroid/os/Handler;
+
+ invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
+
+ move-result-object v1
+
+ invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
+
+ new-instance v1, Lcom/cutthecord/refreshView;
+
+ invoke-direct {v1}, Lcom/cutthecord/refreshView;-><init>()V
+
+ invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
+
+ return-void
+ .end method
diff -crBN from/smali/com/cutthecord/refreshView.smali to/smali/com/cutthecord/refreshView.smali
*** from/smali/com/cutthecord/refreshView.smali Thu Jan 1 01:00:00 1970
--- to/smali/com/cutthecord/refreshView.smali Thu Aug 13 13:56:59 2020
***************
*** 0 ****
--- 1,63 ----
+ .class final Lcom/cutthecord/refreshView;
+ .super Ljava/lang/Object;
+
+ # interfaces
+ .implements Ljava/lang/Runnable;
+
+
+ # direct methods
+ .method public constructor <init>()V
+ .locals 0
+
+ invoke-direct {p0}, Ljava/lang/Object;-><init>()V
+
+ return-void
+ .end method
+
+
+ # virtual methods
+ .method public run()V
+ .locals 4
+
+ sget-object v0, Lcom/cutthecord/Utils;->messageFragment:Landroidx/fragment/app/Fragment;
+
+ if-eqz v0, :cond_0
+
+ invoke-virtual {v0}, Landroidx/fragment/app/Fragment;->isStateSaved()Z
+
+ move-result v1
+
+ if-nez v1, :cond_0
+
+ invoke-virtual {v0}, Landroidx/fragment/app/Fragment;->getFragmentManager()Landroidx/fragment/app/FragmentManager;
+
+ move-result-object v1
+
+ invoke-virtual {v1}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
+
+ move-result-object v1
+
+ sget v2, Landroid/os/Build$VERSION;->SDK_INT:I
+
+ const/16 v3, 0x1a # 26
+
+ if-lt v2, v3, :cond_1
+
+ const/4 v2, 0x0
+
+ invoke-virtual {v1, v2}, Landroidx/fragment/app/FragmentTransaction;->setReorderingAllowed(Z)Landroidx/fragment/app/FragmentTransaction;
+
+ :cond_1
+ invoke-virtual {v1, v0}, Landroidx/fragment/app/FragmentTransaction;->detach(Landroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;
+
+ move-result-object v1
+
+ invoke-virtual {v1, v0}, Landroidx/fragment/app/FragmentTransaction;->attach(Landroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;
+
+ move-result-object v1
+
+ invoke-virtual {v1}, Landroidx/fragment/app/FragmentTransaction;->commit()I
+
+ :cond_0
+ return-void
+ .end method
diff -crBN from/smali/com/discord/models/domain/ModelChannel.smali to/smali/com/discord/models/domain/ModelChannel.smali
*** from/smali/com/discord/models/domain/ModelChannel.smali Wed Aug 12 18:07:37 2020
--- to/smali/com/discord/models/domain/ModelChannel.smali Thu Aug 13 00:12:31 2020
***************
*** 2285,2290 ****
--- 2285,2300 ----
}
.end annotation
+ invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
+
+ move-result-object v0
+
+ invoke-virtual {v0}, Lcom/discord/stores/StoreUserSettings;->getLeakChannels()Z
+
+ move-result v0
+
+ if-eqz v0, :cond_0
+
.line 1
iget-object v0, p0, Lcom/discord/models/domain/ModelChannel;->permissionOverwrites:Ljava/util/Map;
diff -crBN from/smali/com/discord/models/domain/ModelMessage.smali to/smali/com/discord/models/domain/ModelMessage.smali
*** from/smali/com/discord/models/domain/ModelMessage.smali Wed Aug 12 18:07:38 2020
--- to/smali/com/discord/models/domain/ModelMessage.smali Thu Aug 13 12:03:45 2020
***************
*** 151,156 ****
--- 151,158 ----
.field public content:Ljava/lang/String;
+ .field public deleted:Z
+
.field public editedTimestamp:Ljava/lang/String;
.field public final editedTimestampMilliseconds:Ljava/util/concurrent/atomic/AtomicReference;
***************
*** 330,335 ****
--- 332,341 ----
iput-object v0, p0, Lcom/discord/models/domain/ModelMessage;->editedTimestampMilliseconds:Ljava/util/concurrent/atomic/AtomicReference;
+ const/4 v0, 0x0
+
+ iput-boolean v0, p0, Lcom/discord/models/domain/ModelMessage;->deleted:Z
+
return-void
.end method
diff -crBN from/smali/com/discord/models/domain/ModelMessageEmbed.smali to/smali/com/discord/models/domain/ModelMessageEmbed.smali
*** from/smali/com/discord/models/domain/ModelMessageEmbed.smali Wed Aug 12 18:07:38 2020
--- to/smali/com/discord/models/domain/ModelMessageEmbed.smali Thu Aug 13 00:12:31 2020
***************
*** 2021,2027 ****
.end method
.method public isVideo()Z
! .locals 2
.line 1
iget-object v0, p0, Lcom/discord/models/domain/ModelMessageEmbed;->type:Ljava/lang/String;
--- 2021,2027 ----
.end method
.method public isVideo()Z
! .locals 3
.line 1
iget-object v0, p0, Lcom/discord/models/domain/ModelMessageEmbed;->type:Ljava/lang/String;
***************
*** 2030,2038 ****
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
! move-result v0
! return v0
.end method
.method public toString()Ljava/lang/String;
--- 2030,2057 ----
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
! move-result v1
! invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
!
! move-result-object v2
!
! invoke-virtual {v2}, Lcom/discord/stores/StoreUserSettings;->getAutoplayGifs()Z
!
! move-result v2
!
! if-nez v2, :cond_0
!
! const-string/jumbo v2, "gifv"
!
! invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
!
! move-result v2
!
! or-int v1, v1, v2
!
! :cond_0
! return v1
.end method
.method public toString()Ljava/lang/String;
diff -crBN from/smali/com/discord/stores/StoreMessagesHolder.smali to/smali/com/discord/stores/StoreMessagesHolder.smali
*** from/smali/com/discord/stores/StoreMessagesHolder.smali Wed Aug 12 18:07:38 2020
--- to/smali/com/discord/stores/StoreMessagesHolder.smali Thu Aug 13 15:01:22 2020
***************
*** 1395,1401 ****
.end method
.method public deleteMessages(JLjava/util/List;)V
! .locals 5
.param p3 # Ljava/util/List;
.annotation build Landroidx/annotation/Nullable;
.end annotation
--- 1395,1401 ----
.end method
.method public deleteMessages(JLjava/util/List;)V
! .locals 6
.param p3 # Ljava/util/List;
.annotation build Landroidx/annotation/Nullable;
.end annotation
***************
*** 1451,1456 ****
--- 1451,1464 ----
move-result-object p3
+ invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
+
+ move-result-object v5
+
+ invoke-virtual {v5}, Lcom/discord/stores/StoreUserSettings;->getNoDelete()Z
+
+ move-result v5
+
:cond_1
:goto_0
invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z
***************
*** 1485,1493 ****
--- 1493,1520 ----
move-result-object v2
+ if-nez v5, :cond_4
+
invoke-interface {v1, v2}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
+ goto :goto_2
+
+ :cond_4
+ invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
+
+ move-result-object v2
+
+ check-cast v2, Lcom/discord/models/domain/ModelMessage;
+
+ if-eqz v2, :cond_5
+
+ const/4 v3, 0x1
+
+ iput-boolean v3, v2, Lcom/discord/models/domain/ModelMessage;->deleted:Z
+
.line 7
+ :goto_2
+ :cond_5
iget-object v2, p0, Lcom/discord/stores/StoreMessagesHolder;->updatedChannels:Ljava/util/Set;
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
***************
*** 1500,1505 ****
--- 1527,1537 ----
.line 8
:cond_2
+ if-eqz v5, :cond_6
+
+ invoke-static {}, Lcom/cutthecord/Utils;->refreshView()V
+
+ :cond_6
invoke-direct {p0}, Lcom/discord/stores/StoreMessagesHolder;->publishIfUpdated()V
.line 9
diff -crBN from/smali/com/discord/stores/StoreUserSettings.smali to/smali/com/discord/stores/StoreUserSettings.smali
*** from/smali/com/discord/stores/StoreUserSettings.smali Wed Aug 12 18:07:39 2020
--- to/smali/com/discord/stores/StoreUserSettings.smali Thu Aug 13 00:12:31 2020
***************
*** 396,401 ****
--- 396,685 ----
return-void
.end method
+ .method public getAutoplayGifs()Z
+ .locals 3
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ const-string v1, "CACHE_KEY_CTC_AUTOPLAY_GIFS"
+
+ const/4 v2, 0x1
+
+ invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
+
+ move-result v0
+
+ return v0
+ .end method
+
+ .method public setAutoplayGifs(Z)V
+ .locals 2
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
+
+ move-result-object v0
+
+ const-string v1, "CACHE_KEY_CTC_AUTOPLAY_GIFS"
+
+ invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
+
+ move-result-object p1
+
+ invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
+
+ return-void
+ .end method
+
+ .method public getLeakChannels()Z
+ .locals 3
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ const-string v1, "CACHE_KEY_CTC_LEAK_CHANNELS"
+
+ const/4 v2, 0x1
+
+ invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
+
+ move-result v0
+
+ return v0
+ .end method
+
+ .method public setLeakChannels(Z)V
+ .locals 2
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
+
+ move-result-object v0
+
+ const-string v1, "CACHE_KEY_CTC_LEAK_CHANNELS"
+
+ invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
+
+ move-result-object p1
+
+ invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
+
+ return-void
+ .end method
+
+ .method public getImageSpoiler()Z
+ .locals 3
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ const-string v1, "CACHE_KEY_CTC_IMAGE_SPOILER"
+
+ const/4 v2, 0x0
+
+ invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
+
+ move-result v0
+
+ return v0
+ .end method
+
+ .method public setImageSpoiler(Z)V
+ .locals 2
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
+
+ move-result-object v0
+
+ const-string v1, "CACHE_KEY_CTC_IMAGE_SPOILER"
+
+ invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
+
+ move-result-object p1
+
+ invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
+
+ return-void
+ .end method
+
+
+ .method public getNoDelete()Z
+ .locals 3
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ const-string v1, "CACHE_KEY_CTC_NO_DELETE"
+
+ const/4 v2, 0x0
+
+ invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
+
+ move-result v0
+
+ return v0
+ .end method
+
+ .method public setNoDelete(Z)V
+ .locals 2
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
+
+ move-result-object v0
+
+ const-string v1, "CACHE_KEY_CTC_NO_DELETE"
+
+ invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
+
+ move-result-object p1
+
+ invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
+
+ return-void
+ .end method
+
+ .method public getShowTyping()Z
+ .locals 3
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ const-string v1, "CACHE_KEY_CTC_SHOW_TYPING"
+
+ const/4 v2, 0x1
+
+ invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
+
+ move-result v0
+
+ return v0
+ .end method
+
+ .method public setShowTyping(Z)V
+ .locals 2
+
+ iget-object v0, p0, Lcom/discord/stores/StoreUserSettings;->prefs:Landroid/content/SharedPreferences;
+
+ invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
+
+ move-result-object v0
+
+ const-string v1, "CACHE_KEY_CTC_SHOW_TYPING"
+
+ invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
+
+ move-result-object p1
+
+ invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
+
+ return-void
+ .end method
+
+
+ .method public getStoredToken()Ljava/lang/String;
+ .locals 3
+
+ iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->prefs:Landroid/content/SharedPreferences;
+
+ const-string v1, "none"
+
+ const-string v2, "STORE_AUTHED_TOKEN"
+
+ invoke-interface {v0, v2, v1}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object v0
+
+ return-object v0
+ .end method
+
+
+ .method public setStoredToken(Ljava/lang/String;)V
+ .locals 2
+
+ iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->prefs:Landroid/content/SharedPreferences;
+
+ invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
+
+ move-result-object v0
+
+ const-string v1, "STORE_AUTHED_TOKEN"
+
+ invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
+
+ move-result-object p1
+
+ invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
+
+ return-void
+ .end method
+
+ .method public getAccountToken(Ljava/lang/String;)Ljava/lang/String;
+ .locals 3
+
+ const-string v2, "STORE_AUTHED_TOKEN_CTC_USER_"
+
+ invoke-virtual {p1}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
+
+ move-result-object p1
+
+ new-instance v0, Ljava/lang/StringBuilder;
+
+ invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object v2
+
+ iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->prefs:Landroid/content/SharedPreferences;
+
+ const-string v1, "none"
+
+ invoke-interface {v0, v2, v1}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object v0
+
+ return-object v0
+ .end method
+
+
+ .method public setAccountToken(Ljava/lang/String;Ljava/lang/String;)V
+ .locals 2
+
+ const-string v1, "STORE_AUTHED_TOKEN_CTC_USER_"
+
+ invoke-virtual {p1}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
+
+ move-result-object p1
+
+ new-instance v0, Ljava/lang/StringBuilder;
+
+ invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object v1
+
+ iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->prefs:Landroid/content/SharedPreferences;
+
+ invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
+
+ move-result-object v0
+
+ invoke-interface {v0, v1, p2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
+
+ move-result-object p1
+
+ invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
+
+ return-void
+ .end method
+
.method private getAdjustedTheme(Ljava/lang/String;)Ljava/lang/String;
.locals 1
diff -crBN from/smali/com/discord/utilities/rest/SendUtils$getPart$1$1.smali to/smali/com/discord/utilities/rest/SendUtils$getPart$1$1.smali
*** from/smali/com/discord/utilities/rest/SendUtils$getPart$1$1.smali Wed Aug 12 18:07:39 2020
--- to/smali/com/discord/utilities/rest/SendUtils$getPart$1$1.smali Thu Aug 13 00:12:31 2020
***************
*** 46,51 ****
--- 46,85 ----
return-void
.end method
+ .method public static final interceptFilename(Ljava/lang/String;)Ljava/lang/String;
+ .locals 3
+
+ invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
+
+ move-result-object v0
+
+ invoke-virtual {v0}, Lcom/discord/stores/StoreUserSettings;->getImageSpoiler()Z
+
+ move-result v1
+
+ if-eqz v1, :cond_1
+
+ new-instance v2, Ljava/lang/StringBuilder;
+
+ const-string v1, "SPOILER_"
+
+ invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object p0
+
+ # I commented this out and do this in StoreMessages now as this'd only work for a single image
+ # const/4 v1, 0x0
+
+ # invoke-virtual {v0, v1}, Lcom/discord/stores/StoreUserSettings;->setImageSpoiler(Z)V
+
+ :cond_1
+ return-object p0
+ .end method
+
# virtual methods
.method public final invoke(Lokhttp3/RequestBody;Ljava/lang/String;Landroid/graphics/Bitmap$CompressFormat;)Lcom/discord/utilities/rest/SendUtils$FileUpload;
***************
*** 77,82 ****
--- 111,120 ----
move-result-object v3
+ invoke-static {v3}, Lcom/discord/utilities/rest/SendUtils$getPart$1$1;->interceptFilename(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object v3
+
.line 4
iget-object p1, p0, Lcom/discord/utilities/rest/SendUtils$getPart$1$1;->this$0:Lcom/discord/utilities/rest/SendUtils$getPart$1;
diff -crBN from/smali/com/discord/widgets/chat/input/WidgetChatInputEditText$1.smali to/smali/com/discord/widgets/chat/input/WidgetChatInputEditText$1.smali
*** from/smali/com/discord/widgets/chat/input/WidgetChatInputEditText$1.smali Wed Aug 12 18:07:40 2020
--- to/smali/com/discord/widgets/chat/input/WidgetChatInputEditText$1.smali Thu Aug 13 00:12:31 2020
***************
*** 59,64 ****
--- 59,74 ----
invoke-virtual {v0}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->saveText()V
+ invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
+
+ move-result-object v0
+
+ invoke-virtual {v0}, Lcom/discord/stores/StoreUserSettings;->getShowTyping()Z
+
+ move-result v0
+
+ if-eqz v0, :cond_1
+
.line 4
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
diff -crBN from/smali/com/discord/widgets/chat/input/WidgetChatInputSend.smali to/smali/com/discord/widgets/chat/input/WidgetChatInputSend.smali
*** from/smali/com/discord/widgets/chat/input/WidgetChatInputSend.smali Wed Aug 12 18:07:40 2020
--- to/smali/com/discord/widgets/chat/input/WidgetChatInputSend.smali Thu Aug 13 00:12:31 2020
***************
*** 60,65 ****
--- 60,89 ----
return p0
.end method
+ .method public static final access$SetInput(Lcom/discord/widgets/chat/input/WidgetChatInputSend;Lcom/discord/widgets/chat/input/WidgetChatInputEditText;Ljava/lang/CharSequence;)Z
+ .locals 1
+
+ .line 147
+ invoke-virtual {p1, p2}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->setText(Ljava/lang/CharSequence;)V
+
+ .line 148
+ invoke-virtual {p1}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->clearLastTypingEmission()V
+
+ .line 151
+ invoke-static {}, Lcom/discord/stores/StoreStream;->getChat()Lcom/discord/stores/StoreChat;
+
+ move-result-object p1
+
+ const/4 v0, 0x0
+
+ .line 152
+ invoke-virtual {p1, v0}, Lcom/discord/stores/StoreChat;->setEditingMessage(Lcom/discord/stores/StoreChat$EditingMessage;)V
+
+ const/4 p1, 0x1
+
+ return p1
+ .end method
+
.method private final clearInput(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;Lcom/lytefast/flexinput/viewmodel/FlexInputViewModel;Ljava/lang/Boolean;)Z
.locals 1
diff -crBN from/smali/com/discord/widgets/chat/list/InlineMediaView.smali to/smali/com/discord/widgets/chat/list/InlineMediaView.smali
*** from/smali/com/discord/widgets/chat/list/InlineMediaView.smali Wed Aug 12 18:07:40 2020
--- to/smali/com/discord/widgets/chat/list/InlineMediaView.smali Thu Aug 13 00:12:31 2020
***************
*** 1289,1294 ****
--- 1289,1304 ----
move-result v1
+ invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
+
+ move-result-object v7
+
+ invoke-virtual {v7}, Lcom/discord/stores/StoreUserSettings;->getAutoplayGifs()Z
+
+ move-result v7
+
+ and-int v1, v1, v7
+
if-eqz v1, :cond_6
const/4 v7, 0x1
diff -crBN from/smali/com/discord/widgets/chat/list/WidgetChatList.smali to/smali/com/discord/widgets/chat/list/WidgetChatList.smali
*** from/smali/com/discord/widgets/chat/list/WidgetChatList.smali Wed Aug 12 18:07:40 2020
--- to/smali/com/discord/widgets/chat/list/WidgetChatList.smali Thu Aug 13 13:58:01 2020
***************
*** 40,45 ****
--- 40,47 ----
.line 3
iput-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatList;->_flexInputViewModel:Lcom/discord/widgets/chat/input/AppFlexInputViewModel;
+ sput-object p0, Lcom/cutthecord/Utils;->messageFragment:Landroidx/fragment/app/Fragment;
+
return-void
.end method
diff -crBN from/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemMessage.smali to/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemMessage.smali
*** from/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemMessage.smali Wed Aug 12 18:07:40 2020
--- to/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemMessage.smali Thu Aug 13 12:19:34 2020
***************
*** 1193,1198 ****
--- 1193,1257 ----
.line 20
:cond_3
+ iget-boolean v2, v14, Lcom/discord/models/domain/ModelMessage;->deleted:Z
+
+ if-eqz v2, :cond_d
+
+ new-instance v2, Ljava/util/ArrayList;
+
+ const/4 v3, 0x2
+
+ invoke-direct {v2, v3}, Ljava/util/ArrayList;-><init>(I)V
+
+ .line 14
+ new-instance v3, Landroid/text/style/RelativeSizeSpan;
+
+ const/high16 v4, 0x3f400000 # 0.75f
+
+ invoke-direct {v3, v4}, Landroid/text/style/RelativeSizeSpan;-><init>(F)V
+
+ invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
+
+ .line 15
+ new-instance v3, Landroid/text/style/ForegroundColorSpan;
+
+ const v4, 0x7f040166
+
+ invoke-static {v15, v4}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/content/Context;I)I
+
+ move-result v4
+
+ invoke-direct {v3, v4}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V
+
+ invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
+
+ .line 16
+ new-instance v3, Lf/a/j/a/a/a;
+
+ const-string v4, " "
+
+ invoke-direct {v3, v4}, Lf/a/j/a/a/a;-><init>(Ljava/lang/String;)V
+
+ invoke-interface {v13, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
+
+ .line 17
+ new-instance v3, Lcom/discord/simpleast/core/node/StyleNode;
+
+ invoke-direct {v3, v2}, Lcom/discord/simpleast/core/node/StyleNode;-><init>(Ljava/util/List;)V
+
+ .line 18
+ new-instance v2, Lf/a/j/a/a/a;
+
+ const-string v4, "(deleted)"
+
+ invoke-direct {v2, v4}, Lf/a/j/a/a/a;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v3, v2}, Lcom/discord/simpleast/core/node/Node;->addChild(Lcom/discord/simpleast/core/node/Node;)V
+
+ .line 19
+ invoke-interface {v13, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
+
+ :cond_d
invoke-virtual {v12}, Lcom/discord/utilities/textprocessing/MessagePreprocessor;->isLinkifyConflicting()Z
move-result v2