diff --git a/com.discord/apktool.yml b/com.discord/apktool.yml
index 919427a64e..2c7a73ee09 100644
--- a/com.discord/apktool.yml
+++ b/com.discord/apktool.yml
@@ -1,5 +1,5 @@
!!brut.androlib.meta.MetaInfo
-apkFileName: com.discord-1247.apk
+apkFileName: com.discord-1248.apk
compressionType: false
doNotCompress:
- resources.arsc
@@ -3106,5 +3106,5 @@ usesFramework:
tag: null
version: 2.4.2-83a459-SNAPSHOT
versionInfo:
- versionCode: '1247'
- versionName: '37'
+ versionCode: '1248'
+ versionName: '37.1'
diff --git a/com.discord/original/AndroidManifest.xml b/com.discord/original/AndroidManifest.xml
index bdf23b38bf..32d04622a8 100644
Binary files a/com.discord/original/AndroidManifest.xml and b/com.discord/original/AndroidManifest.xml differ
diff --git a/com.discord/res/values/strings.xml b/com.discord/res/values/strings.xml
index 8a40f676d6..5be5a04502 100644
--- a/com.discord/res/values/strings.xml
+++ b/com.discord/res/values/strings.xml
@@ -1131,7 +1131,7 @@ We’re here to make a good impression."
Presets
Select a color
Transparency
- 69aa2cdb644d4c6fb6de7389a17f0698
+ 81819fc0e9e94eb9bbecedfcae806012
Coming Soon
Search Animated GIFs on the Web
Displays text with emphasis.
diff --git a/com.discord/smali/com/discord/BuildConfig.smali b/com.discord/smali/com/discord/BuildConfig.smali
index f4a6ef6e18..4760c92995 100644
--- a/com.discord/smali/com/discord/BuildConfig.smali
+++ b/com.discord/smali/com/discord/BuildConfig.smali
@@ -42,11 +42,11 @@
.field public static final SAMSUNGxDISCORD_CLIENT_ID:Ljava/lang/String; = "97t47j218f"
-.field public static final USER_AGENT:Ljava/lang/String; = "Discord-Android/1247"
+.field public static final USER_AGENT:Ljava/lang/String; = "Discord-Android/1248"
-.field public static final VERSION_CODE:I = 0x4df
+.field public static final VERSION_CODE:I = 0x4e0
-.field public static final VERSION_NAME:Ljava/lang/String; = "37"
+.field public static final VERSION_NAME:Ljava/lang/String; = "37.1"
# direct methods
diff --git a/com.discord/smali/com/discord/stores/StoreClientVersion.smali b/com.discord/smali/com/discord/stores/StoreClientVersion.smali
index 852c368e01..0b77c0875f 100644
--- a/com.discord/smali/com/discord/stores/StoreClientVersion.smali
+++ b/com.discord/smali/com/discord/stores/StoreClientVersion.smali
@@ -28,7 +28,7 @@
invoke-direct {p0}, Lcom/discord/stores/Store;->()V
- const/16 v0, 0x4df
+ const/16 v0, 0x4e0
iput v0, p0, Lcom/discord/stores/StoreClientVersion;->clientVersion:I
diff --git a/com.discord/smali/com/discord/stores/StoreLocalMessagesHolder.smali b/com.discord/smali/com/discord/stores/StoreLocalMessagesHolder.smali
index f76b7bb27a..f413c9d344 100644
--- a/com.discord/smali/com/discord/stores/StoreLocalMessagesHolder.smali
+++ b/com.discord/smali/com/discord/stores/StoreLocalMessagesHolder.smali
@@ -597,6 +597,98 @@
return-void
.end method
+.method public final deleteMessage(JLjava/lang/String;)V
+ .locals 3
+ .annotation runtime Lcom/discord/stores/StoreThread;
+ .end annotation
+
+ const/4 v0, 0x0
+
+ if-eqz p3, :cond_3
+
+ iget-object v1, p0, Lcom/discord/stores/StoreLocalMessagesHolder;->messages:Ljava/util/HashMap;
+
+ invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
+
+ move-result-object p1
+
+ invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
+
+ move-result-object p1
+
+ check-cast p1, Ljava/util/TreeMap;
+
+ if-eqz p1, :cond_2
+
+ const-string p2, "messages[channelId] ?: return"
+
+ invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
+
+ invoke-virtual {p1}, Ljava/util/TreeMap;->values()Ljava/util/Collection;
+
+ move-result-object p1
+
+ const-string p2, "messagesForChannel.values"
+
+ invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
+
+ invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
+
+ move-result-object p1
+
+ :cond_0
+ invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
+
+ move-result p2
+
+ if-eqz p2, :cond_1
+
+ invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
+
+ move-result-object p2
+
+ move-object v1, p2
+
+ check-cast v1, Lcom/discord/models/domain/ModelMessage;
+
+ const-string v2, "message"
+
+ invoke-static {v1, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
+
+ invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessage;->getNonce()Ljava/lang/String;
+
+ move-result-object v1
+
+ invoke-static {v1, p3}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
+
+ move-result v1
+
+ if-eqz v1, :cond_0
+
+ move-object v0, p2
+
+ :cond_1
+ check-cast v0, Lcom/discord/models/domain/ModelMessage;
+
+ if-eqz v0, :cond_2
+
+ const-string p1, "messagesForChannel.value\u2026once == nonce } ?: return"
+
+ invoke-static {v0, p1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
+
+ invoke-virtual {p0, v0}, Lcom/discord/stores/StoreLocalMessagesHolder;->deleteMessage(Lcom/discord/models/domain/ModelMessage;)V
+
+ :cond_2
+ return-void
+
+ :cond_3
+ const-string p1, "nonce"
+
+ invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
+
+ throw v0
+.end method
+
.method public final deleteMessage(Lcom/discord/models/domain/ModelMessage;)V
.locals 6
.annotation runtime Lcom/discord/stores/StoreThread;
diff --git a/com.discord/smali/com/discord/stores/StoreMessages$sendMessage$request$1$1$1.smali b/com.discord/smali/com/discord/stores/StoreMessages$sendMessage$request$1$1$1.smali
index 9990e4addb..81c0361238 100644
--- a/com.discord/smali/com/discord/stores/StoreMessages$sendMessage$request$1$1$1.smali
+++ b/com.discord/smali/com/discord/stores/StoreMessages$sendMessage$request$1$1$1.smali
@@ -125,18 +125,6 @@
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
- iget-object v1, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
-
- iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->$localMessage:Lcom/discord/models/domain/ModelMessage;
-
- invoke-static {v0, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
-
- invoke-static {v1, v0}, Lcom/discord/stores/StoreMessages;->access$handleLocalMessageDelete(Lcom/discord/stores/StoreMessages;Lcom/discord/models/domain/ModelMessage;)V
-
- iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
-
- iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
-
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
iget-object v1, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->$result:Lcom/discord/utilities/messagesend/MessageResult;
diff --git a/com.discord/smali/com/discord/stores/StoreMessages.smali b/com.discord/smali/com/discord/stores/StoreMessages.smali
index 33867a6728..2b39338a2b 100644
--- a/com.discord/smali/com/discord/stores/StoreMessages.smali
+++ b/com.discord/smali/com/discord/stores/StoreMessages.smali
@@ -1725,7 +1725,7 @@
.end method
.method public final handleMessageCreate(Ljava/util/List;)V
- .locals 1
+ .locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
@@ -1736,15 +1736,50 @@
}
.end annotation
- if-eqz p1, :cond_0
+ if-eqz p1, :cond_2
+ invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
+
+ move-result-object v0
+
+ :cond_0
+ :goto_0
+ invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
+
+ move-result v1
+
+ if-eqz v1, :cond_1
+
+ invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
+
+ move-result-object v1
+
+ check-cast v1, Lcom/discord/models/domain/ModelMessage;
+
+ invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessage;->getNonce()Ljava/lang/String;
+
+ move-result-object v2
+
+ if-eqz v2, :cond_0
+
+ iget-object v3, p0, Lcom/discord/stores/StoreMessages;->localMessagesHolder:Lcom/discord/stores/StoreLocalMessagesHolder;
+
+ invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessage;->getChannelId()J
+
+ move-result-wide v4
+
+ invoke-virtual {v3, v4, v5, v2}, Lcom/discord/stores/StoreLocalMessagesHolder;->deleteMessage(JLjava/lang/String;)V
+
+ goto :goto_0
+
+ :cond_1
iget-object v0, p0, Lcom/discord/stores/StoreMessages;->holder:Lcom/discord/stores/StoreMessagesHolder;
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreMessagesHolder;->addMessages(Ljava/util/List;)V
return-void
- :cond_0
+ :cond_2
const-string p1, "messagesList"
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
diff --git a/com.discord/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali b/com.discord/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali
index 82905ed7b6..9762da7d21 100644
--- a/com.discord/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali
+++ b/com.discord/smali/com/discord/utilities/analytics/AnalyticSuperProperties.smali
@@ -177,7 +177,7 @@
const-string v3, "browser_user_agent"
- const-string v4, "Discord-Android/1247"
+ const-string v4, "Discord-Android/1248"
invoke-direct {v2, v3, v4}, Lkotlin/Pair;->(Ljava/lang/Object;Ljava/lang/Object;)V
@@ -185,7 +185,7 @@
const/4 v1, 0x2
- const/16 v2, 0x4df
+ const/16 v2, 0x4e0
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
@@ -205,7 +205,7 @@
const-string v3, "client_version"
- const-string v4, "37"
+ const-string v4, "37.1"
invoke-direct {v2, v3, v4}, Lkotlin/Pair;->(Ljava/lang/Object;Ljava/lang/Object;)V
diff --git a/com.discord/smali/com/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1.smali b/com.discord/smali/com/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1.smali
index 9343e4f7ef..8aa0f19541 100644
--- a/com.discord/smali/com/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1.smali
+++ b/com.discord/smali/com/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1.smali
@@ -24,16 +24,20 @@
.field public final synthetic $sound$inlined:Lcom/discord/utilities/media/AppSound;
+.field public final synthetic this$0:Lcom/discord/utilities/media/AppSoundManager$SoundPlayer;
+
# direct methods
-.method public constructor (Lcom/discord/utilities/media/AppSound;Landroid/content/Context;Lkotlin/jvm/functions/Function0;)V
+.method public constructor (Lcom/discord/utilities/media/AppSoundManager$SoundPlayer;Lcom/discord/utilities/media/AppSound;Landroid/content/Context;Lkotlin/jvm/functions/Function0;)V
.locals 0
- iput-object p1, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;->$sound$inlined:Lcom/discord/utilities/media/AppSound;
+ iput-object p1, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;->this$0:Lcom/discord/utilities/media/AppSoundManager$SoundPlayer;
- iput-object p2, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;->$context$inlined:Landroid/content/Context;
+ iput-object p2, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;->$sound$inlined:Lcom/discord/utilities/media/AppSound;
- iput-object p3, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;->$onCompletion$inlined:Lkotlin/jvm/functions/Function0;
+ iput-object p3, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;->$context$inlined:Landroid/content/Context;
+
+ iput-object p4, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;->$onCompletion$inlined:Lkotlin/jvm/functions/Function0;
invoke-direct {p0}, Ljava/lang/Object;->()V
diff --git a/com.discord/smali/com/discord/utilities/media/AppSoundManager$SoundPlayer.smali b/com.discord/smali/com/discord/utilities/media/AppSoundManager$SoundPlayer.smali
index ab86b8452b..62506ec524 100644
--- a/com.discord/smali/com/discord/utilities/media/AppSoundManager$SoundPlayer.smali
+++ b/com.discord/smali/com/discord/utilities/media/AppSoundManager$SoundPlayer.smali
@@ -15,12 +15,12 @@
# instance fields
-.field public final mediaPlayer:Landroid/media/MediaPlayer;
+.field public mediaPlayer:Landroid/media/MediaPlayer;
# direct methods
.method public constructor (Landroid/content/Context;Lcom/discord/utilities/media/AppSound;Lkotlin/jvm/functions/Function0;)V
- .locals 7
+ .locals 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
@@ -42,13 +42,13 @@
invoke-direct {p0}, Ljava/lang/Object;->()V
- new-instance v0, Landroid/media/MediaPlayer;
+ new-instance v7, Landroid/media/MediaPlayer;
- invoke-direct {v0}, Landroid/media/MediaPlayer;->()V
+ invoke-direct {v7}, Landroid/media/MediaPlayer;->()V
- iput-object v0, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer;->mediaPlayer:Landroid/media/MediaPlayer;
+ iput-object v7, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer;->mediaPlayer:Landroid/media/MediaPlayer;
- if-eqz v0, :cond_0
+ if-eqz v7, :cond_0
new-instance v1, Landroid/media/AudioAttributes$Builder;
@@ -74,7 +74,7 @@
move-result-object v1
- invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setAudioAttributes(Landroid/media/AudioAttributes;)V
+ invoke-virtual {v7, v1}, Landroid/media/MediaPlayer;->setAudioAttributes(Landroid/media/AudioAttributes;)V
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
@@ -104,7 +104,7 @@
move-result-wide v5
- move-object v1, v0
+ move-object v1, v7
invoke-virtual/range {v1 .. v6}, Landroid/media/MediaPlayer;->setDataSource(Ljava/io/FileDescriptor;JJ)V
@@ -112,17 +112,26 @@
move-result v1
- invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setLooping(Z)V
+ invoke-virtual {v7, v1}, Landroid/media/MediaPlayer;->setLooping(Z)V
new-instance v1, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;
- invoke-direct {v1, p2, p1, p3}, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;->(Lcom/discord/utilities/media/AppSound;Landroid/content/Context;Lkotlin/jvm/functions/Function0;)V
+ invoke-direct {v1, p0, p2, p1, p3}, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer$$special$$inlined$apply$lambda$1;->(Lcom/discord/utilities/media/AppSoundManager$SoundPlayer;Lcom/discord/utilities/media/AppSound;Landroid/content/Context;Lkotlin/jvm/functions/Function0;)V
- invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V
+ invoke-virtual {v7, v1}, Landroid/media/MediaPlayer;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V
- invoke-virtual {v0}, Landroid/media/MediaPlayer;->prepare()V
+ :try_start_0
+ invoke-virtual {v7}, Landroid/media/MediaPlayer;->prepare()V
+ :try_end_0
+ .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
+
+ goto :goto_0
+
+ :catch_0
+ iput-object v0, p0, Lcom/discord/utilities/media/AppSoundManager$SoundPlayer;->mediaPlayer:Landroid/media/MediaPlayer;
:cond_0
+ :goto_0
return-void
:cond_1
diff --git a/com.discord/smali/com/discord/utilities/rest/RestAPI$AppHeadersProvider.smali b/com.discord/smali/com/discord/utilities/rest/RestAPI$AppHeadersProvider.smali
index 5ac056ca77..e4d3315e2b 100644
--- a/com.discord/smali/com/discord/utilities/rest/RestAPI$AppHeadersProvider.smali
+++ b/com.discord/smali/com/discord/utilities/rest/RestAPI$AppHeadersProvider.smali
@@ -159,7 +159,7 @@
.method public getUserAgent()Ljava/lang/String;
.locals 1
- const-string v0, "Discord-Android/1247"
+ const-string v0, "Discord-Android/1248"
return-object v0
.end method
diff --git a/com.discord/smali/com/discord/widgets/debugging/WidgetFatalCrash.smali b/com.discord/smali/com/discord/widgets/debugging/WidgetFatalCrash.smali
index 6d6271ab0c..c0d331c37d 100644
--- a/com.discord/smali/com/discord/widgets/debugging/WidgetFatalCrash.smali
+++ b/com.discord/smali/com/discord/widgets/debugging/WidgetFatalCrash.smali
@@ -480,7 +480,7 @@
new-array v1, v2, [Ljava/lang/Object;
- const-string v3, "37"
+ const-string v3, "37.1"
aput-object v3, v1, v5
diff --git a/com.discord/smali_classes2/com/discord/widgets/settings/WidgetSettings.smali b/com.discord/smali_classes2/com/discord/widgets/settings/WidgetSettings.smali
index 6a7e7a28cc..bf7a6aa0b7 100644
--- a/com.discord/smali_classes2/com/discord/widgets/settings/WidgetSettings.smali
+++ b/com.discord/smali_classes2/com/discord/widgets/settings/WidgetSettings.smali
@@ -1981,7 +1981,7 @@
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string v0, " - 37 (1247)"
+ const-string v0, " - 37.1 (1248)"
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;