936 lines
31 KiB
Diff
936 lines
31 KiB
Diff
diff -crBN from/smali/com/cutthecord/DeletedMessageNode.smali to/smali/com/cutthecord/DeletedMessageNode.smali
|
|
*** from/smali/com/cutthecord/DeletedMessageNode.smali 1970-01-01 01:00:00.000000000 +0100
|
|
--- to/smali/com/cutthecord/DeletedMessageNode.smali 2020-11-18 17:17:21.139501878 +0100
|
|
***************
|
|
*** 0 ****
|
|
--- 1,57 ----
|
|
+ .class public final Lcom/cutthecord/DeletedMessageNode;
|
|
+ .super Lcom/discord/simpleast/core/node/StyleNode;
|
|
+
|
|
+
|
|
+ # direct methods
|
|
+ .method public constructor <init>(Landroid/content/Context;)V
|
|
+ .locals 5
|
|
+
|
|
+ const-string v0, "context"
|
|
+
|
|
+ invoke-static {p1, v0}, Ly/m/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
+
|
|
+ const/4 v0, 0x2
|
|
+
|
|
+ new-array v0, v0, [Ljava/lang/Object;
|
|
+
|
|
+ .line 1
|
|
+ sget-object v1, Lcom/discord/utilities/textprocessing/node/EditedMessageNode;->Companion:Lcom/discord/utilities/textprocessing/node/EditedMessageNode$Companion;
|
|
+
|
|
+ const/4 v2, 0x0
|
|
+
|
|
+ const/4 v3, 0x1
|
|
+
|
|
+ invoke-static {v1, v2, v3, v2}, Lcom/discord/utilities/textprocessing/node/EditedMessageNode$Companion;->getRelativeSizeSpan$default(Lcom/discord/utilities/textprocessing/node/EditedMessageNode$Companion;FILjava/lang/Object;)Landroid/text/style/RelativeSizeSpan;
|
|
+
|
|
+ move-result-object v2
|
|
+
|
|
+ const/4 v4, 0x0
|
|
+
|
|
+ aput-object v2, v0, v4
|
|
+
|
|
+ .line 2
|
|
+ invoke-static {v1, p1}, Lcom/discord/utilities/textprocessing/node/EditedMessageNode$Companion;->access$getForegroundColorSpan(Lcom/discord/utilities/textprocessing/node/EditedMessageNode$Companion;Landroid/content/Context;)Landroid/text/style/ForegroundColorSpan;
|
|
+
|
|
+ move-result-object v2
|
|
+
|
|
+ aput-object v2, v0, v3
|
|
+
|
|
+ .line 3
|
|
+ invoke-static {v0}, Ly/h/f;->listOf([Ljava/lang/Object;)Ljava/util/List;
|
|
+
|
|
+ move-result-object v0
|
|
+
|
|
+ .line 4
|
|
+ invoke-direct {p0, v0}, Lcom/discord/simpleast/core/node/StyleNode;-><init>(Ljava/util/List;)V
|
|
+
|
|
+ .line 5
|
|
+ new-instance v0, Lf/a/j/b/a/a;
|
|
+
|
|
+ const-string p1, " (deleted)"
|
|
+
|
|
+ invoke-direct {v0, p1}, Lf/a/j/b/a/a;-><init>(Ljava/lang/String;)V
|
|
+
|
|
+ invoke-virtual {p0, v0}, Lcom/discord/simpleast/core/node/Node;->addChild(Lcom/discord/simpleast/core/node/Node;)V
|
|
+
|
|
+ return-void
|
|
+ .end method
|
|
diff -crBN from/smali/com/cutthecord/refreshView.smali to/smali/com/cutthecord/refreshView.smali
|
|
*** from/smali/com/cutthecord/refreshView.smali 1970-01-01 01:00:00.000000000 +0100
|
|
--- to/smali/com/cutthecord/refreshView.smali 2020-09-30 16:29:54.258269300 +0200
|
|
***************
|
|
*** 0 ****
|
|
--- 1,65 ----
|
|
+ .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
|
|
+
|
|
+ if-eqz v1, :cond_0
|
|
+
|
|
+ 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/cutthecord/Utils.smali to/smali/com/cutthecord/Utils.smali
|
|
*** from/smali/com/cutthecord/Utils.smali 1970-01-01 01:00:00.000000000 +0100
|
|
--- to/smali/com/cutthecord/Utils.smali 2020-09-30 16:29:54.257704600 +0200
|
|
***************
|
|
*** 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/discord/models/domain/ModelChannel.smali to/smali/com/discord/models/domain/ModelChannel.smali
|
|
*** from/smali/com/discord/models/domain/ModelChannel.smali 2020-11-18 08:44:33.829144700 +0100
|
|
--- to/smali/com/discord/models/domain/ModelChannel.smali 2020-11-18 08:49:59.640053600 +0100
|
|
***************
|
|
*** 2292,2297 ****
|
|
--- 2292,2307 ----
|
|
}
|
|
.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/ModelMessageEmbed.smali to/smali/com/discord/models/domain/ModelMessageEmbed.smali
|
|
*** from/smali/com/discord/models/domain/ModelMessageEmbed.smali 2020-11-18 08:44:33.885399100 +0100
|
|
--- to/smali/com/discord/models/domain/ModelMessageEmbed.smali 2020-11-18 08:49:59.641929600 +0100
|
|
***************
|
|
*** 1964,1970 ****
|
|
.end method
|
|
|
|
.method public isVideo()Z
|
|
! .locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/discord/models/domain/ModelMessageEmbed;->type:Ljava/lang/String;
|
|
--- 1964,1970 ----
|
|
.end method
|
|
|
|
.method public isVideo()Z
|
|
! .locals 3
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/discord/models/domain/ModelMessageEmbed;->type:Ljava/lang/String;
|
|
***************
|
|
*** 1973,1981 ****
|
|
|
|
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;
|
|
--- 1973,2000 ----
|
|
|
|
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/models/domain/ModelMessage.smali to/smali/com/discord/models/domain/ModelMessage.smali
|
|
*** from/smali/com/discord/models/domain/ModelMessage.smali 2020-11-18 08:44:33.885632800 +0100
|
|
--- to/smali/com/discord/models/domain/ModelMessage.smali 2020-11-18 09:03:53.463811900 +0100
|
|
***************
|
|
*** 157,162 ****
|
|
--- 157,164 ----
|
|
|
|
.field private content:Ljava/lang/String;
|
|
|
|
+ .field public deleted:Z
|
|
+
|
|
.field private editedTimestamp:Ljava/lang/String;
|
|
|
|
.field private transient editedTimestampMilliseconds:Ljava/lang/Long;
|
|
***************
|
|
*** 314,319 ****
|
|
--- 316,325 ----
|
|
|
|
iput-object v0, p0, Lcom/discord/models/domain/ModelMessage;->author:Lcom/discord/models/domain/ModelUser;
|
|
|
|
+ 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/stores/StoreMessagesHolder.smali to/smali/com/discord/stores/StoreMessagesHolder.smali
|
|
*** from/smali/com/discord/stores/StoreMessagesHolder.smali 2020-11-18 08:44:35.515221400 +0100
|
|
--- to/smali/com/discord/stores/StoreMessagesHolder.smali 2020-11-18 09:07:45.254662900 +0100
|
|
***************
|
|
*** 1391,1397 ****
|
|
.end method
|
|
|
|
.method public deleteMessages(JLjava/util/List;)V
|
|
! .locals 5
|
|
.param p3 # Ljava/util/List;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
--- 1391,1397 ----
|
|
.end method
|
|
|
|
.method public deleteMessages(JLjava/util/List;)V
|
|
! .locals 6
|
|
.param p3 # Ljava/util/List;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
***************
|
|
*** 1447,1452 ****
|
|
--- 1447,1460 ----
|
|
|
|
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
|
|
***************
|
|
*** 1481,1489 ****
|
|
--- 1489,1516 ----
|
|
|
|
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;
|
|
***************
|
|
*** 1496,1501 ****
|
|
--- 1523,1533 ----
|
|
|
|
.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 2020-11-18 08:44:36.126243200 +0100
|
|
--- to/smali/com/discord/stores/StoreUserSettings.smali 2020-11-18 08:49:59.644070100 +0100
|
|
***************
|
|
*** 403,408 ****
|
|
--- 403,692 ----
|
|
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 2020-11-18 08:44:37.280416700 +0100
|
|
--- to/smali/com/discord/utilities/rest/SendUtils$getPart$1$1.smali 2020-11-18 08:49:59.644909000 +0100
|
|
***************
|
|
*** 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;
|
|
***************
|
|
*** 79,84 ****
|
|
--- 113,122 ----
|
|
|
|
move-result-object v2
|
|
|
|
+ invoke-static {v2}, Lcom/discord/utilities/rest/SendUtils$getPart$1$1;->interceptFilename(Ljava/lang/String;)Ljava/lang/String;
|
|
+
|
|
+ move-result-object v2
|
|
+
|
|
.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/utilities/textprocessing/DiscordParser.smali to/smali/com/discord/utilities/textprocessing/DiscordParser.smali
|
|
*** from/smali/com/discord/utilities/textprocessing/DiscordParser.smali 2020-11-18 08:44:37.732483800 +0100
|
|
--- to/smali/com/discord/utilities/textprocessing/DiscordParser.smali 2020-11-18 17:10:51.579132721 +0100
|
|
***************
|
|
*** 77,82 ****
|
|
--- 77,106 ----
|
|
.end method
|
|
|
|
.method public static final parseChannelMessage(Landroid/content/Context;Ljava/lang/String;Lcom/discord/utilities/textprocessing/MessageRenderContext;Lcom/discord/utilities/textprocessing/MessagePreprocessor;ZZ)Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
|
|
+ .locals 7
|
|
+
|
|
+ move-object v0, p0
|
|
+
|
|
+ move-object v1, p1
|
|
+
|
|
+ move-object v2, p2
|
|
+
|
|
+ move-object v3, p3
|
|
+
|
|
+ move v4, p4
|
|
+
|
|
+ move v5, p5
|
|
+
|
|
+ const/4 v6, 0x0
|
|
+
|
|
+ invoke-static/range {v0 .. v6}, Lcom/discord/utilities/textprocessing/DiscordParser;->parseChannelMessage(Landroid/content/Context;Ljava/lang/String;Lcom/discord/utilities/textprocessing/MessageRenderContext;Lcom/discord/utilities/textprocessing/MessagePreprocessor;ZZZ)Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
|
|
+
|
|
+ move-result-object p0
|
|
+
|
|
+ return-object p0
|
|
+ .end method
|
|
+
|
|
+ .method public static final parseChannelMessage(Landroid/content/Context;Ljava/lang/String;Lcom/discord/utilities/textprocessing/MessageRenderContext;Lcom/discord/utilities/textprocessing/MessagePreprocessor;ZZZ)Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
|
|
.locals 6
|
|
|
|
const-string v0, "context"
|
|
***************
|
|
*** 145,150 ****
|
|
--- 169,183 ----
|
|
|
|
.line 5
|
|
:cond_2
|
|
+ if-eqz p6, :cond_3
|
|
+
|
|
+ new-instance p3, Lcom/cutthecord/DeletedMessageNode;
|
|
+
|
|
+ invoke-direct {p3, p0}, Lcom/cutthecord/DeletedMessageNode;-><init>(Landroid/content/Context;)V
|
|
+
|
|
+ invoke-interface {p1, p3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
+
|
|
+ :cond_3
|
|
new-instance p0, Lcom/discord/utilities/textprocessing/node/ZeroSpaceWidthNode;
|
|
|
|
invoke-direct {p0}, Lcom/discord/utilities/textprocessing/node/ZeroSpaceWidthNode;-><init>()V
|
|
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 2020-11-18 08:44:39.052085500 +0100
|
|
--- to/smali/com/discord/widgets/chat/input/WidgetChatInputEditText$1.smali 2020-11-18 08:49:59.645926800 +0100
|
|
***************
|
|
*** 59,64 ****
|
|
--- 59,74 ----
|
|
|
|
move-result p1
|
|
|
|
+ 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
|
|
iget-boolean v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText$1;->empty:Z
|
|
|
|
diff -crBN from/smali/com/discord/widgets/chat/input/WidgetChatInputEditText.smali to/smali/com/discord/widgets/chat/input/WidgetChatInputEditText.smali
|
|
*** from/smali/com/discord/widgets/chat/input/WidgetChatInputEditText.smali 2020-11-18 08:44:39.052781000 +0100
|
|
--- to/smali/com/discord/widgets/chat/input/WidgetChatInputEditText.smali 2020-11-18 08:49:59.647079700 +0100
|
|
***************
|
|
*** 6,12 ****
|
|
# instance fields
|
|
.field public channelId:J
|
|
|
|
! .field private editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
.field private final emptyTextSubject:Lrx/subjects/Subject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
--- 6,12 ----
|
|
# instance fields
|
|
.field public channelId:J
|
|
|
|
! .field public editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
.field private final emptyTextSubject:Lrx/subjects/Subject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
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 2020-11-18 08:44:39.077990300 +0100
|
|
--- to/smali/com/discord/widgets/chat/input/WidgetChatInputSend.smali 2020-11-18 08:49:59.649027200 +0100
|
|
***************
|
|
*** 64,69 ****
|
|
--- 64,96 ----
|
|
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
|
|
+ iget-object v0, p1, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
+
|
|
+ .line 148
|
|
+ invoke-virtual {v0, p2}, Lcom/lytefast/flexinput/widget/FlexEditText;->setText(Ljava/lang/CharSequence;)V
|
|
+
|
|
+ .line 149
|
|
+ invoke-virtual {p1}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->clearLastTypingEmission()V
|
|
+
|
|
+ .line 150
|
|
+ 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/discord/widgets/chat/input/AppFlexInputViewModel;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 2020-11-18 08:44:39.227132600 +0100
|
|
--- to/smali/com/discord/widgets/chat/list/InlineMediaView.smali 2020-11-18 08:49:59.650827200 +0100
|
|
***************
|
|
*** 1256,1261 ****
|
|
--- 1256,1271 ----
|
|
|
|
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/WidgetChatListAdapterItemMessage.smali to/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemMessage.smali
|
|
*** from/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemMessage.smali 2020-11-18 08:44:39.294155100 +0100
|
|
--- to/smali/com/discord/widgets/chat/list/WidgetChatListAdapterItemMessage.smali 2020-11-18 10:42:14.869621100 +0100
|
|
***************
|
|
*** 1741,1755 ****
|
|
|
|
move-result-object v2
|
|
|
|
! move-object v0, v6
|
|
|
|
move-object v3, v10
|
|
|
|
.line 13
|
|
! invoke-static/range {v0 .. v5}, Lcom/discord/utilities/textprocessing/DiscordParser;->parseChannelMessage(Landroid/content/Context;Ljava/lang/String;Lcom/discord/utilities/textprocessing/MessageRenderContext;Lcom/discord/utilities/textprocessing/MessagePreprocessor;ZZ)Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
.line 14
|
|
invoke-virtual {v10}, Lcom/discord/utilities/textprocessing/MessagePreprocessor;->isLinkifyConflicting()Z
|
|
|
|
--- 1741,1761 ----
|
|
|
|
move-result-object v2
|
|
|
|
! move-object v0, v6
|
|
|
|
move-object v3, v10
|
|
|
|
.line 13
|
|
! iget-boolean v6, v7, Lcom/discord/models/domain/ModelMessage;->deleted:Z
|
|
!
|
|
! invoke-static/range {v0 .. v6}, Lcom/discord/utilities/textprocessing/DiscordParser;->parseChannelMessage(Landroid/content/Context;Ljava/lang/String;Lcom/discord/utilities/textprocessing/MessageRenderContext;Lcom/discord/utilities/textprocessing/MessagePreprocessor;ZZZ)Lcom/facebook/drawee/span/DraweeSpanStringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
+ invoke-virtual {p1}, Landroid/widget/TextView;->getContext()Landroid/content/Context;
|
|
+
|
|
+ move-result-object v6
|
|
+
|
|
.line 14
|
|
invoke-virtual {v10}, Lcom/discord/utilities/textprocessing/MessagePreprocessor;->isLinkifyConflicting()Z
|
|
|
|
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 2020-11-18 08:44:39.239234500 +0100
|
|
--- to/smali/com/discord/widgets/chat/list/WidgetChatList.smali 2020-11-18 17:19:11.826083247 +0100
|
|
***************
|
|
*** 44,49 ****
|
|
--- 44,51 ----
|
|
.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
|
|
|