From d3272f99be608db78b06726e4c648cb8d4a3da1c Mon Sep 17 00:00:00 2001 From: Juby210 Date: Wed, 5 Jan 2022 09:33:31 +0100 Subject: [PATCH] 109.7 - Beta (109107) --- app/build.gradle | 4 +- app/src/main/AndroidManifest.xml | 2 +- .../discord/models/domain/ModelInvite.java | 2 +- .../com/discord/restapi/RestAPIParams.java | 13 +-- .../com/discord/stores/StoreAnalytics.java | 6 +- ...stantInvites$fetchInviteIfNotLoaded$1.java | 2 +- ...StoreInstantInvites$onInviteRemoved$1.java | 2 +- .../discord/stores/StoreInstantInvites.java | 2 +- .../utilities/analytics/AnalyticsTracker.java | 8 +- .../guilds/MemberVerificationUtils.java | 4 +- .../com/discord/utilities/rest/RestAPI.java | 6 +- .../widgets/auth/AuthInviteInfoView.java | 10 +-- .../chat/input/ChatInputViewModel.java | 2 +- ...EventInvite$Model$Companion$observe$1.java | 4 +- ...emInvite$ModelProvider$observeModel$1.java | 2 +- .../WidgetChatListAdapterItemInvite.java | 46 +++++----- ...tAdapterItemStageInvite$configureUI$2.java | 4 +- .../WidgetChatListAdapterItemStageInvite.java | 36 ++++---- .../WidgetContactSyncViewModel.java | 3 +- .../widgets/guilds/invite/GuildInvite.java | 2 +- .../InviteJoinHelper$joinViaInvite$4.java | 86 ++++++++++--------- .../guilds/invite/InviteJoinHelper.java | 2 +- ...WidgetGuildInvite$configureLoadedUI$2.java | 2 +- .../guilds/invite/WidgetGuildInviteShare.java | 2 +- .../invite/WidgetGuildInviteShareCompact.java | 2 +- .../guilds/invite/WidgetInviteInfo.java | 12 +-- ...ication$configureVerificationBanner$2.java | 2 +- .../WidgetMemberVerification.java | 4 +- .../widgets/settings/WidgetSettings.java | 2 +- .../WidgetSettingsAccount$configureUI$12.java | 2 +- .../WidgetSettingsAccount$configureUI$5.java | 2 +- .../WidgetEnableMFASuccess$onViewBound$1.java | 2 +- .../user/WidgetUserPasswordVerify.java | 10 ++- ...fy$onViewBound$$inlined$with$lambda$2.java | 2 +- ...etUserPhoneManage$updatePhoneNumber$2.java | 4 +- .../user/phone/WidgetUserPhoneManage.java | 47 +++++++++- .../user/phone/WidgetUserPhoneVerify.java | 11 ++- app/src/main/res/values/strings.xml | 2 +- 38 files changed, 211 insertions(+), 145 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index fcf6ec5509..b77a3fb4d1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId 'com.discord' minSdkVersion 21 targetSdkVersion 30 - versionCode 109101 - versionName "109.1 - Beta" + versionCode 109107 + versionName "109.7 - Beta" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 114360cbe4..add74019dc 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/app/src/main/java/com/discord/models/domain/ModelInvite.java b/app/src/main/java/com/discord/models/domain/ModelInvite.java index d57092edd0..84bccc584c 100644 --- a/app/src/main/java/com/discord/models/domain/ModelInvite.java +++ b/app/src/main/java/com/discord/models/domain/ModelInvite.java @@ -17,7 +17,7 @@ public class ModelInvite implements Serializable { private Channel channel; public String code; private String createdAt; - private Guild guild; + public Guild guild; private GuildScheduledEvent guildScheduledEvent; private User inviter; private final boolean isStatic; diff --git a/app/src/main/java/com/discord/restapi/RestAPIParams.java b/app/src/main/java/com/discord/restapi/RestAPIParams.java index 3d8e8097d7..5cd372470d 100644 --- a/app/src/main/java/com/discord/restapi/RestAPIParams.java +++ b/app/src/main/java/com/discord/restapi/RestAPIParams.java @@ -2664,10 +2664,12 @@ public final class RestAPIParams { public static final class Phone { private final String captchaKey; private final String phone; + private final String source; - public Phone(String str, String str2) { + public Phone(String str, String str2, String str3) { this.phone = str; - this.captchaKey = str2; + this.source = str2; + this.captchaKey = str3; } } @@ -4664,12 +4666,13 @@ public final class RestAPIParams { public static final class VerificationPhoneCode { private final String password; private final String phoneToken; + private final String source; - public VerificationPhoneCode(String str, String str2) { - m.checkNotNullParameter(str, "phoneToken"); - m.checkNotNullParameter(str2, "password"); + public VerificationPhoneCode(String str, String str2, String str3) { + a.n0(str, "phoneToken", str2, "password", str3, "source"); this.phoneToken = str; this.password = str2; + this.source = str3; } } diff --git a/app/src/main/java/com/discord/stores/StoreAnalytics.java b/app/src/main/java/com/discord/stores/StoreAnalytics.java index cb7732a550..a2f9c8e5c9 100644 --- a/app/src/main/java/com/discord/stores/StoreAnalytics.java +++ b/app/src/main/java/com/discord/stores/StoreAnalytics.java @@ -657,10 +657,10 @@ public final class StoreAnalytics extends Store { ObservableExtensionsKt.appSubscribe$default(y2, StoreAnalytics.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new StoreAnalytics$init$4(this), 62, (Object) null); } - /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x0041: APUT + /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x003f: APUT (r1v1 kotlin.Pair[]) (2 ??[int, float, short, byte, char]) - (wrap: kotlin.Pair : 0x003c: INVOKE (r0v6 kotlin.Pair) = ("invite_guild_id"), (r0v5 java.lang.Long) type: STATIC call: d0.o.to(java.lang.Object, java.lang.Object):kotlin.Pair) + (wrap: kotlin.Pair : 0x003a: INVOKE (r0v6 kotlin.Pair) = ("invite_guild_id"), (r0v5 java.lang.Long) type: STATIC call: d0.o.to(java.lang.Object, java.lang.Object):kotlin.Pair) */ public final void inviteSent(ModelInvite modelInvite, Message message, String str) { GuildScheduledEvent guildScheduledEvent; @@ -672,7 +672,7 @@ public final class StoreAnalytics extends Store { pairArr[0] = o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str); pairArr[1] = o.to("message_id", Long.valueOf(message.o())); Long l = null; - pairArr[2] = o.to("invite_guild_id", (modelInvite == null || (guild = modelInvite.getGuild()) == null) ? null : Long.valueOf(guild.r())); + pairArr[2] = o.to("invite_guild_id", (modelInvite == null || (guild = modelInvite.guild) == null) ? null : Long.valueOf(guild.r())); pairArr[3] = o.to("invite_channel_id", (modelInvite == null || (channel = modelInvite.getChannel()) == null) ? null : Long.valueOf(channel.h())); if (!(modelInvite == null || (guildScheduledEvent = modelInvite.getGuildScheduledEvent()) == null)) { l = Long.valueOf(guildScheduledEvent.i()); diff --git a/app/src/main/java/com/discord/stores/StoreInstantInvites$fetchInviteIfNotLoaded$1.java b/app/src/main/java/com/discord/stores/StoreInstantInvites$fetchInviteIfNotLoaded$1.java index 1849b39735..3b898db606 100644 --- a/app/src/main/java/com/discord/stores/StoreInstantInvites$fetchInviteIfNotLoaded$1.java +++ b/app/src/main/java/com/discord/stores/StoreInstantInvites$fetchInviteIfNotLoaded$1.java @@ -46,7 +46,7 @@ public final class StoreInstantInvites$fetchInviteIfNotLoaded$1 extends o implem Channel channel2; Guild guild; StoreInstantInvites$fetchInviteIfNotLoaded$1 storeInstantInvites$fetchInviteIfNotLoaded$1 = this.this$0; - return new TrackNetworkActionInviteResolve(storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteResolved, storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteCode, Boolean.valueOf(StoreStream.Companion.getAuthentication().isAuthed()), (modelInvite == null || (guild = modelInvite.getGuild()) == null) ? null : Long.valueOf(guild.r()), (modelInvite == null || (channel2 = modelInvite.getChannel()) == null) ? null : Long.valueOf(channel2.h()), (modelInvite == null || (channel = modelInvite.getChannel()) == null) ? null : Long.valueOf((long) channel.A()), (modelInvite == null || (inviter = modelInvite.getInviter()) == null) ? null : Long.valueOf(inviter.i()), modelInvite != null ? Long.valueOf((long) modelInvite.getApproximateMemberCount()) : null, modelInvite != null ? Long.valueOf((long) modelInvite.getApproximatePresenceCount()) : null, modelInvite != null ? modelInvite.getInviteType() : null, null, modelInvite != null ? Boolean.valueOf(m.areEqual(modelInvite.code, String.valueOf((int) RestAPIAbortCodes.USER_BANNED))) : null, null); + return new TrackNetworkActionInviteResolve(storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteResolved, storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteCode, Boolean.valueOf(StoreStream.Companion.getAuthentication().isAuthed()), (modelInvite == null || (guild = modelInvite.guild) == null) ? null : Long.valueOf(guild.r()), (modelInvite == null || (channel2 = modelInvite.getChannel()) == null) ? null : Long.valueOf(channel2.h()), (modelInvite == null || (channel = modelInvite.getChannel()) == null) ? null : Long.valueOf((long) channel.A()), (modelInvite == null || (inviter = modelInvite.getInviter()) == null) ? null : Long.valueOf(inviter.i()), modelInvite != null ? Long.valueOf((long) modelInvite.getApproximateMemberCount()) : null, modelInvite != null ? Long.valueOf((long) modelInvite.getApproximatePresenceCount()) : null, modelInvite != null ? modelInvite.getInviteType() : null, null, modelInvite != null ? Boolean.valueOf(m.areEqual(modelInvite.code, String.valueOf((int) RestAPIAbortCodes.USER_BANNED))) : null, null); } } diff --git a/app/src/main/java/com/discord/stores/StoreInstantInvites$onInviteRemoved$1.java b/app/src/main/java/com/discord/stores/StoreInstantInvites$onInviteRemoved$1.java index c231c88c9f..6381723970 100644 --- a/app/src/main/java/com/discord/stores/StoreInstantInvites$onInviteRemoved$1.java +++ b/app/src/main/java/com/discord/stores/StoreInstantInvites$onInviteRemoved$1.java @@ -22,7 +22,7 @@ public final class StoreInstantInvites$onInviteRemoved$1 extends o implements Fu /* renamed from: invoke */ public final void mo1invoke() { Map map; - Guild guild = this.$invite.getGuild(); + Guild guild = this.$invite.guild; Long valueOf = guild != null ? Long.valueOf(guild.r()) : null; String str = this.$invite.code; if (valueOf != null && (map = (Map) StoreInstantInvites.access$getInvites$p(this.this$0).get(valueOf)) != null && ((ModelInvite) map.remove(str)) != null) { diff --git a/app/src/main/java/com/discord/stores/StoreInstantInvites.java b/app/src/main/java/com/discord/stores/StoreInstantInvites.java index 2a26a6cb56..61bfb11b80 100644 --- a/app/src/main/java/com/discord/stores/StoreInstantInvites.java +++ b/app/src/main/java/com/discord/stores/StoreInstantInvites.java @@ -199,7 +199,7 @@ public final class StoreInstantInvites extends StoreV2 { private final void onLoadedInvites(List list) { this.invites.clear(); for (ModelInvite modelInvite : list) { - Guild guild = modelInvite.getGuild(); + Guild guild = modelInvite.guild; Long valueOf = guild != null ? Long.valueOf(guild.r()) : null; if (valueOf != null) { Map map = this.invites.get(valueOf); diff --git a/app/src/main/java/com/discord/utilities/analytics/AnalyticsTracker.java b/app/src/main/java/com/discord/utilities/analytics/AnalyticsTracker.java index 4420e810a9..470c8cc18b 100644 --- a/app/src/main/java/com/discord/utilities/analytics/AnalyticsTracker.java +++ b/app/src/main/java/com/discord/utilities/analytics/AnalyticsTracker.java @@ -613,7 +613,7 @@ public final class AnalyticsTracker { AnalyticsTracker analyticsTracker = INSTANCE; String str2 = modelInvite.code; m.checkNotNullExpressionValue(str2, "invite.code"); - com.discord.api.guild.Guild guild = modelInvite.getGuild(); + com.discord.api.guild.Guild guild = modelInvite.guild; Long valueOf = guild != null ? Long.valueOf(guild.r()) : null; Channel channel = modelInvite.getChannel(); Long valueOf2 = channel != null ? Long.valueOf(channel.h()) : null; @@ -655,7 +655,7 @@ public final class AnalyticsTracker { AnalyticsTracker analyticsTracker = INSTANCE; String str = modelInvite.code; m.checkNotNullExpressionValue(str, "invite.code"); - com.discord.api.guild.Guild guild = modelInvite.getGuild(); + com.discord.api.guild.Guild guild = modelInvite.guild; Long valueOf = guild != null ? Long.valueOf(guild.r()) : null; Channel channel = modelInvite.getChannel(); Long valueOf2 = channel != null ? Long.valueOf(channel.h()) : null; @@ -1481,7 +1481,7 @@ public final class AnalyticsTracker { mutableMapOf.put(ModelAuditLogEntry.CHANGE_KEY_CHANNEL_ID, Long.valueOf(channel.h())); mutableMapOf.put("channel_type", Integer.valueOf(channel.A())); } - com.discord.api.guild.Guild guild = modelInvite.getGuild(); + com.discord.api.guild.Guild guild = modelInvite.guild; if (guild != null) { mutableMapOf.put(ModelAuditLogEntry.CHANGE_KEY_GUILD_ID, Long.valueOf(guild.r())); } @@ -1605,7 +1605,7 @@ public final class AnalyticsTracker { map.put("invite_channel_id", Long.valueOf(channel.h())); map.put("invite_channel_type", Integer.valueOf(channel.A())); } - com.discord.api.guild.Guild guild = modelInvite.getGuild(); + com.discord.api.guild.Guild guild = modelInvite.guild; if (guild != null) { map.put("invite_guild_id", Long.valueOf(guild.r())); } diff --git a/app/src/main/java/com/discord/utilities/guilds/MemberVerificationUtils.java b/app/src/main/java/com/discord/utilities/guilds/MemberVerificationUtils.java index 6dec76baef..392ba3cbc3 100644 --- a/app/src/main/java/com/discord/utilities/guilds/MemberVerificationUtils.java +++ b/app/src/main/java/com/discord/utilities/guilds/MemberVerificationUtils.java @@ -64,7 +64,7 @@ public final class MemberVerificationUtils { String str; com.discord.api.guild.Guild guild2; if (guild == null || (str = guild.getName()) == null) { - str = (modelInvite == null || (guild2 = modelInvite.getGuild()) == null) ? null : guild2.x(); + str = (modelInvite == null || (guild2 = modelInvite.guild) == null) ? null : guild2.x(); } if (str != null && guild != null) { MemberVerificationSuccessDialog.Companion.enqueue(guild.getId()); @@ -93,7 +93,7 @@ public final class MemberVerificationUtils { Collection collection; com.discord.api.guild.Guild guild2; if (guild == null || (collection = guild.getFeatures()) == null) { - collection = (modelInvite == null || (guild2 = modelInvite.getGuild()) == null) ? null : guild2.m(); + collection = (modelInvite == null || (guild2 = modelInvite.guild) == null) ? null : guild2.m(); } if (collection == null) { collection = n0.emptySet(); diff --git a/app/src/main/java/com/discord/utilities/rest/RestAPI.java b/app/src/main/java/com/discord/utilities/rest/RestAPI.java index 3083e93209..0e884a152a 100644 --- a/app/src/main/java/com/discord/utilities/rest/RestAPI.java +++ b/app/src/main/java/com/discord/utilities/rest/RestAPI.java @@ -1806,10 +1806,10 @@ public final class RestAPI implements RestAPIInterface { return this._api.postGuildEmoji(j, postGuildEmoji); } - /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x003a: APUT + /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x0038: APUT (r3v2 kotlin.Pair[]) (1 ??[boolean, int, float, short, byte, char]) - (wrap: kotlin.Pair : 0x0035: INVOKE (r10v4 kotlin.Pair) = ("location_guild_id"), (r10v3 java.lang.Long) type: STATIC call: d0.o.to(java.lang.Object, java.lang.Object):kotlin.Pair) + (wrap: kotlin.Pair : 0x0033: INVOKE (r10v4 kotlin.Pair) = ("location_guild_id"), (r10v3 java.lang.Long) type: STATIC call: d0.o.to(java.lang.Object, java.lang.Object):kotlin.Pair) */ public final Observable postInviteCode(ModelInvite modelInvite, String str, RestAPIParams.InviteCode inviteCode) { m.checkNotNullParameter(modelInvite, "invite"); @@ -1820,7 +1820,7 @@ public final class RestAPI implements RestAPIInterface { m.checkNotNullExpressionValue(str2, "invite.code"); Pair[] pairArr = new Pair[5]; pairArr[0] = d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str); - Guild guild = modelInvite.getGuild(); + Guild guild = modelInvite.guild; pairArr[1] = d0.o.to("location_guild_id", guild != null ? Long.valueOf(guild.r()) : null); Channel channel = modelInvite.getChannel(); pairArr[2] = d0.o.to("location_channel_id", channel != null ? Long.valueOf(channel.h()) : null); diff --git a/app/src/main/java/com/discord/widgets/auth/AuthInviteInfoView.java b/app/src/main/java/com/discord/widgets/auth/AuthInviteInfoView.java index 601bb292b7..4befa2c41b 100644 --- a/app/src/main/java/com/discord/widgets/auth/AuthInviteInfoView.java +++ b/app/src/main/java/com/discord/widgets/auth/AuthInviteInfoView.java @@ -78,15 +78,15 @@ public final class AuthInviteInfoView extends RelativeLayout { this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i); } - /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x008a: APUT (r2v4 java.lang.Object[]), (0 ??[int, short, byte, char]), (r10v9 java.lang.String) */ - /* JADX WARNING: Code restructure failed: missing block: B:26:0x0060, code lost: - if ((com.discord.api.channel.ChannelUtils.c(r0).length() == 0) != true) goto L_0x0062; + /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x0088: APUT (r2v4 java.lang.Object[]), (0 ??[int, short, byte, char]), (r10v9 java.lang.String) */ + /* JADX WARNING: Code restructure failed: missing block: B:26:0x005e, code lost: + if ((com.discord.api.channel.ChannelUtils.c(r0).length() == 0) != true) goto L_0x0060; */ private final CharSequence getIntroText(ModelInvite modelInvite) { User inviter = modelInvite.getInviter(); String r = inviter != null ? inviter.r() : null; boolean z2 = r != null && (t.isBlank(r) ^ true); - if (modelInvite.getChannel() == null && modelInvite.getGuild() == null && z2) { + if (modelInvite.getChannel() == null && modelInvite.guild == null && z2) { Context context = getContext(); m.checkNotNullExpressionValue(context, "context"); return b.h(context, R.string.instant_invite_you_have_been_invited_to_chat_with, new Object[0], null, 4); @@ -151,7 +151,7 @@ public final class AuthInviteInfoView extends RelativeLayout { String str2 = null; Integer valueOf = channel != null ? Integer.valueOf(channel.A()) : null; if ((valueOf != null && valueOf.intValue() == 5) || ((valueOf != null && valueOf.intValue() == 0) || ((valueOf != null && valueOf.intValue() == 2) || (valueOf != null && valueOf.intValue() == 13)))) { - Guild guild = modelInvite.getGuild(); + Guild guild = modelInvite.guild; if (guild != null) { SimpleDraweeView simpleDraweeView2 = this.binding.f2145b; m.checkNotNullExpressionValue(simpleDraweeView2, "binding.authInviteInfoGuildAvatar"); diff --git a/app/src/main/java/com/discord/widgets/chat/input/ChatInputViewModel.java b/app/src/main/java/com/discord/widgets/chat/input/ChatInputViewModel.java index c490194f53..f20de3b6e5 100644 --- a/app/src/main/java/com/discord/widgets/chat/input/ChatInputViewModel.java +++ b/app/src/main/java/com/discord/widgets/chat/input/ChatInputViewModel.java @@ -2489,7 +2489,7 @@ public final class ChatInputViewModel extends AppViewModel { unit = Unit.a; } else if (!(ordinal == 2 || ordinal == 3)) { if (ordinal == 4) { - WidgetUserPhoneManage.Companion.launch(context, WidgetUserAccountVerifyBase.Mode.UNFORCED); + WidgetUserPhoneManage.Companion.launch(context, WidgetUserAccountVerifyBase.Mode.UNFORCED, WidgetUserPhoneManage.Companion.Source.GUILD_PHONE_REQUIRED); unit = Unit.a; } else { throw new NoWhenBranchMatchedException(); diff --git a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemGuildScheduledEventInvite$Model$Companion$observe$1.java b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemGuildScheduledEventInvite$Model$Companion$observe$1.java index 29645363f2..52e0337a0b 100644 --- a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemGuildScheduledEventInvite$Model$Companion$observe$1.java +++ b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemGuildScheduledEventInvite$Model$Companion$observe$1.java @@ -50,7 +50,7 @@ public final class WidgetChatListAdapterItemGuildScheduledEventInvite$Model$Comp Channel channel2 = this.$item.getInvite().getChannel(); Guild guild = null; if (channel2 != null) { - com.discord.api.guild.Guild guild2 = this.$item.getInvite().getGuild(); + com.discord.api.guild.Guild guild2 = this.$item.getInvite().guild; channel = Channel.a(channel2, null, 0, guild2 != null ? guild2.r() : 0, null, 0, 0, 0, null, null, 0, null, 0, 0, null, 0, 0, null, false, 0, null, 0, null, null, null, null, null, null, null, null, 536870907); } else { channel = null; @@ -64,7 +64,7 @@ public final class WidgetChatListAdapterItemGuildScheduledEventInvite$Model$Comp if (guild3 != null) { guild = guild3; } else { - com.discord.api.guild.Guild guild4 = this.$item.getInvite().getGuild(); + com.discord.api.guild.Guild guild4 = this.$item.getInvite().guild; if (guild4 != null) { m.checkNotNullExpressionValue(guild4, "apiGuild"); guild = new Guild(guild4); diff --git a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemInvite$ModelProvider$observeModel$1.java b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemInvite$ModelProvider$observeModel$1.java index 2ba1fd3b78..bfb8aa0f16 100644 --- a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemInvite$ModelProvider$observeModel$1.java +++ b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemInvite$ModelProvider$observeModel$1.java @@ -38,7 +38,7 @@ public final class WidgetChatListAdapterItemInvite$ModelProvider$observeModel$1 public final WidgetChatListAdapterItemInvite.Model mo1invoke() { long id2 = this.$userStore.getMe().getId(); User user = this.$userStore.getUsers().get(Long.valueOf(this.$item.getUserId())); - Guild guild = this.$invite.getGuild(); + Guild guild = this.$invite.guild; boolean z2 = (guild != null ? this.$guildStore.getGuilds().get(Long.valueOf(guild.r())) : null) != null; Channel channel = this.$invite.getChannel(); Channel channel2 = channel != null ? this.$channelStore.getChannel(channel.h()) : null; diff --git a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemInvite.java b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemInvite.java index 744134c8a1..5b6cf05564 100644 --- a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemInvite.java +++ b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemInvite.java @@ -665,23 +665,23 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter view2.setVisibility(0); } - /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x00dc: APUT (r3v35 java.lang.Object[]), (0 ??[int, short, byte, char]), (r16v8 java.lang.String) */ - /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x0100: APUT (r3v34 java.lang.Object[]), (0 ??[int, short, byte, char]), (r16v4 java.lang.String) */ - /* JADX WARNING: Code restructure failed: missing block: B:64:0x012b, code lost: - if (r12 != null) goto L_0x0148; + /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x00d6: APUT (r3v35 java.lang.Object[]), (0 ??[int, short, byte, char]), (r16v8 java.lang.String) */ + /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x00fa: APUT (r3v34 java.lang.Object[]), (0 ??[int, short, byte, char]), (r16v4 java.lang.String) */ + /* JADX WARNING: Code restructure failed: missing block: B:64:0x0125, code lost: + if (r12 != null) goto L_0x0140; */ - /* JADX WARNING: Removed duplicated region for block: B:106:0x01fb */ - /* JADX WARNING: Removed duplicated region for block: B:111:0x020d */ - /* JADX WARNING: Removed duplicated region for block: B:115:0x0214 */ - /* JADX WARNING: Removed duplicated region for block: B:121:0x0236 */ - /* JADX WARNING: Removed duplicated region for block: B:122:0x0238 */ - /* JADX WARNING: Removed duplicated region for block: B:125:0x0249 */ - /* JADX WARNING: Removed duplicated region for block: B:126:0x024b */ - /* JADX WARNING: Removed duplicated region for block: B:129:0x027f */ - /* JADX WARNING: Removed duplicated region for block: B:132:0x0285 */ + /* JADX WARNING: Removed duplicated region for block: B:106:0x01ea */ + /* JADX WARNING: Removed duplicated region for block: B:111:0x01fc */ + /* JADX WARNING: Removed duplicated region for block: B:115:0x0203 */ + /* JADX WARNING: Removed duplicated region for block: B:121:0x0225 */ + /* JADX WARNING: Removed duplicated region for block: B:122:0x0227 */ + /* JADX WARNING: Removed duplicated region for block: B:125:0x0238 */ + /* JADX WARNING: Removed duplicated region for block: B:126:0x023a */ + /* JADX WARNING: Removed duplicated region for block: B:129:0x026e */ + /* JADX WARNING: Removed duplicated region for block: B:132:0x0274 */ /* JADX WARNING: Removed duplicated region for block: B:134:? A[RETURN, SYNTHETIC] */ - /* JADX WARNING: Removed duplicated region for block: B:74:0x0164 */ - /* JADX WARNING: Removed duplicated region for block: B:75:0x0172 */ + /* JADX WARNING: Removed duplicated region for block: B:74:0x015c */ + /* JADX WARNING: Removed duplicated region for block: B:75:0x016a */ private final void configureResolvedUI(Model.Resolved resolved) { CharSequence charSequence; String str; @@ -700,13 +700,13 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter m.checkNotNullExpressionValue(view, "itemView"); Context context = view.getContext(); boolean z4 = component3 != null && component3.getId() == component2; - Guild guild2 = component1.getGuild(); + Guild guild2 = component1.guild; boolean z5 = (guild2 != null ? guild2.u() : 0) < 200; Channel channel = component1.getChannel(); boolean w = channel != null ? ChannelUtils.w(channel) : false; - Guild guild3 = component1.getGuild(); + Guild guild3 = component1.guild; boolean z6 = (guild3 == null || (m = guild3.m()) == null || !m.contains(GuildFeature.HUB)) ? false : true; - boolean z7 = component1.getChannel() == null && component1.getGuild() == null && component1.getInviter() != null; + boolean z7 = component1.getChannel() == null && component1.guild == null && component1.getInviter() != null; TextView textView = this.binding.c; m.checkNotNullExpressionValue(textView, "binding.itemInviteHeader"); String str2 = null; @@ -763,17 +763,17 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter m.checkNotNullExpressionValue(textView3, "binding.itemInviteImageText"); textView3.setVisibility(8); } else { - Guild guild4 = component1.getGuild(); + Guild guild4 = component1.guild; Long valueOf = guild4 != null ? Long.valueOf(guild4.r()) : null; - Guild guild5 = component1.getGuild(); + Guild guild5 = component1.guild; updateIconUrlIfChanged(IconUtils.getForGuild$default(valueOf, guild5 != null ? guild5.q() : null, IconUtils.DEFAULT_ICON_BLURPLE, resolved.getShouldAnimateGuildIcon(), null, 16, null)); - Guild guild6 = component1.getGuild(); + Guild guild6 = component1.guild; if (!(guild6 == null || (q = guild6.q()) == null)) { if (q.length() > 0) { z3 = true; TextView textView4 = this.binding.g; m.checkNotNullExpressionValue(textView4, "binding.itemInviteImageText"); - if (!(z3 || (guild = component1.getGuild()) == null || (x2 = guild.x()) == null)) { + if (!(z3 || (guild = component1.guild) == null || (x2 = guild.x()) == null)) { str2 = GuildUtilsKt.computeShortName(x2); } ViewExtensions.setTextAndVisibilityBy(textView4, str2); @@ -825,7 +825,7 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter return; } } else { - Guild guild7 = component1.getGuild(); + Guild guild7 = component1.guild; if (guild7 != null) { str = guild7.x(); textView2.setText(str); diff --git a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemStageInvite$configureUI$2.java b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemStageInvite$configureUI$2.java index e536ece502..a4a716a52c 100644 --- a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemStageInvite$configureUI$2.java +++ b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemStageInvite$configureUI$2.java @@ -84,12 +84,12 @@ public final class WidgetChatListAdapterItemStageInvite$configureUI$2 implements } /* JADX WARNING: Removed duplicated region for block: B:18:? A[RETURN, SYNTHETIC] */ - /* JADX WARNING: Removed duplicated region for block: B:9:0x0025 */ + /* JADX WARNING: Removed duplicated region for block: B:9:0x0023 */ @Override // android.view.View.OnClickListener public final void onClick(View view) { Long l; long f; - Guild guild = this.$model.getInvite().getGuild(); + Guild guild = this.$model.getInvite().guild; if (guild != null) { f = guild.r(); } else { diff --git a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemStageInvite.java b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemStageInvite.java index 5626e9243d..317c437aaa 100644 --- a/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemStageInvite.java +++ b/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemStageInvite.java @@ -362,15 +362,15 @@ public final class WidgetChatListAdapterItemStageInvite extends WidgetChatListAd } /* JADX DEBUG: TODO: convert one arg to string using `String.valueOf()`, args: [(r5v14 int), ('-' char), (r3v2 int)] */ - /* JADX DEBUG: TODO: convert one arg to string using `String.valueOf()`, args: [(r5v14 int), ('-' char), (wrap: int : 0x018b: ARITH (r5v16 int) = (wrap: int : 0x0187: INVOKE (r5v15 int) = (r6v3 java.util.ArrayList) type: VIRTUAL call: java.util.ArrayList.size():int) + (1 int))] */ - /* JADX WARNING: Removed duplicated region for block: B:33:0x00a7 */ - /* JADX WARNING: Removed duplicated region for block: B:34:0x00ac */ - /* JADX WARNING: Removed duplicated region for block: B:41:0x00cc */ - /* JADX WARNING: Removed duplicated region for block: B:42:0x00d1 */ - /* JADX WARNING: Removed duplicated region for block: B:44:0x00d5 */ - /* JADX WARNING: Removed duplicated region for block: B:50:0x00f3 */ - /* JADX WARNING: Removed duplicated region for block: B:54:0x0130 */ - /* JADX WARNING: Removed duplicated region for block: B:60:0x017a */ + /* JADX DEBUG: TODO: convert one arg to string using `String.valueOf()`, args: [(r5v14 int), ('-' char), (wrap: int : 0x0181: ARITH (r5v16 int) = (wrap: int : 0x017d: INVOKE (r5v15 int) = (r6v3 java.util.ArrayList) type: VIRTUAL call: java.util.ArrayList.size():int) + (1 int))] */ + /* JADX WARNING: Removed duplicated region for block: B:33:0x009d */ + /* JADX WARNING: Removed duplicated region for block: B:34:0x00a2 */ + /* JADX WARNING: Removed duplicated region for block: B:41:0x00c2 */ + /* JADX WARNING: Removed duplicated region for block: B:42:0x00c7 */ + /* JADX WARNING: Removed duplicated region for block: B:44:0x00cb */ + /* JADX WARNING: Removed duplicated region for block: B:50:0x00e9 */ + /* JADX WARNING: Removed duplicated region for block: B:54:0x0126 */ + /* JADX WARNING: Removed duplicated region for block: B:60:0x0170 */ private final void configureUI(Model model) { boolean z2; String str; @@ -383,22 +383,22 @@ public final class WidgetChatListAdapterItemStageInvite extends WidgetChatListAd View view = this.itemView; m.checkNotNullExpressionValue(view, "itemView"); Context context = view.getContext(); - Guild guild2 = model.getInvite().getGuild(); + Guild guild2 = model.getInvite().guild; String str3 = null; Long valueOf = guild2 != null ? Long.valueOf(guild2.r()) : null; - Guild guild3 = model.getInvite().getGuild(); + Guild guild3 = model.getInvite().guild; updateIconUrlIfChanged(IconUtils.getForGuild$default(valueOf, guild3 != null ? guild3.q() : null, IconUtils.DEFAULT_ICON_BLURPLE, model.getShouldAnimateGuildIcon(), null, 16, null)); - Guild guild4 = model.getInvite().getGuild(); + Guild guild4 = model.getInvite().guild; int i = 0; if (!(guild4 == null || (q = guild4.q()) == null)) { if (q.length() > 0) { z2 = true; TextView textView = this.binding.e; m.checkNotNullExpressionValue(textView, "binding.itemInviteImageText"); - ViewExtensions.setTextAndVisibilityBy(textView, (z2 || (guild = model.getInvite().getGuild()) == null || (x2 = guild.x()) == null) ? null : GuildUtilsKt.computeShortName(x2)); + ViewExtensions.setTextAndVisibilityBy(textView, (z2 || (guild = model.getInvite().guild) == null || (x2 = guild.x()) == null) ? null : GuildUtilsKt.computeShortName(x2)); TextView textView2 = this.binding.c; m.checkNotNullExpressionValue(textView2, "binding.itemInviteGuildName"); - Guild guild5 = model.getInvite().getGuild(); + Guild guild5 = model.getInvite().guild; if (guild5 == null || (str = guild5.x()) == null) { Channel channel = model.getChannel(); str = channel != null ? channel.m() : null; @@ -466,10 +466,10 @@ public final class WidgetChatListAdapterItemStageInvite extends WidgetChatListAd TextView textView = this.binding.e; m.checkNotNullExpressionValue(textView, "binding.itemInviteImageText"); if (z2) { - ViewExtensions.setTextAndVisibilityBy(textView, (z2 || (guild = model.getInvite().getGuild()) == null || (x2 = guild.x()) == null) ? null : GuildUtilsKt.computeShortName(x2)); + ViewExtensions.setTextAndVisibilityBy(textView, (z2 || (guild = model.getInvite().guild) == null || (x2 = guild.x()) == null) ? null : GuildUtilsKt.computeShortName(x2)); TextView textView2 = this.binding.c; m.checkNotNullExpressionValue(textView2, "binding.itemInviteGuildName"); - Guild guild5 = model.getInvite().getGuild(); + Guild guild5 = model.getInvite().guild; Channel channel = model.getChannel(); if (channel != null) { } @@ -508,10 +508,10 @@ public final class WidgetChatListAdapterItemStageInvite extends WidgetChatListAd stageCardSpeakersView.l.setData(arrayList2); this.binding.f.setOnClickListener(new WidgetChatListAdapterItemStageInvite$configureUI$2(this, model, context)); } - ViewExtensions.setTextAndVisibilityBy(textView, (z2 || (guild = model.getInvite().getGuild()) == null || (x2 = guild.x()) == null) ? null : GuildUtilsKt.computeShortName(x2)); + ViewExtensions.setTextAndVisibilityBy(textView, (z2 || (guild = model.getInvite().guild) == null || (x2 = guild.x()) == null) ? null : GuildUtilsKt.computeShortName(x2)); TextView textView2 = this.binding.c; m.checkNotNullExpressionValue(textView2, "binding.itemInviteGuildName"); - Guild guild5 = model.getInvite().getGuild(); + Guild guild5 = model.getInvite().guild; Channel channel = model.getChannel(); if (channel != null) { } diff --git a/app/src/main/java/com/discord/widgets/contact_sync/WidgetContactSyncViewModel.java b/app/src/main/java/com/discord/widgets/contact_sync/WidgetContactSyncViewModel.java index acfe8ff147..e84b1a2797 100644 --- a/app/src/main/java/com/discord/widgets/contact_sync/WidgetContactSyncViewModel.java +++ b/app/src/main/java/com/discord/widgets/contact_sync/WidgetContactSyncViewModel.java @@ -27,6 +27,7 @@ import com.discord.utilities.mg_recycler.MGRecyclerDataPayload; import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.time.ClockFactory; +import com.discord.widgets.user.phone.WidgetUserPhoneManage; import d0.g0.t; import d0.g0.w; import d0.t.g0; @@ -1316,7 +1317,7 @@ public final class WidgetContactSyncViewModel extends AppViewModel { @MainThread public final void onPhoneNumberSubmitted(String str, String str2) { m.checkNotNullParameter(str, "phoneNumber"); - ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.userAddPhone(new RestAPIParams.Phone(str, str2)), false, 1, null), this, null, 2, null), WidgetContactSyncViewModel.class, (Context) null, (Function1) null, new WidgetContactSyncViewModel$onPhoneNumberSubmitted$2(this), (Function0) null, (Function0) null, new WidgetContactSyncViewModel$onPhoneNumberSubmitted$1(this), 54, (Object) null); + ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.userAddPhone(new RestAPIParams.Phone(str, WidgetUserPhoneManage.Companion.Source.CONTACT_SYNC.getSource(), str2)), false, 1, null), this, null, 2, null), WidgetContactSyncViewModel.class, (Context) null, (Function1) null, new WidgetContactSyncViewModel$onPhoneNumberSubmitted$2(this), (Function0) null, (Function0) null, new WidgetContactSyncViewModel$onPhoneNumberSubmitted$1(this), 54, (Object) null); } @MainThread diff --git a/app/src/main/java/com/discord/widgets/guilds/invite/GuildInvite.java b/app/src/main/java/com/discord/widgets/guilds/invite/GuildInvite.java index 94bcb2442d..42cd6d4ad6 100644 --- a/app/src/main/java/com/discord/widgets/guilds/invite/GuildInvite.java +++ b/app/src/main/java/com/discord/widgets/guilds/invite/GuildInvite.java @@ -47,7 +47,7 @@ public final class GuildInvite implements Serializable { } String str = modelInvite.code; m.checkNotNullExpressionValue(str, "invite.code"); - Guild guild = modelInvite.getGuild(); + Guild guild = modelInvite.guild; Long valueOf = guild != null ? Long.valueOf(guild.r()) : null; Channel channel2 = modelInvite.getChannel(); Long valueOf2 = channel2 != null ? Long.valueOf(channel2.h()) : null; diff --git a/app/src/main/java/com/discord/widgets/guilds/invite/InviteJoinHelper$joinViaInvite$4.java b/app/src/main/java/com/discord/widgets/guilds/invite/InviteJoinHelper$joinViaInvite$4.java index a3aab5bf41..ea56c7206f 100644 --- a/app/src/main/java/com/discord/widgets/guilds/invite/InviteJoinHelper$joinViaInvite$4.java +++ b/app/src/main/java/com/discord/widgets/guilds/invite/InviteJoinHelper$joinViaInvite$4.java @@ -85,21 +85,21 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio return ((InviteJoinHelper$joinViaInvite$4) create(coroutineScope, continuation)).invokeSuspend(Unit.a); } - /* JADX WARNING: Removed duplicated region for block: B:104:0x027f */ - /* JADX WARNING: Removed duplicated region for block: B:117:0x02ca */ - /* JADX WARNING: Removed duplicated region for block: B:121:0x02db */ - /* JADX WARNING: Removed duplicated region for block: B:151:0x0372 */ - /* JADX WARNING: Removed duplicated region for block: B:152:0x0380 */ - /* JADX WARNING: Removed duplicated region for block: B:164:0x03d4 */ - /* JADX WARNING: Removed duplicated region for block: B:167:0x03e7 A[RETURN] */ - /* JADX WARNING: Removed duplicated region for block: B:69:0x01ab */ - /* JADX WARNING: Removed duplicated region for block: B:74:0x01b8 */ - /* JADX WARNING: Removed duplicated region for block: B:79:0x01de */ - /* JADX WARNING: Removed duplicated region for block: B:80:0x01e0 */ - /* JADX WARNING: Removed duplicated region for block: B:82:0x01e3 */ - /* JADX WARNING: Removed duplicated region for block: B:87:0x01fe */ - /* JADX WARNING: Removed duplicated region for block: B:94:0x0247 A[RETURN] */ - /* JADX WARNING: Removed duplicated region for block: B:95:0x0248 */ + /* JADX WARNING: Removed duplicated region for block: B:104:0x0273 */ + /* JADX WARNING: Removed duplicated region for block: B:117:0x02be */ + /* JADX WARNING: Removed duplicated region for block: B:121:0x02cd */ + /* JADX WARNING: Removed duplicated region for block: B:151:0x035e */ + /* JADX WARNING: Removed duplicated region for block: B:152:0x036c */ + /* JADX WARNING: Removed duplicated region for block: B:164:0x03c0 */ + /* JADX WARNING: Removed duplicated region for block: B:167:0x03d3 A[RETURN] */ + /* JADX WARNING: Removed duplicated region for block: B:69:0x01a1 */ + /* JADX WARNING: Removed duplicated region for block: B:74:0x01ac */ + /* JADX WARNING: Removed duplicated region for block: B:79:0x01d2 */ + /* JADX WARNING: Removed duplicated region for block: B:80:0x01d4 */ + /* JADX WARNING: Removed duplicated region for block: B:82:0x01d7 */ + /* JADX WARNING: Removed duplicated region for block: B:87:0x01f2 */ + /* JADX WARNING: Removed duplicated region for block: B:94:0x023b A[RETURN] */ + /* JADX WARNING: Removed duplicated region for block: B:95:0x023c */ /* JADX WARNING: Unknown variable types count: 2 */ @Override // d0.w.i.a.a public final Object invokeSuspend(Object obj) { @@ -109,6 +109,7 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio Ref$ObjectRef ref$ObjectRef; Channel channel; boolean z2; + Guild guild; Long boxLong; boolean z3; Boolean boxBoolean; @@ -121,7 +122,7 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio Function2 function22; Ref$ObjectRef ref$ObjectRef3; ModelInvite modelInvite4; - Guild guild; + Guild guild2; Long boxLong2; Object obj4; Long boxLong3; @@ -139,21 +140,21 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio ?? parentFragmentManager = this.$fragment.getParentFragmentManager(); m.checkNotNullExpressionValue(parentFragmentManager, "fragment.parentFragmentManager"); ref$ObjectRef5.element = parentFragmentManager; - Guild guild2 = this.$invite.getGuild(); - boolean z4 = (guild2 == null || (m3 = guild2.m()) == null || !m3.contains(GuildFeature.MEMBER_VERIFICATION_GATE_ENABLED)) ? false : true; - Guild guild3 = this.$invite.getGuild(); - boolean z5 = (guild3 == null || (m2 = guild3.m()) == null || m2.contains(GuildFeature.PREVIEW_ENABLED)) ? false : true; - Guild guild4 = this.$invite.getGuild(); - boolean z6 = (guild4 == null || (m = guild4.m()) == null || !m.contains(GuildFeature.HUB)) ? false : true; + Guild guild3 = this.$invite.guild; + boolean z4 = (guild3 == null || (m3 = guild3.m()) == null || !m3.contains(GuildFeature.MEMBER_VERIFICATION_GATE_ENABLED)) ? false : true; + Guild guild4 = this.$invite.guild; + boolean z5 = (guild4 == null || (m2 = guild4.m()) == null || m2.contains(GuildFeature.PREVIEW_ENABLED)) ? false : true; + Guild guild5 = this.$invite.guild; + boolean z6 = (guild5 == null || (m = guild5.m()) == null || !m.contains(GuildFeature.HUB)) ? false : true; if (z6 && !GrowthTeamFeatures.INSTANCE.isHubEnabled()) { b.a.d.m.g(ref$ObjectRef4.element, R.string.discord_u_coming_soon_to_mobile, 0, null, 12); return Unit.a; } else if (z6 && GrowthTeamFeatures.INSTANCE.isHubEmailConnectionEnabled()) { Context context = ref$ObjectRef4.element; HubEmailEntryPoint hubEmailEntryPoint = HubEmailEntryPoint.Invite; - Guild guild5 = this.$invite.getGuild(); - if (guild5 != null) { - str = guild5.x(); + Guild guild6 = this.$invite.guild; + if (guild6 != null) { + str = guild6.x(); } if (str == null) { str = ""; @@ -167,8 +168,8 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio } else if (!z4 || !z5) { ref$ObjectRef2 = ref$ObjectRef4; modelInvite4 = null; - guild = this.$invite.getGuild(); - if (((guild != null || (boxLong2 = b.boxLong(guild.r())) == null) ? null : StoreStream.Companion.getGuilds().getGuilds().get(b.boxLong(boxLong2.longValue()))) != null) { + guild2 = this.$invite.guild; + if (((guild2 != null || (boxLong2 = b.boxLong(guild2.r())) == null) ? null : StoreStream.Companion.getGuilds().getGuilds().get(b.boxLong(boxLong2.longValue()))) != null) { Function2 function23 = this.$onInvitePostSuccess; ModelInvite modelInvite5 = this.$invite; this.L$0 = ref$ObjectRef2; @@ -192,9 +193,9 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio boxBoolean = b.boxBoolean(z3); if (boxBoolean != null) { z2 = boxBoolean.booleanValue(); - if (this.$invite.getGuild() != null) { - Guild guild6 = this.$invite.getGuild(); - if (((guild6 == null || (boxLong = b.boxLong(guild6.r())) == null) ? 0 : boxLong.longValue()) > 0) { + guild = this.$invite.guild; + if (guild != null) { + if (((guild == null || (boxLong = b.boxLong(guild.r())) == null) ? 0 : boxLong.longValue()) > 0) { if (this.$invite.getGuildScheduledEvent() != null) { GuildScheduledEvent guildScheduledEvent = this.$invite.getGuildScheduledEvent(); if ((guildScheduledEvent != null ? guildScheduledEvent.m() : null) != GuildScheduledEventStatus.ACTIVE) { @@ -315,7 +316,8 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio } } z2 = false; - if (this.$invite.getGuild() != null) { + guild = this.$invite.guild; + if (guild != null) { } ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), this.$invite.getChannel(), null, null, 6, null); function2 = this.$onInviteFlowFinished; @@ -356,7 +358,8 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio if (channel != null) { } z2 = false; - if (this.$invite.getGuild() != null) { + guild = this.$invite.guild; + if (guild != null) { } ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), this.$invite.getChannel(), null, null, 6, null); function2 = this.$onInviteFlowFinished; @@ -382,7 +385,8 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio if (channel != null) { } z2 = false; - if (this.$invite.getGuild() != null) { + guild = this.$invite.guild; + if (guild != null) { } ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), this.$invite.getChannel(), null, null, 6, null); function2 = this.$onInviteFlowFinished; @@ -418,7 +422,7 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio g gVar2 = new g(d0.w.h.b.intercepted(this)); MemberVerificationUtils memberVerificationUtils = MemberVerificationUtils.INSTANCE; Context context2 = ref$ObjectRef4.element; - Guild guild7 = this.$invite.getGuild(); + Guild guild7 = this.$invite.guild; memberVerificationUtils.maybeShowVerificationGate(context2, ref$ObjectRef5.element, (guild7 == null || (boxLong3 = b.boxLong(guild7.r())) == null) ? -1 : boxLong3.longValue(), this.$location, this.$invite, new InviteJoinHelper$joinViaInvite$4$hasCompletedMembershipGate$1$1(gVar2), new InviteJoinHelper$joinViaInvite$4$hasCompletedMembershipGate$1$2(gVar2)); obj4 = gVar2.getOrThrow(); if (obj4 == c.getCOROUTINE_SUSPENDED()) { @@ -432,8 +436,8 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio if (!((Boolean) obj4).booleanValue()) { return Unit.a; } - guild = this.$invite.getGuild(); - if (((guild != null || (boxLong2 = b.boxLong(guild.r())) == null) ? null : StoreStream.Companion.getGuilds().getGuilds().get(b.boxLong(boxLong2.longValue()))) != null) { + guild2 = this.$invite.guild; + if (((guild2 != null || (boxLong2 = b.boxLong(guild2.r())) == null) ? null : StoreStream.Companion.getGuilds().getGuilds().get(b.boxLong(boxLong2.longValue()))) != null) { } } break; @@ -446,8 +450,8 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio obj4 = obj; if (!((Boolean) obj4).booleanValue()) { } - guild = this.$invite.getGuild(); - if (((guild != null || (boxLong2 = b.boxLong(guild.r())) == null) ? null : StoreStream.Companion.getGuilds().getGuilds().get(b.boxLong(boxLong2.longValue()))) != null) { + guild2 = this.$invite.guild; + if (((guild2 != null || (boxLong2 = b.boxLong(guild2.r())) == null) ? null : StoreStream.Companion.getGuilds().getGuilds().get(b.boxLong(boxLong2.longValue()))) != null) { } break; case 2: @@ -459,7 +463,8 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio if (channel != null) { } z2 = false; - if (this.$invite.getGuild() != null) { + guild = this.$invite.guild; + if (guild != null) { } ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), this.$invite.getChannel(), null, null, 6, null); function2 = this.$onInviteFlowFinished; @@ -501,7 +506,8 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio if (channel != null) { } z2 = false; - if (this.$invite.getGuild() != null) { + guild = this.$invite.guild; + if (guild != null) { } ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), this.$invite.getChannel(), null, null, 6, null); function2 = this.$onInviteFlowFinished; diff --git a/app/src/main/java/com/discord/widgets/guilds/invite/InviteJoinHelper.java b/app/src/main/java/com/discord/widgets/guilds/invite/InviteJoinHelper.java index a67d2eb294..bf6a9635e4 100644 --- a/app/src/main/java/com/discord/widgets/guilds/invite/InviteJoinHelper.java +++ b/app/src/main/java/com/discord/widgets/guilds/invite/InviteJoinHelper.java @@ -72,7 +72,7 @@ public final class InviteJoinHelper { } private final void navigateToGuild(ModelInvite modelInvite) { - Guild guild = modelInvite.getGuild(); + Guild guild = modelInvite.guild; if (guild != null) { StoreStream.Companion.getGuildSelected().set(guild.r()); } diff --git a/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInvite$configureLoadedUI$2.java b/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInvite$configureLoadedUI$2.java index 9244563539..4dae10a720 100644 --- a/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInvite$configureLoadedUI$2.java +++ b/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInvite$configureLoadedUI$2.java @@ -99,7 +99,7 @@ public final class WidgetGuildInvite$configureLoadedUI$2 implements View.OnClick l.throwOnFailure(obj); ModelInvite modelInvite = (ModelInvite) this.L$0; Intent addFlags = new Intent().addFlags(268468224); - Guild guild = modelInvite.getGuild(); + Guild guild = modelInvite.guild; Long l = null; Long boxLong = b.boxBoolean(modelInvite.isNewMember()).booleanValue() ? guild != null ? b.boxLong(guild.r()) : null : null; GuildScheduledEvent guildScheduledEvent = modelInvite.getGuildScheduledEvent(); diff --git a/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInviteShare.java b/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInviteShare.java index fa795586f6..cef98818df 100644 --- a/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInviteShare.java +++ b/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInviteShare.java @@ -162,7 +162,7 @@ public final class WidgetGuildInviteShare extends AppFragment { } if ((!inviteSuggestionItems.isEmpty()) && !this.hasTrackedSuggestionsViewed) { ModelInvite invite2 = widgetInviteModel.getInvite(); - long r = (invite2 == null || (guild = invite2.getGuild()) == null) ? 0 : guild.r(); + long r = (invite2 == null || (guild = invite2.guild) == null) ? 0 : guild.r(); AnalyticsTracker analyticsTracker = AnalyticsTracker.INSTANCE; ArrayList arrayList = new ArrayList(); for (Object obj : inviteSuggestionItems) { diff --git a/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInviteShareCompact.java b/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInviteShareCompact.java index f00683b888..9944da1518 100644 --- a/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInviteShareCompact.java +++ b/app/src/main/java/com/discord/widgets/guilds/invite/WidgetGuildInviteShareCompact.java @@ -198,7 +198,7 @@ public final class WidgetGuildInviteShareCompact extends AppFragment { } if ((!inviteSuggestionItems.isEmpty()) && !this.hasTrackedSuggestionsViewed) { ModelInvite invite2 = widgetInviteModel.getInvite(); - long r = (invite2 == null || (guild = invite2.getGuild()) == null) ? 0 : guild.r(); + long r = (invite2 == null || (guild = invite2.guild) == null) ? 0 : guild.r(); AnalyticsTracker analyticsTracker = AnalyticsTracker.INSTANCE; ArrayList arrayList = new ArrayList(); for (Object obj : inviteSuggestionItems) { diff --git a/app/src/main/java/com/discord/widgets/guilds/invite/WidgetInviteInfo.java b/app/src/main/java/com/discord/widgets/guilds/invite/WidgetInviteInfo.java index 14d2ad1da6..f285fa2b17 100644 --- a/app/src/main/java/com/discord/widgets/guilds/invite/WidgetInviteInfo.java +++ b/app/src/main/java/com/discord/widgets/guilds/invite/WidgetInviteInfo.java @@ -189,7 +189,7 @@ public final class WidgetInviteInfo extends ConstraintLayout { List m2; int i = 0; boolean z2 = modelInvite.getInviter() != null && modelInvite.getApproximateMemberCount() < 200; - Guild guild = modelInvite.getGuild(); + Guild guild = modelInvite.guild; if (guild != null) { GuildView guildView = this.binding.f2381b; m.checkNotNullExpressionValue(guild, "it"); @@ -212,15 +212,15 @@ public final class WidgetInviteInfo extends ConstraintLayout { simpleDraweeView2.setVisibility(i); TextView textView = this.binding.e; m.checkNotNullExpressionValue(textView, "binding.inviteMessage"); - Guild guild2 = modelInvite.getGuild(); + Guild guild2 = modelInvite.guild; String x2 = guild2 != null ? guild2.x() : null; if (x2 == null) { x2 = ""; } textView.setText(getFormattedGuildName(x2)); - Guild guild3 = modelInvite.getGuild(); + Guild guild3 = modelInvite.guild; if (guild3 == null || (m2 = guild3.m()) == null || !m2.contains(GuildFeature.VERIFIED)) { - Guild guild4 = modelInvite.getGuild(); + Guild guild4 = modelInvite.guild; if (!(guild4 == null || (m = guild4.m()) == null || !m.contains(GuildFeature.PARTNERED))) { TextView textView2 = this.binding.e; m.checkNotNullExpressionValue(textView2, "binding.inviteMessage"); @@ -272,9 +272,9 @@ public final class WidgetInviteInfo extends ConstraintLayout { public final void configureUI(ModelInvite modelInvite) { m.checkNotNullParameter(modelInvite, "model"); this.binding.f2381b.b(); - if (modelInvite.getGuild() == null && modelInvite.getChannel() == null && modelInvite.getInviter() != null) { + if (modelInvite.guild == null && modelInvite.getChannel() == null && modelInvite.getInviter() != null) { configureForDirectFriend(modelInvite); - } else if (modelInvite.getGuild() == null) { + } else if (modelInvite.guild == null) { configureForGDM(modelInvite); } else { configureForGuild(modelInvite); diff --git a/app/src/main/java/com/discord/widgets/servers/member_verification/WidgetMemberVerification$configureVerificationBanner$2.java b/app/src/main/java/com/discord/widgets/servers/member_verification/WidgetMemberVerification$configureVerificationBanner$2.java index 08f49cb0e1..3588496631 100644 --- a/app/src/main/java/com/discord/widgets/servers/member_verification/WidgetMemberVerification$configureVerificationBanner$2.java +++ b/app/src/main/java/com/discord/widgets/servers/member_verification/WidgetMemberVerification$configureVerificationBanner$2.java @@ -18,6 +18,6 @@ public final class WidgetMemberVerification$configureVerificationBanner$2 extend @Override // kotlin.jvm.functions.Function0 /* renamed from: invoke */ public final void mo1invoke() { - WidgetUserPhoneManage.Companion.launch(this.this$0.requireContext(), WidgetUserAccountVerifyBase.Mode.UNFORCED); + WidgetUserPhoneManage.Companion.launch(this.this$0.requireContext(), WidgetUserAccountVerifyBase.Mode.UNFORCED, WidgetUserPhoneManage.Companion.Source.GUILD_PHONE_REQUIRED); } } diff --git a/app/src/main/java/com/discord/widgets/servers/member_verification/WidgetMemberVerification.java b/app/src/main/java/com/discord/widgets/servers/member_verification/WidgetMemberVerification.java index 0adaf6f9e4..483f729e72 100644 --- a/app/src/main/java/com/discord/widgets/servers/member_verification/WidgetMemberVerification.java +++ b/app/src/main/java/com/discord/widgets/servers/member_verification/WidgetMemberVerification.java @@ -73,8 +73,8 @@ public final class WidgetMemberVerification extends AppFragment { Intent intent = new Intent(); intent.putExtra("INTENT_EXTRA_GUILD_ID", j); intent.putExtra(WidgetMemberVerification.INTENT_EXTRA_LOCATION, str); - if ((modelInvite != null ? modelInvite.getGuild() : null) != null) { - intent.putExtra(WidgetMemberVerification.INTENT_EXTRA_INVITE_GUILD, new Gson().m(modelInvite.getGuild())); + if ((modelInvite != null ? modelInvite.guild : null) != null) { + intent.putExtra(WidgetMemberVerification.INTENT_EXTRA_INVITE_GUILD, new Gson().m(modelInvite.guild)); } j.d(context, WidgetMemberVerification.class, intent); } diff --git a/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java b/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java index 4dab11042a..180d8d0ec5 100644 --- a/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java +++ b/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java @@ -346,7 +346,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi TextView textView = binding.f; m.checkNotNullExpressionValue(textView, "appInfoHeader"); String string = getString(R.string.app_information); - textView.setText(string + " - 109.1 - Beta (109101)"); + textView.setText(string + " - 109.7 - Beta (109107)"); binding.B.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this)); binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE); binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE); diff --git a/app/src/main/java/com/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$12.java b/app/src/main/java/com/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$12.java index 1f28b7cfc5..d078b712b0 100644 --- a/app/src/main/java/com/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$12.java +++ b/app/src/main/java/com/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$12.java @@ -28,7 +28,7 @@ public final class WidgetSettingsAccount$configureUI$12 implements View.OnClickL m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager"); companion.show(parentFragmentManager, false); } else if (userUtils.isMfaSMSEnabled(this.$user) || !userUtils.getHasPhone(this.$user)) { - WidgetUserPhoneManage.Companion.launch(a.x(view, "it", "it.context"), WidgetUserAccountVerifyBase.Mode.NO_HISTORY_FROM_USER_SETTINGS); + WidgetUserPhoneManage.Companion.launch(a.x(view, "it", "it.context"), WidgetUserAccountVerifyBase.Mode.NO_HISTORY_FROM_USER_SETTINGS, WidgetUserPhoneManage.Companion.Source.MFA_PHONE_UPDATE); } else { WidgetEnableSMSBackupDialog.Companion companion2 = WidgetEnableSMSBackupDialog.Companion; FragmentManager parentFragmentManager2 = this.this$0.getParentFragmentManager(); diff --git a/app/src/main/java/com/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$5.java b/app/src/main/java/com/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$5.java index e3c6632ac6..9d9d3e3434 100644 --- a/app/src/main/java/com/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$5.java +++ b/app/src/main/java/com/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$5.java @@ -10,6 +10,6 @@ public final class WidgetSettingsAccount$configureUI$5 implements View.OnClickLi @Override // android.view.View.OnClickListener public final void onClick(View view) { - WidgetUserPhoneManage.Companion.launch(a.x(view, "it", "it.context"), WidgetUserAccountVerifyBase.Mode.UNFORCED); + WidgetUserPhoneManage.Companion.launch(a.x(view, "it", "it.context"), WidgetUserAccountVerifyBase.Mode.UNFORCED, WidgetUserPhoneManage.Companion.Source.USER_SETTINGS_UPDATE); } } diff --git a/app/src/main/java/com/discord/widgets/settings/account/mfa/WidgetEnableMFASuccess$onViewBound$1.java b/app/src/main/java/com/discord/widgets/settings/account/mfa/WidgetEnableMFASuccess$onViewBound$1.java index d2e2a3b68d..b54467be0a 100644 --- a/app/src/main/java/com/discord/widgets/settings/account/mfa/WidgetEnableMFASuccess$onViewBound$1.java +++ b/app/src/main/java/com/discord/widgets/settings/account/mfa/WidgetEnableMFASuccess$onViewBound$1.java @@ -14,7 +14,7 @@ public final class WidgetEnableMFASuccess$onViewBound$1 implements View.OnClickL @Override // android.view.View.OnClickListener public final void onClick(View view) { - WidgetUserPhoneManage.Companion.launch(a.x(view, "it", "it.context"), WidgetUserAccountVerifyBase.Mode.NO_HISTORY_FROM_USER_SETTINGS); + WidgetUserPhoneManage.Companion.launch(a.x(view, "it", "it.context"), WidgetUserAccountVerifyBase.Mode.NO_HISTORY_FROM_USER_SETTINGS, WidgetUserPhoneManage.Companion.Source.MFA_PHONE_UPDATE); this.this$0.requireActivity().finish(); } } diff --git a/app/src/main/java/com/discord/widgets/user/WidgetUserPasswordVerify.java b/app/src/main/java/com/discord/widgets/user/WidgetUserPasswordVerify.java index 8affdb5623..9c30763583 100644 --- a/app/src/main/java/com/discord/widgets/user/WidgetUserPasswordVerify.java +++ b/app/src/main/java/com/discord/widgets/user/WidgetUserPasswordVerify.java @@ -46,6 +46,7 @@ public final class WidgetUserPasswordVerify extends AppFragment { private static final String INTENT_EXTRA_DISCRIMINATOR = "INTENT_EXTRA_DISCRIMINATOR"; private static final String INTENT_EXTRA_EMAIL = "INTENT_EXTRA_EMAIL"; private static final String INTENT_EXTRA_PHONE_TOKEN = "INTENT_EXTRA_PHONE_TOKEN"; + private static final String INTENT_EXTRA_SOURCE_TYPE = "INTENT_EXTRA_SOURCE_TYPE"; private static final String INTENT_EXTRA_USERNAME = "INTENT_EXTRA_USERNAME"; private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetUserPasswordVerify$binding$2.INSTANCE, null, 2, null); private final StatefulViews state = new StatefulViews(R.id.edit_account_password_wrap); @@ -96,13 +97,15 @@ public final class WidgetUserPasswordVerify extends AppFragment { launch(context, activityResultLauncher, bundle); } - public final void launchUpdatePhoneNumber(Context context, ActivityResultLauncher activityResultLauncher, String str) { + public final void launchUpdatePhoneNumber(Context context, ActivityResultLauncher activityResultLauncher, String str, String str2) { m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(activityResultLauncher, "launcher"); m.checkNotNullParameter(str, "phoneToken"); + m.checkNotNullParameter(str2, "source"); Bundle bundle = new Bundle(); bundle.putSerializable(WidgetUserPasswordVerify.INTENT_EXTRA_ACTION, Action.UpdatePhoneNumber); bundle.putString(WidgetUserPasswordVerify.INTENT_EXTRA_PHONE_TOKEN, str); + bundle.putString(WidgetUserPasswordVerify.INTENT_EXTRA_SOURCE_TYPE, str2); launch(context, activityResultLauncher, bundle); } @@ -215,7 +218,10 @@ public final class WidgetUserPasswordVerify extends AppFragment { String stringExtra = getMostRecentIntent().getStringExtra(INTENT_EXTRA_PHONE_TOKEN); m.checkNotNull(stringExtra); m.checkNotNullExpressionValue(stringExtra, "mostRecentIntent.getStri…TENT_EXTRA_PHONE_TOKEN)!!"); - ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().userPhoneWithToken(new RestAPIParams.VerificationPhoneCode(stringExtra, str)), false, 1, null), this, null, 2, null), getBinding().f2645b, 0, 2, null).k(o.h(new WidgetUserPasswordVerify$updatePhoneNumber$1(this), getContext(), new WidgetUserPasswordVerify$updatePhoneNumber$2(this))); + String stringExtra2 = getMostRecentIntent().getStringExtra(INTENT_EXTRA_SOURCE_TYPE); + m.checkNotNull(stringExtra2); + m.checkNotNullExpressionValue(stringExtra2, "mostRecentIntent.getStri…TENT_EXTRA_SOURCE_TYPE)!!"); + ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().userPhoneWithToken(new RestAPIParams.VerificationPhoneCode(stringExtra, str, stringExtra2)), false, 1, null), this, null, 2, null), getBinding().f2645b, 0, 2, null).k(o.h(new WidgetUserPasswordVerify$updatePhoneNumber$1(this), getContext(), new WidgetUserPasswordVerify$updatePhoneNumber$2(this))); } @Override // com.discord.app.AppFragment diff --git a/app/src/main/java/com/discord/widgets/user/account/WidgetUserAccountVerify$onViewBound$$inlined$with$lambda$2.java b/app/src/main/java/com/discord/widgets/user/account/WidgetUserAccountVerify$onViewBound$$inlined$with$lambda$2.java index 38433da880..2f00fd58fd 100644 --- a/app/src/main/java/com/discord/widgets/user/account/WidgetUserAccountVerify$onViewBound$$inlined$with$lambda$2.java +++ b/app/src/main/java/com/discord/widgets/user/account/WidgetUserAccountVerify$onViewBound$$inlined$with$lambda$2.java @@ -18,6 +18,6 @@ public final class WidgetUserAccountVerify$onViewBound$$inlined$with$lambda$2 im WidgetUserPhoneManage.Companion companion = WidgetUserPhoneManage.Companion; Context context = view.getContext(); m.checkNotNullExpressionValue(context, "v.context"); - companion.launch(context, this.this$0.getMode()); + companion.launch(context, this.this$0.getMode(), WidgetUserPhoneManage.Companion.Source.USER_ACTION_REQUIRED); } } diff --git a/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneManage$updatePhoneNumber$2.java b/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneManage$updatePhoneNumber$2.java index 1c9474753f..05453c1684 100644 --- a/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneManage$updatePhoneNumber$2.java +++ b/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneManage$updatePhoneNumber$2.java @@ -23,7 +23,7 @@ public final class WidgetUserPhoneManage$updatePhoneNumber$2 extends o implement return Unit.a; } - public final void invoke(Void r5) { - WidgetUserPhoneVerify.Companion.launch(this.this$0.requireContext(), WidgetUserPhoneManage.access$getPhoneVerificationLauncher$p(this.this$0), WidgetUserPhoneManage.access$getMode$p(this.this$0), this.$phoneNumber); + public final void invoke(Void r7) { + WidgetUserPhoneVerify.Companion.launch(this.this$0.requireContext(), WidgetUserPhoneManage.access$getPhoneVerificationLauncher$p(this.this$0), WidgetUserPhoneManage.access$getMode$p(this.this$0), this.$phoneNumber, WidgetUserPhoneManage.access$getSource$p(this.this$0)); } } diff --git a/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneManage.java b/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneManage.java index a1be5a2198..51d741c88f 100644 --- a/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneManage.java +++ b/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneManage.java @@ -22,6 +22,7 @@ import com.discord.stores.StoreUser; import com.discord.stores.updates.ObservationDeck; import com.discord.stores.updates.ObservationDeckProvider; import com.discord.utilities.drawable.DrawableCompat; +import com.discord.utilities.intent.IntentUtilsKt; import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.user.UserUtils; @@ -49,9 +50,31 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase { private final ActivityResultLauncher captchaLauncher = WidgetCaptcha.Companion.registerForResult(this, new WidgetUserPhoneManage$captchaLauncher$1(this)); private final ActivityResultLauncher passwordVerifyLauncher = WidgetUserPasswordVerify.Companion.registerForResult(this, new WidgetUserPhoneManage$passwordVerifyLauncher$1(this)); private final ActivityResultLauncher phoneVerificationLauncher = WidgetUserPhoneVerify.Companion.registerForResult(this, new WidgetUserPhoneManage$phoneVerificationLauncher$1(this)); + private String source; /* compiled from: WidgetUserPhoneManage.kt */ public static final class Companion { + + /* compiled from: WidgetUserPhoneManage.kt */ + public enum Source { + USER_ACTION_REQUIRED("user_action_required"), + USER_SETTINGS_UPDATE("user_settings_update"), + GUILD_PHONE_REQUIRED("guild_phone_required"), + MFA_PHONE_UPDATE("mfa_phone_update"), + CONTACT_SYNC("contact_sync"), + DEFAULT("update_phone"); + + private final String source; + + private Source(String str) { + this.source = str; + } + + public final String getSource() { + return this.source; + } + } + private Companion() { } @@ -59,13 +82,15 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase { this(); } - public final void launch(Context context, WidgetUserAccountVerifyBase.Mode mode) { + public final void launch(Context context, WidgetUserAccountVerifyBase.Mode mode, Source source) { m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(mode, "mode"); + m.checkNotNullParameter(source, "source"); Intent launchIntent = WidgetUserAccountVerifyBase.Companion.getLaunchIntent(mode, true, false); if (mode == WidgetUserAccountVerifyBase.Mode.NO_HISTORY_FROM_USER_SETTINGS) { launchIntent.addFlags(BasicMeasure.EXACTLY); } + launchIntent.putExtra("intent_args_key", source.getSource()); j.d(context, WidgetUserPhoneManage.class, launchIntent); } } @@ -98,6 +123,14 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase { return widgetUserPhoneManage.phoneVerificationLauncher; } + public static final /* synthetic */ String access$getSource$p(WidgetUserPhoneManage widgetUserPhoneManage) { + String str = widgetUserPhoneManage.source; + if (str == null) { + m.throwUninitializedPropertyAccessException("source"); + } + return str; + } + public static final /* synthetic */ void access$handlePhoneNumberTextChanged(WidgetUserPhoneManage widgetUserPhoneManage) { widgetUserPhoneManage.handlePhoneNumberTextChanged(); } @@ -110,6 +143,10 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase { widgetUserPhoneManage.setMode(mode); } + public static final /* synthetic */ void access$setSource$p(WidgetUserPhoneManage widgetUserPhoneManage, String str) { + widgetUserPhoneManage.source = str; + } + public static final /* synthetic */ void access$updatePhoneNumber(WidgetUserPhoneManage widgetUserPhoneManage, String str) { widgetUserPhoneManage.updatePhoneNumber(str); } @@ -176,7 +213,12 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase { private final void updatePhoneNumber(String str) { String textOrEmpty = getBinding().f.getTextOrEmpty(); - ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().userAddPhone(new RestAPIParams.Phone(textOrEmpty, str)), false, 1, null), getBinding().f2646b, 0, 2, null), this, null, 2, null), WidgetUserPhoneManage.class, (Context) null, (Function1) null, new WidgetUserPhoneManage$updatePhoneNumber$1(this), (Function0) null, (Function0) null, new WidgetUserPhoneManage$updatePhoneNumber$2(this, textOrEmpty), 54, (Object) null); + RestAPI api = RestAPI.Companion.getApi(); + String str2 = this.source; + if (str2 == null) { + m.throwUninitializedPropertyAccessException("source"); + } + ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.restSubscribeOn$default(api.userAddPhone(new RestAPIParams.Phone(textOrEmpty, str2, str)), false, 1, null), getBinding().f2646b, 0, 2, null), this, null, 2, null), WidgetUserPhoneManage.class, (Context) null, (Function1) null, new WidgetUserPhoneManage$updatePhoneNumber$1(this), (Function0) null, (Function0) null, new WidgetUserPhoneManage$updatePhoneNumber$2(this, textOrEmpty), 54, (Object) null); } public static /* synthetic */ void updatePhoneNumber$default(WidgetUserPhoneManage widgetUserPhoneManage, String str, int i, Object obj) { @@ -191,6 +233,7 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase { m.checkNotNullParameter(view, "view"); super.onViewBound(view); setActionBarDisplayHomeAsUpEnabled(!isForced(), Integer.valueOf(DrawableCompat.getThemedDrawableRes$default(view, (int) R.attr.ic_action_bar_close, 0, 2, (Object) null)), !isForced() ? Integer.valueOf((int) R.string.close) : null); + this.source = IntentUtilsKt.getStringExtraOrDefault(getMostRecentIntent(), "intent_args_key", Companion.Source.DEFAULT.getSource()); getBinding().f.b(this); StorePhone phone = StoreStream.Companion.getPhone(); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservationDeck.connectRx$default(ObservationDeckProvider.get(), new ObservationDeck.UpdateSource[]{phone}, false, null, null, new WidgetUserPhoneManage$onViewBound$1(phone), 14, null), this, null, 2, null), WidgetUserPhoneManage.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetUserPhoneManage$onViewBound$2(this), 62, (Object) null); diff --git a/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneVerify.java b/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneVerify.java index f4f98bb305..326bc263e0 100644 --- a/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneVerify.java +++ b/app/src/main/java/com/discord/widgets/user/phone/WidgetUserPhoneVerify.java @@ -38,6 +38,7 @@ public final class WidgetUserPhoneVerify extends WidgetUserAccountVerifyBase { public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.b0(WidgetUserPhoneVerify.class, "binding", "getBinding()Lcom/discord/databinding/WidgetUserPhoneVerifyBinding;", 0)}; public static final Companion Companion = new Companion(null); private static final String INTENT_EXTRA_PHONE_NUMBER = "INTENT_EXTRA_PHONE_NUMBER"; + private static final String INTENT_EXTRA_SOURCE_TYPE = "INTENT_EXTRA_SOURCE_TYPE"; private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetUserPhoneVerify$binding$2.INSTANCE, null, 2, null); private final LoggingConfig loggingConfig = new LoggingConfig(false, null, WidgetUserPhoneVerify$loggingConfig$1.INSTANCE, 3); private final ActivityResultLauncher passwordVerifyLauncher = WidgetUserPasswordVerify.Companion.registerForResult(this, new WidgetUserPhoneVerify$passwordVerifyLauncher$1(this)); @@ -51,15 +52,17 @@ public final class WidgetUserPhoneVerify extends WidgetUserAccountVerifyBase { this(); } - public final void launch(Context context, ActivityResultLauncher activityResultLauncher, WidgetUserAccountVerifyBase.Mode mode, String str) { + public final void launch(Context context, ActivityResultLauncher activityResultLauncher, WidgetUserAccountVerifyBase.Mode mode, String str, String str2) { m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(activityResultLauncher, "launcher"); m.checkNotNullParameter(mode, "mode"); + m.checkNotNullParameter(str2, "source"); Intent launchIntent = WidgetUserAccountVerifyBase.Companion.getLaunchIntent(mode, true, false); if (mode == WidgetUserAccountVerifyBase.Mode.NO_HISTORY_FROM_USER_SETTINGS) { launchIntent.addFlags(BasicMeasure.EXACTLY); } launchIntent.putExtra(WidgetUserPhoneVerify.INTENT_EXTRA_PHONE_NUMBER, str); + launchIntent.putExtra(WidgetUserPhoneVerify.INTENT_EXTRA_SOURCE_TYPE, str2); j.g.f(context, activityResultLauncher, WidgetUserPhoneVerify.class, launchIntent); } @@ -125,7 +128,11 @@ public final class WidgetUserPhoneVerify extends WidgetUserAccountVerifyBase { } private final void handleCodeReceived(String str) { - WidgetUserPasswordVerify.Companion.launchUpdatePhoneNumber(requireContext(), this.passwordVerifyLauncher, str); + String stringExtra = getMostRecentIntent().getStringExtra(INTENT_EXTRA_SOURCE_TYPE); + if (stringExtra != null) { + m.checkNotNullExpressionValue(stringExtra, "mostRecentIntent.getStri…RA_SOURCE_TYPE) ?: return"); + WidgetUserPasswordVerify.Companion.launchUpdatePhoneNumber(requireContext(), this.passwordVerifyLauncher, str, stringExtra); + } } @Override // com.discord.app.AppFragment, com.discord.app.AppLogger.a diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index dc206489fe..ccc17156a7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1531,7 +1531,7 @@ Select a color Transparency Use Default - 7b3404351aa042fab3e2b405358bee22 + 617b7a442f564523918ca11b865d83df Coming Soon Slash command application {applicationName} {applicationName} application