116.5 - Beta (116105)

This commit is contained in:
Juby210 2022-02-21 09:02:28 +00:00
parent abc1cf88d1
commit 3dcd505830
162 changed files with 15070 additions and 10946 deletions

View File

@ -10,8 +10,8 @@ android {
applicationId 'com.discord'
minSdkVersion 21
targetSdkVersion 30
versionCode 115104
versionName "115.4 - Beta"
versionCode 116105
versionName "116.5 - Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="115104" android:versionName="115.4 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="116105" android:versionName="116.5 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

View File

@ -0,0 +1,54 @@
package com.discord.analytics.generated.events;
import b.d.b.a.a;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m;
import java.util.List;
/* compiled from: TrackFeedItemSeenBatch.kt */
public final class TrackFeedItemSeenBatch implements AnalyticsSchema, TrackBaseReceiver {
private final List<Long> additionalSeenTimeMillis = null;
private final transient String analyticsSchemaTypeName = "feed_item_seen_batch";
private final List<CharSequence> feedItemIds = null;
private final CharSequence loadId = null;
private TrackBase trackBase;
@Override // com.discord.api.science.AnalyticsSchema
public String b() {
return this.analyticsSchemaTypeName;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof TrackFeedItemSeenBatch)) {
return false;
}
TrackFeedItemSeenBatch trackFeedItemSeenBatch = (TrackFeedItemSeenBatch) obj;
return m.areEqual(this.loadId, trackFeedItemSeenBatch.loadId) && m.areEqual(this.feedItemIds, trackFeedItemSeenBatch.feedItemIds) && m.areEqual(this.additionalSeenTimeMillis, trackFeedItemSeenBatch.additionalSeenTimeMillis);
}
public int hashCode() {
CharSequence charSequence = this.loadId;
int i = 0;
int hashCode = (charSequence != null ? charSequence.hashCode() : 0) * 31;
List<CharSequence> list = this.feedItemIds;
int hashCode2 = (hashCode + (list != null ? list.hashCode() : 0)) * 31;
List<Long> list2 = this.additionalSeenTimeMillis;
if (list2 != null) {
i = list2.hashCode();
}
return hashCode2 + i;
}
public String toString() {
StringBuilder R = a.R("TrackFeedItemSeenBatch(loadId=");
R.append(this.loadId);
R.append(", feedItemIds=");
R.append(this.feedItemIds);
R.append(", additionalSeenTimeMillis=");
return a.K(R, this.additionalSeenTimeMillis, ")");
}
}

View File

@ -0,0 +1,6 @@
package com.discord.analytics.generated.events;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackFeedItemSeenBatch.kt */
public interface TrackFeedItemSeenBatchReceiver extends AnalyticsSchema {
}

View File

@ -0,0 +1,21 @@
package com.discord.analytics.generated.events;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackChannel;
import com.discord.analytics.generated.traits.TrackChannelReceiver;
import com.discord.analytics.generated.traits.TrackGuild;
import com.discord.analytics.generated.traits.TrackGuildReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackGuildFeedChannelRemoved.kt */
public final class TrackGuildFeedChannelRemoved implements AnalyticsSchema, TrackBaseReceiver, TrackChannelReceiver, TrackGuildReceiver {
private final transient String analyticsSchemaTypeName = "guild_feed_channel_removed";
private TrackBase trackBase;
private TrackChannel trackChannel;
private TrackGuild trackGuild;
@Override // com.discord.api.science.AnalyticsSchema
public String b() {
return this.analyticsSchemaTypeName;
}
}

View File

@ -0,0 +1,6 @@
package com.discord.analytics.generated.events;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackGuildFeedChannelRemoved.kt */
public interface TrackGuildFeedChannelRemovedReceiver extends AnalyticsSchema {
}

View File

@ -0,0 +1,21 @@
package com.discord.analytics.generated.events;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackChannel;
import com.discord.analytics.generated.traits.TrackChannelReceiver;
import com.discord.analytics.generated.traits.TrackGuild;
import com.discord.analytics.generated.traits.TrackGuildReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackGuildFeedChannelUnremoved.kt */
public final class TrackGuildFeedChannelUnremoved implements AnalyticsSchema, TrackBaseReceiver, TrackChannelReceiver, TrackGuildReceiver {
private final transient String analyticsSchemaTypeName = "guild_feed_channel_unremoved";
private TrackBase trackBase;
private TrackChannel trackChannel;
private TrackGuild trackGuild;
@Override // com.discord.api.science.AnalyticsSchema
public String b() {
return this.analyticsSchemaTypeName;
}
}

View File

@ -0,0 +1,6 @@
package com.discord.analytics.generated.events;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackGuildFeedChannelUnremoved.kt */
public interface TrackGuildFeedChannelUnremovedReceiver extends AnalyticsSchema {
}

View File

@ -7,6 +7,8 @@ import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.analytics.generated.traits.TrackPaymentMetadata;
import com.discord.analytics.generated.traits.TrackPaymentMetadataReceiver;
import com.discord.analytics.generated.traits.TrackSourceMetadata;
import com.discord.analytics.generated.traits.TrackSourceMetadataReceiver;
import com.discord.analytics.generated.traits.TrackStoreSkuMetadata;
import com.discord.analytics.generated.traits.TrackStoreSkuMetadataReceiver;
import com.discord.analytics.generated.traits.TrackSubscriptionMetadata;
@ -14,7 +16,7 @@ import com.discord.analytics.generated.traits.TrackSubscriptionMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m;
/* compiled from: TrackPaymentFlowFailed.kt */
public final class TrackPaymentFlowFailed implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackStoreSkuMetadataReceiver, TrackSubscriptionMetadataReceiver, TrackPaymentMetadataReceiver {
public final class TrackPaymentFlowFailed implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackStoreSkuMetadataReceiver, TrackSubscriptionMetadataReceiver, TrackPaymentMetadataReceiver, TrackSourceMetadataReceiver {
private final transient String analyticsSchemaTypeName = "payment_flow_failed";
private final Long durationMs = null;
private final Boolean eligibleForTrial = null;
@ -25,6 +27,7 @@ public final class TrackPaymentFlowFailed implements AnalyticsSchema, TrackBaseR
private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata;
private TrackPaymentMetadata trackPaymentMetadata;
private TrackSourceMetadata trackSourceMetadata;
private TrackStoreSkuMetadata trackStoreSkuMetadata;
private TrackSubscriptionMetadata trackSubscriptionMetadata;

View File

@ -6,15 +6,18 @@ import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.analytics.generated.traits.TrackPaymentMetadata;
import com.discord.analytics.generated.traits.TrackPaymentMetadataReceiver;
import com.discord.analytics.generated.traits.TrackSourceMetadata;
import com.discord.analytics.generated.traits.TrackSourceMetadataReceiver;
import com.discord.analytics.generated.traits.TrackSubscriptionMetadata;
import com.discord.analytics.generated.traits.TrackSubscriptionMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackPaymentFlowOpened.kt */
public final class TrackPaymentFlowOpened implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackSubscriptionMetadataReceiver, TrackPaymentMetadataReceiver {
public final class TrackPaymentFlowOpened implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackSubscriptionMetadataReceiver, TrackPaymentMetadataReceiver, TrackSourceMetadataReceiver {
private final transient String analyticsSchemaTypeName = "payment_flow_opened";
private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata;
private TrackPaymentMetadata trackPaymentMetadata;
private TrackSourceMetadata trackSourceMetadata;
private TrackSubscriptionMetadata trackSubscriptionMetadata;
@Override // com.discord.api.science.AnalyticsSchema

View File

@ -7,6 +7,8 @@ import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.analytics.generated.traits.TrackPaymentMetadata;
import com.discord.analytics.generated.traits.TrackPaymentMetadataReceiver;
import com.discord.analytics.generated.traits.TrackSourceMetadata;
import com.discord.analytics.generated.traits.TrackSourceMetadataReceiver;
import com.discord.analytics.generated.traits.TrackStoreSkuMetadata;
import com.discord.analytics.generated.traits.TrackStoreSkuMetadataReceiver;
import com.discord.analytics.generated.traits.TrackSubscriptionMetadata;
@ -14,7 +16,7 @@ import com.discord.analytics.generated.traits.TrackSubscriptionMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m;
/* compiled from: TrackPaymentFlowStep.kt */
public final class TrackPaymentFlowStep implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackStoreSkuMetadataReceiver, TrackSubscriptionMetadataReceiver, TrackPaymentMetadataReceiver {
public final class TrackPaymentFlowStep implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackStoreSkuMetadataReceiver, TrackSubscriptionMetadataReceiver, TrackPaymentMetadataReceiver, TrackSourceMetadataReceiver {
private final transient String analyticsSchemaTypeName = "payment_flow_step";
private final Boolean eligibleForTrial = null;
private final Long flowDurationMs = null;
@ -26,6 +28,7 @@ public final class TrackPaymentFlowStep implements AnalyticsSchema, TrackBaseRec
private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata;
private TrackPaymentMetadata trackPaymentMetadata;
private TrackSourceMetadata trackSourceMetadata;
private TrackStoreSkuMetadata trackStoreSkuMetadata;
private TrackSubscriptionMetadata trackSubscriptionMetadata;

View File

@ -12,6 +12,7 @@ public final class TrackActivityInternalClientStatus implements AnalyticsSchema,
private final Long activityHeight = null;
private final Long activityWidth = null;
private final transient String analyticsSchemaTypeName = "activity_internal_client_status";
private final Float fpsAvg = null;
private final Long intervalRateMs = null;
private final Long networkAttempts = null;
private final Long networkLatencyMs = null;
@ -31,7 +32,7 @@ public final class TrackActivityInternalClientStatus implements AnalyticsSchema,
return false;
}
TrackActivityInternalClientStatus trackActivityInternalClientStatus = (TrackActivityInternalClientStatus) obj;
return m.areEqual(this.activityWidth, trackActivityInternalClientStatus.activityWidth) && m.areEqual(this.activityHeight, trackActivityInternalClientStatus.activityHeight) && m.areEqual(this.networkLatencyMs, trackActivityInternalClientStatus.networkLatencyMs) && m.areEqual(this.networkAttempts, trackActivityInternalClientStatus.networkAttempts) && m.areEqual(this.intervalRateMs, trackActivityInternalClientStatus.intervalRateMs);
return m.areEqual(this.activityWidth, trackActivityInternalClientStatus.activityWidth) && m.areEqual(this.activityHeight, trackActivityInternalClientStatus.activityHeight) && m.areEqual(this.networkLatencyMs, trackActivityInternalClientStatus.networkLatencyMs) && m.areEqual(this.networkAttempts, trackActivityInternalClientStatus.networkAttempts) && m.areEqual(this.intervalRateMs, trackActivityInternalClientStatus.intervalRateMs) && m.areEqual(this.fpsAvg, trackActivityInternalClientStatus.fpsAvg);
}
public int hashCode() {
@ -45,10 +46,12 @@ public final class TrackActivityInternalClientStatus implements AnalyticsSchema,
Long l4 = this.networkAttempts;
int hashCode4 = (hashCode3 + (l4 != null ? l4.hashCode() : 0)) * 31;
Long l5 = this.intervalRateMs;
if (l5 != null) {
i = l5.hashCode();
int hashCode5 = (hashCode4 + (l5 != null ? l5.hashCode() : 0)) * 31;
Float f = this.fpsAvg;
if (f != null) {
i = f.hashCode();
}
return hashCode4 + i;
return hashCode5 + i;
}
public String toString() {
@ -61,6 +64,10 @@ public final class TrackActivityInternalClientStatus implements AnalyticsSchema,
R.append(", networkAttempts=");
R.append(this.networkAttempts);
R.append(", intervalRateMs=");
return a.F(R, this.intervalRateMs, ")");
R.append(this.intervalRateMs);
R.append(", fpsAvg=");
R.append(this.fpsAvg);
R.append(")");
return R.toString();
}
}

View File

@ -0,0 +1,26 @@
package com.discord.analytics.generated.events.network_action;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.analytics.generated.traits.TrackNetworkMetadata;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackNetworkActionAuthorizePayment.kt */
public final class TrackNetworkActionAuthorizePayment implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver {
private final transient String analyticsSchemaTypeName = "network_action_authorize_payment";
private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata;
private TrackNetworkMetadata trackNetworkMetadata;
@Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver
public void a(TrackNetworkMetadata trackNetworkMetadata) {
this.trackNetworkMetadata = trackNetworkMetadata;
}
@Override // com.discord.api.science.AnalyticsSchema
public String b() {
return this.analyticsSchemaTypeName;
}
}

View File

@ -0,0 +1,6 @@
package com.discord.analytics.generated.events.network_action;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackNetworkActionAuthorizePayment.kt */
public interface TrackNetworkActionAuthorizePaymentReceiver extends AnalyticsSchema {
}

View File

@ -28,5 +28,6 @@ public enum GuildFeature {
ROLE_ICONS,
ANIMATED_BANNER,
TEXT_IN_VOICE_ENABLED,
HAS_DIRECTORY_ENTRY
HAS_DIRECTORY_ENTRY,
EXPOSED_TO_BOOSTING_TIERS_EXPERIMENT
}

View File

@ -20,6 +20,7 @@ import com.discord.api.sticker.Sticker;
import com.discord.api.sticker.StickerPartial;
import com.discord.api.user.User;
import com.discord.api.utcdatetime.UtcDateTime;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.g0.w;
import d0.t.h0;
import d0.z.d.m;
@ -39,7 +40,7 @@ public final class Message {
private final User author;
private Map<String, MessageReaction> cachedReactionsMap;
private final MessageCall call;
private final String captchaKey;
private final CaptchaHelper.CaptchaPayload captchaPayload;
private final long channelId;
private final List<Component> components;
private final String content;
@ -85,7 +86,7 @@ public final class Message {
/* JADX DEBUG: Multi-variable search result rejected for r34v0, resolved type: java.util.List<? extends com.discord.api.botuikit.Component> */
/* JADX WARN: Multi-variable type inference failed */
public Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9, String str3) {
public Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9, CaptchaHelper.CaptchaPayload captchaPayload) {
this.f2721id = j;
this.channelId = j2;
this.guildId = l;
@ -123,12 +124,12 @@ public final class Message {
this.lastManualAttemptTimestamp = l5;
this.initialAttemptTimestamp = l6;
this.localAttachments = list9;
this.captchaKey = str3;
this.captchaPayload = captchaPayload;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, String str3, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(j, j2, (i & 4) != 0 ? null : l, (i & 8) != 0 ? null : user, (i & 16) != 0 ? null : str, (i & 32) != 0 ? null : utcDateTime, (i & 64) != 0 ? null : utcDateTime2, (i & 128) != 0 ? null : bool, (i & 256) != 0 ? null : bool2, (i & 512) != 0 ? null : list, (i & 1024) != 0 ? null : list2, (i & 2048) != 0 ? null : list3, (i & 4096) != 0 ? null : list4, (i & 8192) != 0 ? null : list5, (i & 16384) != 0 ? null : str2, (32768 & i) != 0 ? null : bool3, (65536 & i) != 0 ? null : l2, (131072 & i) != 0 ? null : num, (262144 & i) != 0 ? null : messageActivity, (524288 & i) != 0 ? null : application, (1048576 & i) != 0 ? null : l3, (2097152 & i) != 0 ? null : messageReference, (4194304 & i) != 0 ? null : l4, (8388608 & i) != 0 ? null : list6, (16777216 & i) != 0 ? null : list7, (33554432 & i) != 0 ? null : message, (67108864 & i) != 0 ? null : interaction, (134217728 & i) != 0 ? null : channel, (268435456 & i) != 0 ? null : list8, (536870912 & i) != 0 ? null : messageCall, (1073741824 & i) != 0 ? null : bool4, (i & Integer.MIN_VALUE) != 0 ? false : z2, (i2 & 1) != 0 ? null : messageAllowedMentions, (i2 & 2) != 0 ? null : num2, (i2 & 4) != 0 ? null : l5, (i2 & 8) != 0 ? null : l6, (i2 & 16) != 0 ? null : list9, (i2 & 32) != 0 ? null : str3);
public /* synthetic */ Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, CaptchaHelper.CaptchaPayload captchaPayload, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(j, j2, (i & 4) != 0 ? null : l, (i & 8) != 0 ? null : user, (i & 16) != 0 ? null : str, (i & 32) != 0 ? null : utcDateTime, (i & 64) != 0 ? null : utcDateTime2, (i & 128) != 0 ? null : bool, (i & 256) != 0 ? null : bool2, (i & 512) != 0 ? null : list, (i & 1024) != 0 ? null : list2, (i & 2048) != 0 ? null : list3, (i & 4096) != 0 ? null : list4, (i & 8192) != 0 ? null : list5, (i & 16384) != 0 ? null : str2, (32768 & i) != 0 ? null : bool3, (65536 & i) != 0 ? null : l2, (131072 & i) != 0 ? null : num, (262144 & i) != 0 ? null : messageActivity, (524288 & i) != 0 ? null : application, (1048576 & i) != 0 ? null : l3, (2097152 & i) != 0 ? null : messageReference, (4194304 & i) != 0 ? null : l4, (8388608 & i) != 0 ? null : list6, (16777216 & i) != 0 ? null : list7, (33554432 & i) != 0 ? null : message, (67108864 & i) != 0 ? null : interaction, (134217728 & i) != 0 ? null : channel, (268435456 & i) != 0 ? null : list8, (536870912 & i) != 0 ? null : messageCall, (1073741824 & i) != 0 ? null : bool4, (i & Integer.MIN_VALUE) != 0 ? false : z2, (i2 & 1) != 0 ? null : messageAllowedMentions, (i2 & 2) != 0 ? null : num2, (i2 & 4) != 0 ? null : l5, (i2 & 8) != 0 ? null : l6, (i2 & 16) != 0 ? null : list9, (i2 & 32) != 0 ? null : captchaPayload);
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
@ -137,8 +138,8 @@ public final class Message {
m.checkNotNullParameter(message, "message");
}
public static /* synthetic */ Message copy$default(Message message, long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message2, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, String str3, int i, int i2, Object obj) {
return message.copy((i & 1) != 0 ? message.f2721id : j, (i & 2) != 0 ? message.channelId : j2, (i & 4) != 0 ? message.guildId : l, (i & 8) != 0 ? message.author : user, (i & 16) != 0 ? message.content : str, (i & 32) != 0 ? message.timestamp : utcDateTime, (i & 64) != 0 ? message.editedTimestamp : utcDateTime2, (i & 128) != 0 ? message.tts : bool, (i & 256) != 0 ? message.mentionEveryone : bool2, (i & 512) != 0 ? message.mentions : list, (i & 1024) != 0 ? message.mentionRoles : list2, (i & 2048) != 0 ? message.attachments : list3, (i & 4096) != 0 ? message.embeds : list4, (i & 8192) != 0 ? message.reactions : list5, (i & 16384) != 0 ? message.nonce : str2, (i & 32768) != 0 ? message.pinned : bool3, (i & 65536) != 0 ? message.webhookId : l2, (i & 131072) != 0 ? message.type : num, (i & 262144) != 0 ? message.activity : messageActivity, (i & 524288) != 0 ? message.application : application, (i & 1048576) != 0 ? message.applicationId : l3, (i & 2097152) != 0 ? message.messageReference : messageReference, (i & 4194304) != 0 ? message.flags : l4, (i & 8388608) != 0 ? message.stickers : list6, (i & 16777216) != 0 ? message.stickerItems : list7, (i & 33554432) != 0 ? message.referencedMessage : message2, (i & 67108864) != 0 ? message.interaction : interaction, (i & 134217728) != 0 ? message.thread : channel, (i & 268435456) != 0 ? message.components : list8, (i & 536870912) != 0 ? message.call : messageCall, (i & BasicMeasure.EXACTLY) != 0 ? message.hit : bool4, (i & Integer.MIN_VALUE) != 0 ? message.hasLocalUploads : z2, (i2 & 1) != 0 ? message.allowedMentions : messageAllowedMentions, (i2 & 2) != 0 ? message.numRetries : num2, (i2 & 4) != 0 ? message.lastManualAttemptTimestamp : l5, (i2 & 8) != 0 ? message.initialAttemptTimestamp : l6, (i2 & 16) != 0 ? message.localAttachments : list9, (i2 & 32) != 0 ? message.captchaKey : str3);
public static /* synthetic */ Message copy$default(Message message, long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message2, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, CaptchaHelper.CaptchaPayload captchaPayload, int i, int i2, Object obj) {
return message.copy((i & 1) != 0 ? message.f2721id : j, (i & 2) != 0 ? message.channelId : j2, (i & 4) != 0 ? message.guildId : l, (i & 8) != 0 ? message.author : user, (i & 16) != 0 ? message.content : str, (i & 32) != 0 ? message.timestamp : utcDateTime, (i & 64) != 0 ? message.editedTimestamp : utcDateTime2, (i & 128) != 0 ? message.tts : bool, (i & 256) != 0 ? message.mentionEveryone : bool2, (i & 512) != 0 ? message.mentions : list, (i & 1024) != 0 ? message.mentionRoles : list2, (i & 2048) != 0 ? message.attachments : list3, (i & 4096) != 0 ? message.embeds : list4, (i & 8192) != 0 ? message.reactions : list5, (i & 16384) != 0 ? message.nonce : str2, (i & 32768) != 0 ? message.pinned : bool3, (i & 65536) != 0 ? message.webhookId : l2, (i & 131072) != 0 ? message.type : num, (i & 262144) != 0 ? message.activity : messageActivity, (i & 524288) != 0 ? message.application : application, (i & 1048576) != 0 ? message.applicationId : l3, (i & 2097152) != 0 ? message.messageReference : messageReference, (i & 4194304) != 0 ? message.flags : l4, (i & 8388608) != 0 ? message.stickers : list6, (i & 16777216) != 0 ? message.stickerItems : list7, (i & 33554432) != 0 ? message.referencedMessage : message2, (i & 67108864) != 0 ? message.interaction : interaction, (i & 134217728) != 0 ? message.thread : channel, (i & 268435456) != 0 ? message.components : list8, (i & 536870912) != 0 ? message.call : messageCall, (i & BasicMeasure.EXACTLY) != 0 ? message.hit : bool4, (i & Integer.MIN_VALUE) != 0 ? message.hasLocalUploads : z2, (i2 & 1) != 0 ? message.allowedMentions : messageAllowedMentions, (i2 & 2) != 0 ? message.numRetries : num2, (i2 & 4) != 0 ? message.lastManualAttemptTimestamp : l5, (i2 & 8) != 0 ? message.initialAttemptTimestamp : l6, (i2 & 16) != 0 ? message.localAttachments : list9, (i2 & 32) != 0 ? message.captchaPayload : captchaPayload);
}
public final boolean canResend() {
@ -270,8 +271,8 @@ public final class Message {
return this.localAttachments;
}
public final String component38() {
return this.captchaKey;
public final CaptchaHelper.CaptchaPayload component38() {
return this.captchaPayload;
}
public final User component4() {
@ -298,8 +299,8 @@ public final class Message {
return this.mentionEveryone;
}
public final Message copy(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9, String str3) {
return new Message(j, j2, l, user, str, utcDateTime, utcDateTime2, bool, bool2, list, list2, list3, list4, list5, str2, bool3, l2, num, messageActivity, application, l3, messageReference, l4, list6, list7, message, interaction, channel, list8, messageCall, bool4, z2, messageAllowedMentions, num2, l5, l6, list9, str3);
public final Message copy(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9, CaptchaHelper.CaptchaPayload captchaPayload) {
return new Message(j, j2, l, user, str, utcDateTime, utcDateTime2, bool, bool2, list, list2, list3, list4, list5, str2, bool3, l2, num, messageActivity, application, l3, messageReference, l4, list6, list7, message, interaction, channel, list8, messageCall, bool4, z2, messageAllowedMentions, num2, l5, l6, list9, captchaPayload);
}
public boolean equals(Object obj) {
@ -310,7 +311,7 @@ public final class Message {
return false;
}
Message message = (Message) obj;
return this.f2721id == message.f2721id && this.channelId == message.channelId && m.areEqual(this.guildId, message.guildId) && m.areEqual(this.author, message.author) && m.areEqual(this.content, message.content) && m.areEqual(this.timestamp, message.timestamp) && m.areEqual(this.editedTimestamp, message.editedTimestamp) && m.areEqual(this.tts, message.tts) && m.areEqual(this.mentionEveryone, message.mentionEveryone) && m.areEqual(this.mentions, message.mentions) && m.areEqual(this.mentionRoles, message.mentionRoles) && m.areEqual(this.attachments, message.attachments) && m.areEqual(this.embeds, message.embeds) && m.areEqual(this.reactions, message.reactions) && m.areEqual(this.nonce, message.nonce) && m.areEqual(this.pinned, message.pinned) && m.areEqual(this.webhookId, message.webhookId) && m.areEqual(this.type, message.type) && m.areEqual(this.activity, message.activity) && m.areEqual(this.application, message.application) && m.areEqual(this.applicationId, message.applicationId) && m.areEqual(this.messageReference, message.messageReference) && m.areEqual(this.flags, message.flags) && m.areEqual(this.stickers, message.stickers) && m.areEqual(this.stickerItems, message.stickerItems) && m.areEqual(this.referencedMessage, message.referencedMessage) && m.areEqual(this.interaction, message.interaction) && m.areEqual(this.thread, message.thread) && m.areEqual(this.components, message.components) && m.areEqual(this.call, message.call) && m.areEqual(this.hit, message.hit) && this.hasLocalUploads == message.hasLocalUploads && m.areEqual(this.allowedMentions, message.allowedMentions) && m.areEqual(this.numRetries, message.numRetries) && m.areEqual(this.lastManualAttemptTimestamp, message.lastManualAttemptTimestamp) && m.areEqual(this.initialAttemptTimestamp, message.initialAttemptTimestamp) && m.areEqual(this.localAttachments, message.localAttachments) && m.areEqual(this.captchaKey, message.captchaKey);
return this.f2721id == message.f2721id && this.channelId == message.channelId && m.areEqual(this.guildId, message.guildId) && m.areEqual(this.author, message.author) && m.areEqual(this.content, message.content) && m.areEqual(this.timestamp, message.timestamp) && m.areEqual(this.editedTimestamp, message.editedTimestamp) && m.areEqual(this.tts, message.tts) && m.areEqual(this.mentionEveryone, message.mentionEveryone) && m.areEqual(this.mentions, message.mentions) && m.areEqual(this.mentionRoles, message.mentionRoles) && m.areEqual(this.attachments, message.attachments) && m.areEqual(this.embeds, message.embeds) && m.areEqual(this.reactions, message.reactions) && m.areEqual(this.nonce, message.nonce) && m.areEqual(this.pinned, message.pinned) && m.areEqual(this.webhookId, message.webhookId) && m.areEqual(this.type, message.type) && m.areEqual(this.activity, message.activity) && m.areEqual(this.application, message.application) && m.areEqual(this.applicationId, message.applicationId) && m.areEqual(this.messageReference, message.messageReference) && m.areEqual(this.flags, message.flags) && m.areEqual(this.stickers, message.stickers) && m.areEqual(this.stickerItems, message.stickerItems) && m.areEqual(this.referencedMessage, message.referencedMessage) && m.areEqual(this.interaction, message.interaction) && m.areEqual(this.thread, message.thread) && m.areEqual(this.components, message.components) && m.areEqual(this.call, message.call) && m.areEqual(this.hit, message.hit) && this.hasLocalUploads == message.hasLocalUploads && m.areEqual(this.allowedMentions, message.allowedMentions) && m.areEqual(this.numRetries, message.numRetries) && m.areEqual(this.lastManualAttemptTimestamp, message.lastManualAttemptTimestamp) && m.areEqual(this.initialAttemptTimestamp, message.initialAttemptTimestamp) && m.areEqual(this.localAttachments, message.localAttachments) && m.areEqual(this.captchaPayload, message.captchaPayload);
}
public final MessageActivity getActivity() {
@ -351,8 +352,8 @@ public final class Message {
return a.g() - utcDateTime.g();
}
public final String getCaptchaKey() {
return this.captchaKey;
public final CaptchaHelper.CaptchaPayload getCaptchaPayload() {
return this.captchaPayload;
}
public final long getChannelId() {
@ -605,9 +606,9 @@ public final class Message {
int hashCode33 = (hashCode32 + (l6 != null ? l6.hashCode() : 0)) * 31;
List<LocalAttachment> list9 = this.localAttachments;
int hashCode34 = (hashCode33 + (list9 != null ? list9.hashCode() : 0)) * 31;
String str3 = this.captchaKey;
if (str3 != null) {
i = str3.hashCode();
CaptchaHelper.CaptchaPayload captchaPayload = this.captchaPayload;
if (captchaPayload != null) {
i = captchaPayload.hashCode();
}
return hashCode34 + i;
}
@ -813,6 +814,10 @@ public final class Message {
return copy$default(this, o, g, m, e, i, C, j, D, r, t, s2, d, k, x2, v, w, F, E, a, b2, c, u, l, A, z2, y2, p, B, h, f, null, false, null, null, null, null, null, null, -1073741824, 63, null);
}
public final boolean shouldShowReplyPreviewAsAttachment() {
return (this.activity == null || this.application == null) ? false : true;
}
public final com.discord.api.message.Message synthesizeApiMessage() {
return new com.discord.api.message.Message(this.f2721id, this.channelId, this.author, this.content, this.timestamp, this.editedTimestamp, this.tts, this.mentionEveryone, this.mentions, this.mentionRoles, this.attachments, this.embeds, this.reactions, this.nonce, this.pinned, this.webhookId, this.type, this.activity, this.application, this.applicationId, this.messageReference, this.flags, this.stickers, this.stickerItems, this.referencedMessage, this.interaction, this.thread, this.components, this.call, this.guildId, null, null, -1073741824);
}
@ -892,7 +897,9 @@ public final class Message {
R.append(this.initialAttemptTimestamp);
R.append(", localAttachments=");
R.append(this.localAttachments);
R.append(", captchaKey=");
return a.H(R, this.captchaKey, ")");
R.append(", captchaPayload=");
R.append(this.captchaPayload);
R.append(")");
return R.toString();
}
}

View File

@ -273,6 +273,7 @@ public final class RestAPIParams {
/* compiled from: RestAPIParams.kt */
public static final class AuthLogin {
private final String captchaKey;
private final String captchaRqtoken;
private final String login;
private final String loginSource;
private final String password;
@ -287,18 +288,20 @@ public final class RestAPIParams {
}
}
public AuthLogin(String str, String str2, String str3, Boolean bool, String str4) {
public AuthLogin(String str, String str2, String str3, String str4, Boolean bool, String str5) {
this.login = str;
this.password = str2;
this.captchaKey = str3;
this.captchaRqtoken = str4;
this.undelete = bool;
this.loginSource = str4;
this.loginSource = str5;
}
}
/* compiled from: RestAPIParams.kt */
public static final class AuthRegister {
private final String captchaKey;
private final String captchaRqtoken;
private final boolean consent;
private final String dateOfBirth;
private final String email;
@ -309,34 +312,37 @@ public final class RestAPIParams {
private final String phoneToken;
private final String username;
public AuthRegister(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, boolean z2, String str9) {
public AuthRegister(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, String str9, boolean z2, String str10) {
this.fingerprint = str;
this.username = str2;
this.email = str3;
this.phoneToken = str4;
this.password = str5;
this.captchaKey = str6;
this.invite = str7;
this.guildTemplateCode = str8;
this.captchaRqtoken = str7;
this.invite = str8;
this.guildTemplateCode = str9;
this.consent = z2;
this.dateOfBirth = str9;
this.dateOfBirth = str10;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ AuthRegister(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, boolean z2, String str9, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, str2, str3, str4, str5, str6, str7, str8, z2, (i & 512) != 0 ? null : str9);
public /* synthetic */ AuthRegister(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, String str9, boolean z2, String str10, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, str2, str3, str4, str5, str6, str7, str8, str9, z2, (i & 1024) != 0 ? null : str10);
}
}
/* compiled from: RestAPIParams.kt */
public static final class AuthRegisterPhone {
private final String captchaKey;
private final String captchaRqtoken;
private final String phone;
public AuthRegisterPhone(String str, String str2) {
public AuthRegisterPhone(String str, String str2, String str3) {
m.checkNotNullParameter(str, "phone");
this.phone = str;
this.captchaKey = str2;
this.captchaRqtoken = str3;
}
}
@ -370,9 +376,11 @@ public final class RestAPIParams {
/* compiled from: RestAPIParams.kt */
public static final class CaptchaCode {
private final String captchaKey;
private final String captchaRqtoken;
public CaptchaCode(String str) {
public CaptchaCode(String str, String str2) {
this.captchaKey = str;
this.captchaRqtoken = str2;
}
}
@ -1859,11 +1867,13 @@ public final class RestAPIParams {
/* compiled from: RestAPIParams.kt */
public static final class ForgotPassword {
private final String captchaKey;
private final String captchaRqtoken;
private final String login;
public ForgotPassword(String str, String str2) {
public ForgotPassword(String str, String str2, String str3) {
this.login = str;
this.captchaKey = str2;
this.captchaRqtoken = str3;
}
}
@ -2143,9 +2153,11 @@ public final class RestAPIParams {
/* compiled from: RestAPIParams.kt */
public static final class InviteCode {
private final String captchaKey;
private final String captchaRqtoken;
public InviteCode(String str) {
public InviteCode(String str, String str2) {
this.captchaKey = str;
this.captchaRqtoken = str2;
}
}
@ -2337,6 +2349,7 @@ public final class RestAPIParams {
private final AllowedMentions allowedMentions;
private final Long applicationId;
private final String captchaKey;
private final String captchaRqtoken;
private final String content;
private final MessageReference messageReference;
private final String nonce;
@ -2452,7 +2465,7 @@ public final class RestAPIParams {
}
}
public Message(String str, String str2, Long l, Activity activity, List<Long> list, MessageReference messageReference, AllowedMentions allowedMentions, String str3) {
public Message(String str, String str2, Long l, Activity activity, List<Long> list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, String str4) {
this.content = str;
this.nonce = str2;
this.applicationId = l;
@ -2461,15 +2474,16 @@ public final class RestAPIParams {
this.messageReference = messageReference;
this.allowedMentions = allowedMentions;
this.captchaKey = str3;
this.captchaRqtoken = str4;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ Message(String str, String str2, Long l, Activity activity, List list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, str2, (i & 4) != 0 ? null : l, (i & 8) != 0 ? null : activity, (i & 16) != 0 ? null : list, (i & 32) != 0 ? null : messageReference, (i & 64) != 0 ? null : allowedMentions, (i & 128) != 0 ? null : str3);
public /* synthetic */ Message(String str, String str2, Long l, Activity activity, List list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, String str4, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, str2, (i & 4) != 0 ? null : l, (i & 8) != 0 ? null : activity, (i & 16) != 0 ? null : list, (i & 32) != 0 ? null : messageReference, (i & 64) != 0 ? null : allowedMentions, (i & 128) != 0 ? null : str3, (i & 256) != 0 ? null : str4);
}
public static /* synthetic */ Message copy$default(Message message, String str, String str2, Long l, Activity activity, List list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, int i, Object obj) {
return message.copy((i & 1) != 0 ? message.content : str, (i & 2) != 0 ? message.nonce : str2, (i & 4) != 0 ? message.applicationId : l, (i & 8) != 0 ? message.activity : activity, (i & 16) != 0 ? message.stickerIds : list, (i & 32) != 0 ? message.messageReference : messageReference, (i & 64) != 0 ? message.allowedMentions : allowedMentions, (i & 128) != 0 ? message.captchaKey : str3);
public static /* synthetic */ Message copy$default(Message message, String str, String str2, Long l, Activity activity, List list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, String str4, int i, Object obj) {
return message.copy((i & 1) != 0 ? message.content : str, (i & 2) != 0 ? message.nonce : str2, (i & 4) != 0 ? message.applicationId : l, (i & 8) != 0 ? message.activity : activity, (i & 16) != 0 ? message.stickerIds : list, (i & 32) != 0 ? message.messageReference : messageReference, (i & 64) != 0 ? message.allowedMentions : allowedMentions, (i & 128) != 0 ? message.captchaKey : str3, (i & 256) != 0 ? message.captchaRqtoken : str4);
}
public final String component1() {
@ -2504,8 +2518,12 @@ public final class RestAPIParams {
return this.captchaKey;
}
public final Message copy(String str, String str2, Long l, Activity activity, List<Long> list, MessageReference messageReference, AllowedMentions allowedMentions, String str3) {
return new Message(str, str2, l, activity, list, messageReference, allowedMentions, str3);
public final String component9() {
return this.captchaRqtoken;
}
public final Message copy(String str, String str2, Long l, Activity activity, List<Long> list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, String str4) {
return new Message(str, str2, l, activity, list, messageReference, allowedMentions, str3, str4);
}
public boolean equals(Object obj) {
@ -2516,7 +2534,7 @@ public final class RestAPIParams {
return false;
}
Message message = (Message) obj;
return m.areEqual(this.content, message.content) && m.areEqual(this.nonce, message.nonce) && m.areEqual(this.applicationId, message.applicationId) && m.areEqual(this.activity, message.activity) && m.areEqual(this.stickerIds, message.stickerIds) && m.areEqual(this.messageReference, message.messageReference) && m.areEqual(this.allowedMentions, message.allowedMentions) && m.areEqual(this.captchaKey, message.captchaKey);
return m.areEqual(this.content, message.content) && m.areEqual(this.nonce, message.nonce) && m.areEqual(this.applicationId, message.applicationId) && m.areEqual(this.activity, message.activity) && m.areEqual(this.stickerIds, message.stickerIds) && m.areEqual(this.messageReference, message.messageReference) && m.areEqual(this.allowedMentions, message.allowedMentions) && m.areEqual(this.captchaKey, message.captchaKey) && m.areEqual(this.captchaRqtoken, message.captchaRqtoken);
}
public final Activity getActivity() {
@ -2535,6 +2553,10 @@ public final class RestAPIParams {
return this.captchaKey;
}
public final String getCaptchaRqtoken() {
return this.captchaRqtoken;
}
public final String getContent() {
return this.content;
}
@ -2568,10 +2590,12 @@ public final class RestAPIParams {
AllowedMentions allowedMentions = this.allowedMentions;
int hashCode7 = (hashCode6 + (allowedMentions != null ? allowedMentions.hashCode() : 0)) * 31;
String str3 = this.captchaKey;
if (str3 != null) {
i = str3.hashCode();
int hashCode8 = (hashCode7 + (str3 != null ? str3.hashCode() : 0)) * 31;
String str4 = this.captchaRqtoken;
if (str4 != null) {
i = str4.hashCode();
}
return hashCode7 + i;
return hashCode8 + i;
}
public String toString() {
@ -2590,7 +2614,9 @@ public final class RestAPIParams {
R.append(", allowedMentions=");
R.append(this.allowedMentions);
R.append(", captchaKey=");
return a.H(R, this.captchaKey, ")");
R.append(this.captchaKey);
R.append(", captchaRqtoken=");
return a.H(R, this.captchaRqtoken, ")");
}
}
@ -3027,13 +3053,15 @@ public final class RestAPIParams {
/* compiled from: RestAPIParams.kt */
public static final class Phone {
private final String captchaKey;
private final String captchaRqtoken;
private final String phone;
private final String source;
public Phone(String str, String str2, String str3) {
public Phone(String str, String str2, String str3, String str4) {
this.phone = str;
this.source = str2;
this.captchaKey = str3;
this.captchaRqtoken = str4;
}
}
@ -4794,27 +4822,31 @@ public final class RestAPIParams {
/* compiled from: RestAPIParams.kt */
public static final class UserRelationship {
private final String captchaKey;
private final String captchaRqtoken;
private final String friendToken;
private final Integer type;
/* compiled from: RestAPIParams.kt */
public static final class Add {
private final String captchaKey;
private final String captchaRqtoken;
private final int discriminator;
private final String username;
public Add(String str, int i, String str2) {
public Add(String str, int i, String str2, String str3) {
m.checkNotNullParameter(str, "username");
this.username = str;
this.discriminator = i;
this.captchaKey = str2;
this.captchaRqtoken = str3;
}
}
public UserRelationship(Integer num, String str, String str2) {
public UserRelationship(Integer num, String str, String str2, String str3) {
this.type = num;
this.friendToken = str;
this.captchaKey = str2;
this.captchaRqtoken = str3;
}
}

View File

@ -6,6 +6,7 @@ import com.discord.models.domain.ModelInvite;
import com.discord.models.domain.auth.ModelLoginResult;
import com.discord.restapi.RestAPIParams;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.z.d.o;
@ -15,7 +16,7 @@ import kotlin.jvm.functions.Function1;
import rx.Observable;
/* compiled from: StoreAuthentication.kt */
public final class StoreAuthentication$login$1<T, R> implements b<String, Observable<? extends ModelLoginResult>> {
public final /* synthetic */ String $captchaKey;
public final /* synthetic */ CaptchaHelper.CaptchaPayload $captchaPayload;
public final /* synthetic */ String $login;
public final /* synthetic */ String $loginSource;
public final /* synthetic */ String $password;
@ -37,15 +38,21 @@ public final class StoreAuthentication$login$1<T, R> implements b<String, Observ
}
}
public StoreAuthentication$login$1(String str, String str2, String str3, boolean z2, String str4) {
public StoreAuthentication$login$1(String str, String str2, CaptchaHelper.CaptchaPayload captchaPayload, boolean z2, String str3) {
this.$login = str;
this.$password = str2;
this.$captchaKey = str3;
this.$captchaPayload = captchaPayload;
this.$undelete = z2;
this.$loginSource = str4;
this.$loginSource = str3;
}
public final Observable<? extends ModelLoginResult> call(String str) {
return RestCallStateKt.logNetworkAction(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().postAuthLogin(new RestAPIParams.AuthLogin(this.$login, this.$password, this.$captchaKey, Boolean.valueOf(this.$undelete), this.$loginSource)), false, 1, null), AnonymousClass1.INSTANCE);
RestAPI api = RestAPI.Companion.getApi();
String str2 = this.$login;
String str3 = this.$password;
CaptchaHelper.CaptchaPayload captchaPayload = this.$captchaPayload;
String captchaKey = captchaPayload != null ? captchaPayload.getCaptchaKey() : null;
CaptchaHelper.CaptchaPayload captchaPayload2 = this.$captchaPayload;
return RestCallStateKt.logNetworkAction(ObservableExtensionsKt.restSubscribeOn$default(api.postAuthLogin(new RestAPIParams.AuthLogin(str2, str3, captchaKey, captchaPayload2 != null ? captchaPayload2.getCaptchaRqtoken() : null, Boolean.valueOf(this.$undelete), this.$loginSource)), false, 1, null), AnonymousClass1.INSTANCE);
}
}

View File

@ -9,6 +9,7 @@ import com.discord.stores.StoreInviteSettings;
import com.discord.stores.StoreStream;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.z.d.k;
@ -22,7 +23,7 @@ import rx.functions.Action1;
import rx.functions.Func2;
/* compiled from: StoreAuthentication.kt */
public final class StoreAuthentication$register$1<T, R> implements b<String, Observable<? extends RegisterResponse>> {
public final /* synthetic */ String $captchaKey;
public final /* synthetic */ CaptchaHelper.CaptchaPayload $captchaPayload;
public final /* synthetic */ boolean $consent;
public final /* synthetic */ String $dateOfBirth;
public final /* synthetic */ String $email;
@ -76,6 +77,7 @@ public final class StoreAuthentication$register$1<T, R> implements b<String, Obs
public final Observable<? extends RegisterResponse> call(StoreAuthentication.AuthRequestParams authRequestParams) {
StoreInviteSettings.InviteCode inviteCode = authRequestParams.getInviteCode();
String str = null;
String inviteCode2 = inviteCode != null ? inviteCode.getInviteCode() : null;
if (inviteCode2 == null || inviteCode2.length() == 0) {
StoreStream.Companion.getNux().setPostRegister(true);
@ -83,16 +85,21 @@ public final class StoreAuthentication$register$1<T, R> implements b<String, Obs
StoreStream.Companion.getNux().setPostRegisterWithInvite(true);
}
RestAPI api = RestAPI.Companion.getApi();
String str = this.$fingerprint;
String str2 = this.$fingerprint;
StoreAuthentication$register$1 storeAuthentication$register$1 = this.this$0;
String str2 = storeAuthentication$register$1.$username;
String str3 = storeAuthentication$register$1.$email;
String str4 = storeAuthentication$register$1.$phoneToken;
String str5 = storeAuthentication$register$1.$password;
String str6 = storeAuthentication$register$1.$captchaKey;
String str3 = storeAuthentication$register$1.$username;
String str4 = storeAuthentication$register$1.$email;
String str5 = storeAuthentication$register$1.$phoneToken;
String str6 = storeAuthentication$register$1.$password;
CaptchaHelper.CaptchaPayload captchaPayload = storeAuthentication$register$1.$captchaPayload;
String captchaKey = captchaPayload != null ? captchaPayload.getCaptchaKey() : null;
CaptchaHelper.CaptchaPayload captchaPayload2 = this.this$0.$captchaPayload;
if (captchaPayload2 != null) {
str = captchaPayload2.getCaptchaRqtoken();
}
String guildTemplateCode = authRequestParams.getGuildTemplateCode();
StoreAuthentication$register$1 storeAuthentication$register$12 = this.this$0;
return RestCallStateKt.logNetworkAction(api.postAuthRegister(new RestAPIParams.AuthRegister(str, str2, str3, str4, str5, str6, inviteCode2, guildTemplateCode, storeAuthentication$register$12.$consent, storeAuthentication$register$12.$dateOfBirth)), new AnonymousClass1(this, inviteCode2));
return RestCallStateKt.logNetworkAction(api.postAuthRegister(new RestAPIParams.AuthRegister(str2, str3, str4, str5, str6, captchaKey, str, inviteCode2, guildTemplateCode, storeAuthentication$register$12.$consent, storeAuthentication$register$12.$dateOfBirth)), new AnonymousClass1(this, inviteCode2));
}
}
@ -116,15 +123,15 @@ public final class StoreAuthentication$register$1<T, R> implements b<String, Obs
}
}
public StoreAuthentication$register$1(StoreAuthentication storeAuthentication, String str, String str2, String str3, String str4, String str5, boolean z2, String str6) {
public StoreAuthentication$register$1(StoreAuthentication storeAuthentication, String str, String str2, String str3, String str4, CaptchaHelper.CaptchaPayload captchaPayload, boolean z2, String str5) {
this.this$0 = storeAuthentication;
this.$username = str;
this.$email = str2;
this.$phoneToken = str3;
this.$password = str4;
this.$captchaKey = str5;
this.$captchaPayload = captchaPayload;
this.$consent = z2;
this.$dateOfBirth = str6;
this.$dateOfBirth = str5;
}
/* JADX WARN: Multi-variable type inference failed */

View File

@ -19,6 +19,7 @@ import com.discord.stores.StoreInviteSettings;
import com.discord.stores.StoreNavigation;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.persister.Persister;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
@ -213,15 +214,15 @@ public final class StoreAuthentication extends Store {
return t;
}
public static /* synthetic */ Observable login$default(StoreAuthentication storeAuthentication, String str, String str2, String str3, boolean z2, String str4, int i, Object obj) {
public static /* synthetic */ Observable login$default(StoreAuthentication storeAuthentication, String str, String str2, CaptchaHelper.CaptchaPayload captchaPayload, boolean z2, String str3, int i, Object obj) {
if ((i & 16) != 0) {
str4 = null;
str3 = null;
}
return storeAuthentication.login(str, str2, str3, z2, str4);
return storeAuthentication.login(str, str2, captchaPayload, z2, str3);
}
public static /* synthetic */ Observable register$default(StoreAuthentication storeAuthentication, String str, String str2, String str3, String str4, String str5, boolean z2, String str6, int i, Object obj) {
return storeAuthentication.register(str, str2, str3, str4, str5, z2, (i & 64) != 0 ? null : str6);
public static /* synthetic */ Observable register$default(StoreAuthentication storeAuthentication, String str, String str2, String str3, String str4, CaptchaHelper.CaptchaPayload captchaPayload, boolean z2, String str5, int i, Object obj) {
return storeAuthentication.register(str, str2, str3, str4, captchaPayload, z2, (i & 64) != 0 ? null : str5);
}
private final synchronized void resetIsConsentRequired() {
@ -256,9 +257,9 @@ public final class StoreAuthentication extends Store {
return RestCallStateKt.logNetworkAction(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().authorizeIP(new RestAPIParams.AuthorizeIP(str)), false, 1, null), StoreAuthentication$authorizeIP$1.INSTANCE);
}
public final Observable<Void> forgotPassword(String str, String str2) {
public final Observable<Void> forgotPassword(String str, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(str, "login");
return ObservableExtensionsKt.restSubscribeOn$default(RestCallStateKt.logNetworkAction(RestAPI.Companion.getApi().forgotPassword(new RestAPIParams.ForgotPassword(str, str2)), StoreAuthentication$forgotPassword$1.INSTANCE), false, 1, null);
return ObservableExtensionsKt.restSubscribeOn$default(RestCallStateKt.logNetworkAction(RestAPI.Companion.getApi().forgotPassword(new RestAPIParams.ForgotPassword(str, captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null)), StoreAuthentication$forgotPassword$1.INSTANCE), false, 1, null);
}
public final Observable<String> getAgeGateError() {
@ -375,11 +376,11 @@ public final class StoreAuthentication extends Store {
return bool != null ? bool.booleanValue() : true;
}
public final Observable<ModelLoginResult> login(String str, String str2, String str3, boolean z2, String str4) {
public final Observable<ModelLoginResult> login(String str, String str2, CaptchaHelper.CaptchaPayload captchaPayload, boolean z2, String str3) {
m.checkNotNullParameter(str, "login");
m.checkNotNullParameter(str2, "password");
setSavedLogin(str);
Observable<ModelLoginResult> t = getFingerprintSnapshotOrGenerate().z(new StoreAuthentication$login$1(str, str2, str3, z2, str4)).t(new StoreAuthentication$login$2(this));
Observable<ModelLoginResult> t = getFingerprintSnapshotOrGenerate().z(new StoreAuthentication$login$1(str, str2, captchaPayload, z2, str3)).t(new StoreAuthentication$login$2(this));
m.checkNotNullExpressionValue(t, "getFingerprintSnapshotOr…lt)\n }\n }");
return t;
}
@ -398,11 +399,11 @@ public final class StoreAuthentication extends Store {
return F;
}
public final Observable<RegisterResponse> register(String str, String str2, String str3, String str4, String str5, boolean z2, String str6) {
public final Observable<RegisterResponse> register(String str, String str2, String str3, String str4, CaptchaHelper.CaptchaPayload captchaPayload, boolean z2, String str5) {
m.checkNotNullParameter(str, "username");
m.checkNotNullParameter(str4, "password");
setSavedLogin(str2);
Observable<R> z3 = getFingerprintSnapshotOrGenerate().z(new StoreAuthentication$register$1(this, str, str2, str3, str4, str5, z2, str6));
Observable<R> z3 = getFingerprintSnapshotOrGenerate().z(new StoreAuthentication$register$1(this, str, str2, str3, str4, captchaPayload, z2, str5));
m.checkNotNullExpressionValue(z3, "getFingerprintSnapshotOr… }\n }");
return z3;
}

View File

@ -284,7 +284,7 @@ public final class StoreLurking {
if (guild == null || isLurking$app_productionBetaRelease(guild)) {
this.lurkedGuilds.put(Long.valueOf(j), new LurkContext(j, z2));
this.lurkedGuildsSubject.onNext(this.lurkedGuilds);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPIInterface.DefaultImpls.joinGuild$default(RestAPI.Companion.getApi(), j, true, this.sessionId, null, new RestAPIParams.InviteCode(null), null, 32, null), false, 1, null)), StoreLurking.class, context, (Function1) null, new StoreLurking$startLurkingInternal$3(this, j), (Function0) null, (Function0) null, new StoreLurking$startLurkingInternal$4(this, j, function3, l), 52, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPIInterface.DefaultImpls.joinGuild$default(RestAPI.Companion.getApi(), j, true, this.sessionId, null, new RestAPIParams.InviteCode(null, null), null, 32, null), false, 1, null)), StoreLurking.class, context, (Function1) null, new StoreLurking$startLurkingInternal$3(this, j), (Function0) null, (Function0) null, new StoreLurking$startLurkingInternal$4(this, j, function3, l), 52, (Object) null);
return;
}
function3.invoke(guild, l, Boolean.TRUE);

View File

@ -1,18 +0,0 @@
package com.discord.stores;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: StoreMessageAck.kt */
public final class StoreMessageAck$ackGuild$1 extends o implements Function0<Unit> {
public static final StoreMessageAck$ackGuild$1 INSTANCE = new StoreMessageAck$ackGuild$1();
public StoreMessageAck$ackGuild$1() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
}
}

View File

@ -1,28 +0,0 @@
package com.discord.stores;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreMessageAck.kt */
public final class StoreMessageAck$ackGuild$2 extends o implements Function1<Void, Unit> {
public final /* synthetic */ Function0 $onSuccess;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreMessageAck$ackGuild$2(Function0 function0) {
super(1);
this.$onSuccess = function0;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Void r1) {
invoke(r1);
return Unit.a;
}
public final void invoke(Void r1) {
this.$onSuccess.mo1invoke();
}
}

View File

@ -38,7 +38,6 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
@ -374,15 +373,6 @@ public final class StoreMessageAck extends StoreV2 {
storeMessageAck.ack(j, z2, z3);
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.stores.StoreMessageAck */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ void ackGuild$default(StoreMessageAck storeMessageAck, Context context, long j, Function0 function0, int i, Object obj) {
if ((i & 4) != 0) {
function0 = StoreMessageAck$ackGuild$1.INSTANCE;
}
storeMessageAck.ackGuild(context, j, function0);
}
private final Observable<PendingAck> getPendingAck(Observable<Long> observable, boolean z2, boolean z3) {
Observable<R> Y = observable.Y(new StoreMessageAck$getPendingAck$2(this, z2, new StoreMessageAck$getPendingAck$1(z3)));
m.checkNotNullExpressionValue(Y, "switchMap { channelId ->…gAck.EMPTY)\n }\n }");
@ -489,11 +479,6 @@ public final class StoreMessageAck extends StoreV2 {
this.dispatcher.schedule(new StoreMessageAck$ack$1(this, j, z2, z3));
}
public final void ackGuild(Context context, long j, Function0<Unit> function0) {
m.checkNotNullParameter(function0, "onSuccess");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.ackGuild(j), false, 1, null), context, "REST: ackGuild", (Function1) null, new StoreMessageAck$ackGuild$2(function0), (Function1) null, (Function0) null, (Function0) null, 116, (Object) null);
}
public final Map<Long, Ack> getAll() {
return this.acksSnapshot;
}

View File

@ -24,6 +24,7 @@ import com.discord.models.message.Message;
import com.discord.models.user.CoreUser;
import com.discord.stores.StoreMessagesLoader;
import com.discord.utilities.attachments.AttachmentUtilsKt;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.logging.Logger;
import com.discord.utilities.message.LocalMessageCreatorsKt;
import com.discord.utilities.messagesend.MessageQueue;
@ -289,18 +290,18 @@ public final class StoreMessages extends Store {
ObservableExtensionsKt.appSubscribe$default(h02, StoreMessages.class, (Context) null, (Function1) null, (Function1) null, new StoreMessages$resendAllLocalMessages$1(this), (Function0) null, StoreMessages$resendAllLocalMessages$2.INSTANCE, 46, (Object) null);
}
public static /* synthetic */ Observable resendMessage$default(StoreMessages storeMessages, Message message, boolean z2, String str, int i, Object obj) {
public static /* synthetic */ Observable resendMessage$default(StoreMessages storeMessages, Message message, boolean z2, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
if ((i & 2) != 0) {
z2 = false;
}
if ((i & 4) != 0) {
str = null;
captchaPayload = null;
}
return storeMessages.resendMessage(message, z2, str);
return storeMessages.resendMessage(message, z2, captchaPayload);
}
public static /* synthetic */ Observable sendMessage$default(StoreMessages storeMessages, long j, com.discord.models.user.User user, String str, List list, List list2, List list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, Application application, Activity activity, MessageActivity messageActivity, Long l, Long l2, Integer num, String str2, int i, Object obj) {
return storeMessages.sendMessage(j, user, str, list, list2, (i & 32) != 0 ? null : list3, (i & 64) != 0 ? null : messageReference, (i & 128) != 0 ? null : messageAllowedMentions, (i & 256) != 0 ? null : application, (i & 512) != 0 ? null : activity, (i & 1024) != 0 ? null : messageActivity, (i & 2048) != 0 ? null : l, (i & 4096) != 0 ? null : l2, (i & 8192) != 0 ? null : num, (i & 16384) != 0 ? null : str2);
public static /* synthetic */ Observable sendMessage$default(StoreMessages storeMessages, long j, com.discord.models.user.User user, String str, List list, List list2, List list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, Application application, Activity activity, MessageActivity messageActivity, Long l, Long l2, Integer num, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
return storeMessages.sendMessage(j, user, str, list, list2, (i & 32) != 0 ? null : list3, (i & 64) != 0 ? null : messageReference, (i & 128) != 0 ? null : messageAllowedMentions, (i & 256) != 0 ? null : application, (i & 512) != 0 ? null : activity, (i & 1024) != 0 ? null : messageActivity, (i & 2048) != 0 ? null : l, (i & 4096) != 0 ? null : l2, (i & 8192) != 0 ? null : num, (i & 16384) != 0 ? null : captchaPayload);
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.stores.StoreMessages */
@ -633,7 +634,7 @@ public final class StoreMessages extends Store {
return q;
}
public final Observable<MessageResult> resendMessage(Message message, boolean z2, String str) {
public final Observable<MessageResult> resendMessage(Message message, boolean z2, CaptchaHelper.CaptchaPayload captchaPayload) {
ArrayList arrayList;
ArrayList arrayList2;
Integer type;
@ -673,28 +674,28 @@ public final class StoreMessages extends Store {
} else {
arrayList2 = null;
}
return sendMessage$default(this, channelId, coreUser, content, arrayList, arrayList2, null, message.getMessageReference(), message.getAllowedMentions(), null, null, null, z2 ? message.getLastManualAttemptTimestamp() : null, message.getInitialAttemptTimestamp(), Integer.valueOf(intValue + 1), str, 1824, null);
return sendMessage$default(this, channelId, coreUser, content, arrayList, arrayList2, null, message.getMessageReference(), message.getAllowedMentions(), null, null, null, z2 ? message.getLastManualAttemptTimestamp() : null, message.getInitialAttemptTimestamp(), Integer.valueOf(intValue + 1), captchaPayload, 1824, null);
}
throw new IllegalArgumentException("Incorrect " + z2 + " auto attempt and message type " + message.getType());
}
public final void resendMessageWithCaptcha(long j, String str, String str2) {
public final void resendMessageWithCaptcha(long j, String str, CaptchaHelper.CaptchaPayload captchaPayload) {
Message message;
m.checkNotNullParameter(str2, "captchaKey");
m.checkNotNullParameter(captchaPayload, "captchaPayload");
if (str != null && (message = this.localMessagesHolder.getMessage(j, str)) != null) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(resendMessage(message, true, str2)), StoreMessages.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, StoreMessages$resendMessageWithCaptcha$1.INSTANCE, 62, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(resendMessage(message, true, captchaPayload)), StoreMessages.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, StoreMessages$resendMessageWithCaptcha$1.INSTANCE, 62, (Object) null);
}
}
/* JADX DEBUG: Multi-variable search result rejected for r29v0, resolved type: java.util.List<? extends com.lytefast.flexinput.model.Attachment<?>> */
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARNING: Unknown variable types count: 1 */
public final Observable<MessageResult> sendMessage(long j, com.discord.models.user.User user, String str, List<? extends com.discord.models.user.User> list, List<? extends Attachment<?>> list2, List<? extends BaseSticker> list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, Application application, Activity activity, MessageActivity messageActivity, Long l, Long l2, Integer num, String str2) {
public final Observable<MessageResult> sendMessage(long j, com.discord.models.user.User user, String str, List<? extends com.discord.models.user.User> list, List<? extends Attachment<?>> list2, List<? extends BaseSticker> list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, Application application, Activity activity, MessageActivity messageActivity, Long l, Long l2, Integer num, CaptchaHelper.CaptchaPayload captchaPayload) {
List list4;
ArrayList arrayList;
String str3 = str;
String str2 = str;
m.checkNotNullParameter(user, "author");
m.checkNotNullParameter(str3, "content");
m.checkNotNullParameter(str2, "content");
Ref$ObjectRef ref$ObjectRef = new Ref$ObjectRef();
ref$ObjectRef.element = list2;
int i = 0;
@ -704,7 +705,7 @@ public final class StoreMessages extends Store {
if (context == null) {
m.throwUninitializedPropertyAccessException("context");
}
ProcessedMessageContent fromAttachments = companion.fromAttachments(list2, str3, context);
ProcessedMessageContent fromAttachments = companion.fromAttachments(list2, str2, context);
List<Attachment<?>> invalidAttachments = fromAttachments.getInvalidAttachments();
if (!invalidAttachments.isEmpty()) {
User synthesizeApiUser = UserUtils.INSTANCE.synthesizeApiUser(user);
@ -717,10 +718,10 @@ public final class StoreMessages extends Store {
this.dispatcher.schedule(new StoreMessages$sendMessage$1(this, LocalMessageCreatorsKt.createInvalidAttachmentsMessage(j, synthesizeApiUser, clock, arrayList2)));
}
ref$ObjectRef.element = fromAttachments.getValidAttachments();
str3 = fromAttachments.getContent();
str2 = fromAttachments.getContent();
List list5 = ref$ObjectRef.element;
if (list5 == null || list5.isEmpty()) {
if (str3.length() == 0) {
if (str2.length() == 0) {
Observable<MessageResult> n = Observable.n(StoreMessages$sendMessage$2.INSTANCE, Emitter.BackpressureMode.ERROR);
m.checkNotNullExpressionValue(n, "Observable.create({ emit…r.BackpressureMode.ERROR)");
return n;
@ -755,7 +756,7 @@ public final class StoreMessages extends Store {
if (num != null) {
i = num.intValue();
}
Message createLocalMessage = LocalMessageCreatorsKt.createLocalMessage(str3, j, synthesizeApiUser2, list4, false, z2, application, messageActivity, clock2, arrayList, valueOf, valueOf2, Integer.valueOf(i), list3, messageReference, messageAllowedMentions, str2);
Message createLocalMessage = LocalMessageCreatorsKt.createLocalMessage(str2, j, synthesizeApiUser2, list4, false, z2, application, messageActivity, clock2, arrayList, valueOf, valueOf2, Integer.valueOf(i), list3, messageReference, messageAllowedMentions, captchaPayload);
if (messageActivity == null) {
this.dispatcher.schedule(new StoreMessages$sendMessage$3(this, createLocalMessage));
}

View File

@ -0,0 +1,27 @@
package com.discord.stores;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: StoreUserSettingsSystem.kt */
public final class StoreUserSettingsSystem$setTheme$1 extends o implements Function0<Unit> {
public final /* synthetic */ boolean $apiSync;
public final /* synthetic */ Function0 $onRequestApiSync;
public final /* synthetic */ String $theme;
public final /* synthetic */ StoreUserSettingsSystem this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreUserSettingsSystem$setTheme$1(StoreUserSettingsSystem storeUserSettingsSystem, String str, boolean z2, Function0 function0) {
super(0);
this.this$0 = storeUserSettingsSystem;
this.$theme = str;
this.$apiSync = z2;
this.$onRequestApiSync = function0;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreUserSettingsSystem.access$setThemeInternal(this.this$0, this.$theme, this.$apiSync, this.$onRequestApiSync);
}
}

View File

@ -158,6 +158,10 @@ public final class StoreUserSettingsSystem extends StoreV2 {
storeUserSettingsSystem.settings = settings;
}
public static final /* synthetic */ void access$setThemeInternal(StoreUserSettingsSystem storeUserSettingsSystem, String str, boolean z2, Function0 function0) {
storeUserSettingsSystem.setThemeInternal(str, z2, function0);
}
@StoreThread
private final void handleUserSettings(ModelUserSettings modelUserSettings) {
handleUserSettingsThemeUpdate(modelUserSettings.getTheme());
@ -173,7 +177,7 @@ public final class StoreUserSettingsSystem extends StoreV2 {
@StoreThread
private final void handleUserSettingsThemeUpdate(String str) {
if (str != null && getIsThemeSyncEnabled()) {
setTheme$default(this, str, false, null, 4, null);
setThemeInternal$default(this, str, false, null, 4, null);
}
}
@ -195,6 +199,36 @@ public final class StoreUserSettingsSystem extends StoreV2 {
storeUserSettingsSystem.setTheme(str, z2, function0);
}
@StoreThread
private final void setThemeInternal(String str, boolean z2, Function0<Unit> function0) {
if (!getIsThemeSyncEnabled() || !z2 || !(function0 == null || function0.mo1invoke() == null)) {
if (m.areEqual(getTheme(), ModelUserSettings.THEME_PURE_EVIL) && m.areEqual(str, ModelUserSettings.THEME_DARK)) {
str = ModelUserSettings.THEME_PURE_EVIL;
}
Settings settings = this.settings;
if (settings == null) {
m.throwUninitializedPropertyAccessException("settings");
}
this.settings = Settings.copy$default(settings, str, null, 0, 6, null);
SharedPreferences.Editor edit = getPrefsSessionDurable().edit();
m.checkNotNullExpressionValue(edit, "editor");
edit.putString("CACHE_KEY_THEME", str);
edit.apply();
markChanged();
return;
}
throw new IllegalArgumentException("API callback required.");
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.stores.StoreUserSettingsSystem */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ void setThemeInternal$default(StoreUserSettingsSystem storeUserSettingsSystem, String str, boolean z2, Function0 function0, int i, Object obj) {
if ((i & 4) != 0) {
function0 = null;
}
storeUserSettingsSystem.setThemeInternal(str, z2, function0);
}
public final int getFontScale() {
Settings settings = this.settings;
if (settings == null) {
@ -323,22 +357,6 @@ public final class StoreUserSettingsSystem extends StoreV2 {
public final void setTheme(String str, boolean z2, Function0<Unit> function0) {
m.checkNotNullParameter(str, "theme");
if (!getIsThemeSyncEnabled() || !z2 || !(function0 == null || function0.mo1invoke() == null)) {
if (m.areEqual(getTheme(), ModelUserSettings.THEME_PURE_EVIL) && m.areEqual(str, ModelUserSettings.THEME_DARK)) {
str = ModelUserSettings.THEME_PURE_EVIL;
}
Settings settings = this.settings;
if (settings == null) {
m.throwUninitializedPropertyAccessException("settings");
}
this.settings = Settings.copy$default(settings, str, null, 0, 6, null);
SharedPreferences.Editor edit = getPrefsSessionDurable().edit();
m.checkNotNullExpressionValue(edit, "editor");
edit.putString("CACHE_KEY_THEME", str);
edit.apply();
markChanged();
return;
}
throw new IllegalArgumentException("API callback required.");
this.dispatcher.schedule(new StoreUserSettingsSystem$setTheme$1(this, str, z2, function0));
}
}

View File

@ -15,6 +15,8 @@ import kotlin.jvm.internal.DefaultConstructorMarker;
public final class CaptchaErrorBody implements Serializable {
public static final Companion Companion = new Companion(null);
private final List<String> captchaKey;
private final String captchaRqdata;
private final String captchaRqtoken;
private final CaptchaService captchaService;
private final String captchaSitekey;
@ -56,15 +58,17 @@ public final class CaptchaErrorBody implements Serializable {
}
}
public CaptchaErrorBody(List<String> list, String str, CaptchaService captchaService) {
public CaptchaErrorBody(List<String> list, String str, CaptchaService captchaService, String str2, String str3) {
this.captchaKey = list;
this.captchaSitekey = str;
this.captchaService = captchaService;
this.captchaRqdata = str2;
this.captchaRqtoken = str3;
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.utilities.captcha.CaptchaErrorBody */
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: com.discord.utilities.captcha.CaptchaErrorBody */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ CaptchaErrorBody copy$default(CaptchaErrorBody captchaErrorBody, List list, String str, CaptchaService captchaService, int i, Object obj) {
public static /* synthetic */ CaptchaErrorBody copy$default(CaptchaErrorBody captchaErrorBody, List list, String str, CaptchaService captchaService, String str2, String str3, int i, Object obj) {
if ((i & 1) != 0) {
list = captchaErrorBody.captchaKey;
}
@ -74,7 +78,13 @@ public final class CaptchaErrorBody implements Serializable {
if ((i & 4) != 0) {
captchaService = captchaErrorBody.captchaService;
}
return captchaErrorBody.copy(list, str, captchaService);
if ((i & 8) != 0) {
str2 = captchaErrorBody.captchaRqdata;
}
if ((i & 16) != 0) {
str3 = captchaErrorBody.captchaRqtoken;
}
return captchaErrorBody.copy(list, str, captchaService, str2, str3);
}
public final List<String> component1() {
@ -89,8 +99,16 @@ public final class CaptchaErrorBody implements Serializable {
return this.captchaService;
}
public final CaptchaErrorBody copy(List<String> list, String str, CaptchaService captchaService) {
return new CaptchaErrorBody(list, str, captchaService);
public final String component4() {
return this.captchaRqdata;
}
public final String component5() {
return this.captchaRqtoken;
}
public final CaptchaErrorBody copy(List<String> list, String str, CaptchaService captchaService, String str2, String str3) {
return new CaptchaErrorBody(list, str, captchaService, str2, str3);
}
@Override // java.lang.Object
@ -102,13 +120,21 @@ public final class CaptchaErrorBody implements Serializable {
return false;
}
CaptchaErrorBody captchaErrorBody = (CaptchaErrorBody) obj;
return m.areEqual(this.captchaKey, captchaErrorBody.captchaKey) && m.areEqual(this.captchaSitekey, captchaErrorBody.captchaSitekey) && m.areEqual(this.captchaService, captchaErrorBody.captchaService);
return m.areEqual(this.captchaKey, captchaErrorBody.captchaKey) && m.areEqual(this.captchaSitekey, captchaErrorBody.captchaSitekey) && m.areEqual(this.captchaService, captchaErrorBody.captchaService) && m.areEqual(this.captchaRqdata, captchaErrorBody.captchaRqdata) && m.areEqual(this.captchaRqtoken, captchaErrorBody.captchaRqtoken);
}
public final List<String> getCaptchaKey() {
return this.captchaKey;
}
public final String getCaptchaRqdata() {
return this.captchaRqdata;
}
public final String getCaptchaRqtoken() {
return this.captchaRqtoken;
}
public final CaptchaService getCaptchaService() {
return this.captchaService;
}
@ -125,10 +151,14 @@ public final class CaptchaErrorBody implements Serializable {
String str = this.captchaSitekey;
int hashCode2 = (hashCode + (str != null ? str.hashCode() : 0)) * 31;
CaptchaService captchaService = this.captchaService;
if (captchaService != null) {
i = captchaService.hashCode();
int hashCode3 = (hashCode2 + (captchaService != null ? captchaService.hashCode() : 0)) * 31;
String str2 = this.captchaRqdata;
int hashCode4 = (hashCode3 + (str2 != null ? str2.hashCode() : 0)) * 31;
String str3 = this.captchaRqtoken;
if (str3 != null) {
i = str3.hashCode();
}
return hashCode2 + i;
return hashCode4 + i;
}
@Override // java.lang.Object
@ -139,7 +169,9 @@ public final class CaptchaErrorBody implements Serializable {
R.append(this.captchaSitekey);
R.append(", captchaService=");
R.append(this.captchaService);
R.append(")");
return R.toString();
R.append(", captchaRqdata=");
R.append(this.captchaRqdata);
R.append(", captchaRqtoken=");
return a.H(R, this.captchaRqtoken, ")");
}
}

View File

@ -147,6 +147,9 @@ public final class CaptchaHelper$tryShowCaptcha$1<T> implements Action1<Emitter<
builder.a = siteKey;
builder.n = StoreStream.Companion.getUserSettingsSystem().getLocale();
builder.m = true;
if (((CaptchaHelper.CaptchaRequest.HCaptcha) this.$captchaRequest).getRqdata() != null) {
builder.f = ((CaptchaHelper.CaptchaRequest.HCaptcha) this.$captchaRequest).getRqdata();
}
Boolean bool = builder.c;
if (!builder.f3115b) {
bool = HCaptchaConfig.access$000();

View File

@ -39,33 +39,121 @@ public final class CaptchaHelper {
private static final String FAILED_MISSING_DEPS = "missing_dependencies";
public static final CaptchaHelper INSTANCE = new CaptchaHelper();
private static final String RECAPTCHA_SITE_KEY = "6Lff5jIUAAAAAImNXvYYPv2VW2En3Dexy4oX2o4s";
private static String captchaRqtoken;
private static String captchaToken;
/* compiled from: CaptchaHelper.kt */
public static final class CaptchaPayload {
private final String captchaKey;
private final String captchaRqtoken;
public CaptchaPayload(String str, String str2) {
m.checkNotNullParameter(str, "captchaKey");
this.captchaKey = str;
this.captchaRqtoken = str2;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ CaptchaPayload(String str, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? null : str2);
}
public static /* synthetic */ CaptchaPayload copy$default(CaptchaPayload captchaPayload, String str, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str = captchaPayload.captchaKey;
}
if ((i & 2) != 0) {
str2 = captchaPayload.captchaRqtoken;
}
return captchaPayload.copy(str, str2);
}
public final String component1() {
return this.captchaKey;
}
public final String component2() {
return this.captchaRqtoken;
}
public final CaptchaPayload copy(String str, String str2) {
m.checkNotNullParameter(str, "captchaKey");
return new CaptchaPayload(str, str2);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof CaptchaPayload)) {
return false;
}
CaptchaPayload captchaPayload = (CaptchaPayload) obj;
return m.areEqual(this.captchaKey, captchaPayload.captchaKey) && m.areEqual(this.captchaRqtoken, captchaPayload.captchaRqtoken);
}
public final String getCaptchaKey() {
return this.captchaKey;
}
public final String getCaptchaRqtoken() {
return this.captchaRqtoken;
}
public int hashCode() {
String str = this.captchaKey;
int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
String str2 = this.captchaRqtoken;
if (str2 != null) {
i = str2.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder R = a.R("CaptchaPayload(captchaKey=");
R.append(this.captchaKey);
R.append(", captchaRqtoken=");
return a.H(R, this.captchaRqtoken, ")");
}
}
/* compiled from: CaptchaHelper.kt */
public static abstract class CaptchaRequest {
/* compiled from: CaptchaHelper.kt */
public static final class HCaptcha extends CaptchaRequest {
private final Activity activity;
private final String rqdata;
private final String siteKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public HCaptcha(String str, Activity activity) {
public HCaptcha(String str, Activity activity, String str2) {
super(null);
m.checkNotNullParameter(str, "siteKey");
m.checkNotNullParameter(activity, ActivityChooserModel.ATTRIBUTE_ACTIVITY);
this.siteKey = str;
this.activity = activity;
this.rqdata = str2;
}
public static /* synthetic */ HCaptcha copy$default(HCaptcha hCaptcha, String str, Activity activity, int i, Object obj) {
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ HCaptcha(String str, Activity activity, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, activity, (i & 4) != 0 ? null : str2);
}
public static /* synthetic */ HCaptcha copy$default(HCaptcha hCaptcha, String str, Activity activity, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str = hCaptcha.siteKey;
}
if ((i & 2) != 0) {
activity = hCaptcha.activity;
}
return hCaptcha.copy(str, activity);
if ((i & 4) != 0) {
str2 = hCaptcha.rqdata;
}
return hCaptcha.copy(str, activity, str2);
}
public final String component1() {
@ -76,10 +164,14 @@ public final class CaptchaHelper {
return this.activity;
}
public final HCaptcha copy(String str, Activity activity) {
public final String component3() {
return this.rqdata;
}
public final HCaptcha copy(String str, Activity activity, String str2) {
m.checkNotNullParameter(str, "siteKey");
m.checkNotNullParameter(activity, ActivityChooserModel.ATTRIBUTE_ACTIVITY);
return new HCaptcha(str, activity);
return new HCaptcha(str, activity, str2);
}
public boolean equals(Object obj) {
@ -90,13 +182,17 @@ public final class CaptchaHelper {
return false;
}
HCaptcha hCaptcha = (HCaptcha) obj;
return m.areEqual(this.siteKey, hCaptcha.siteKey) && m.areEqual(this.activity, hCaptcha.activity);
return m.areEqual(this.siteKey, hCaptcha.siteKey) && m.areEqual(this.activity, hCaptcha.activity) && m.areEqual(this.rqdata, hCaptcha.rqdata);
}
public final Activity getActivity() {
return this.activity;
}
public final String getRqdata() {
return this.rqdata;
}
public final String getSiteKey() {
return this.siteKey;
}
@ -106,10 +202,12 @@ public final class CaptchaHelper {
int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
Activity activity = this.activity;
if (activity != null) {
i = activity.hashCode();
int hashCode2 = (hashCode + (activity != null ? activity.hashCode() : 0)) * 31;
String str2 = this.rqdata;
if (str2 != null) {
i = str2.hashCode();
}
return hashCode + i;
return hashCode2 + i;
}
public String toString() {
@ -117,8 +215,8 @@ public final class CaptchaHelper {
R.append(this.siteKey);
R.append(", activity=");
R.append(this.activity);
R.append(")");
return R.toString();
R.append(", rqdata=");
return a.H(R, this.rqdata, ")");
}
}
@ -314,10 +412,18 @@ public final class CaptchaHelper {
captchaHelper.showCaptchaHelpDialog(appActivity, function0);
}
public final String getCaptchaRqtoken() {
return captchaRqtoken;
}
public final String getCaptchaToken() {
return captchaToken;
}
public final void setCaptchaRqtoken(String str) {
captchaRqtoken = str;
}
public final void setCaptchaToken(String str) {
captchaToken = str;
}

View File

@ -1,6 +1,7 @@
package com.discord.utilities.guilds;
import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.widgets.guilds.invite.InviteJoinHelper;
import com.discord.widgets.guilds.join.InviteArgs;
import d0.z.d.m;
@ -8,7 +9,7 @@ import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function2;
/* compiled from: GuildCaptchaUtils.kt */
public final class GuildCaptchaUtilsKt$handleHttpException$1 extends o implements Function2<AppFragment, String, Unit> {
public final class GuildCaptchaUtilsKt$handleHttpException$1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ InviteArgs $args;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -20,14 +21,14 @@ public final class GuildCaptchaUtilsKt$handleHttpException$1 extends o implement
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, str);
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(appFragment, captchaPayload);
return Unit.a;
}
public final void invoke(AppFragment appFragment, String str) {
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(appFragment, "newFragment");
m.checkNotNullParameter(str, "captchaToken");
InviteJoinHelper.INSTANCE.joinViaInvite(this.$args.getInvite(), this.$args.getJavaClass(), appFragment, this.$args.getLocation(), this.$args.getOnInvitePostError(), this.$args.getOnInvitePostSuccess(), this.$args.getOnInviteFlowFinished(), str);
m.checkNotNullParameter(captchaPayload, "captchaPayload");
InviteJoinHelper.INSTANCE.joinViaInvite(this.$args.getInvite(), this.$args.getJavaClass(), appFragment, this.$args.getLocation(), this.$args.getOnInvitePostError(), this.$args.getOnInvitePostSuccess(), this.$args.getOnInviteFlowFinished(), captchaPayload);
}
}

View File

@ -2,6 +2,7 @@ package com.discord.utilities.guilds;
import android.content.Context;
import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.widgets.guilds.join.GuildJoinHelperKt;
import com.discord.widgets.guilds.join.JoinArgs;
import d0.z.d.m;
@ -9,7 +10,7 @@ import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function2;
/* compiled from: GuildCaptchaUtils.kt */
public final class GuildCaptchaUtilsKt$handleHttpException$2 extends o implements Function2<AppFragment, String, Unit> {
public final class GuildCaptchaUtilsKt$handleHttpException$2 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ JoinArgs $args;
public final /* synthetic */ Context $context;
@ -23,14 +24,14 @@ public final class GuildCaptchaUtilsKt$handleHttpException$2 extends o implement
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, str);
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(appFragment, captchaPayload);
return Unit.a;
}
public final void invoke(AppFragment appFragment, String str) {
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(str, "captchaToken");
GuildJoinHelperKt.joinGuild$default(this.$context, this.$args.getGuildId(), this.$args.isLurker(), this.$args.getSessionId(), this.$args.getDirectoryChannelId(), null, this.$args.getErrorClass(), this.$args.getSubscriptionHandler(), this.$args.getErrorHandler(), str, this.$args.getOnNext(), 32, null);
m.checkNotNullParameter(captchaPayload, "captchaPayload");
GuildJoinHelperKt.joinGuild$default(this.$context, this.$args.getGuildId(), this.$args.isLurker(), this.$args.getSessionId(), this.$args.getDirectoryChannelId(), null, this.$args.getErrorClass(), this.$args.getSubscriptionHandler(), this.$args.getErrorHandler(), captchaPayload, this.$args.getOnNext(), 32, null);
}
}

View File

@ -4,8 +4,11 @@ public final class GuildConstantsKt {
public static final int FILE_SIZE_STANDARD_8MB = 8;
public static final int GLOBAL_SEARCH_LARGE_GUILD_THRESHOLD = 200;
public static final int GUILD_TIER_1_BOOSTS = 2;
public static final int GUILD_TIER_1_BOOSTS_EXP = 2;
public static final int GUILD_TIER_2_BOOSTS = 7;
public static final int GUILD_TIER_2_BOOSTS_EXP = 5;
public static final int GUILD_TIER_3_BOOSTS = 14;
public static final int GUILD_TIER_3_BOOSTS_EXP = 7;
public static final int INVITE_LARGE_GUILD_THRESHOLD = 200;
public static final int MAX_GUILD_MEMBERS_NOTIFY_ALL_MESSAGES = 2500;
public static final int PREMIUM_TIER_1_FILE_SIZE_50MB = 50;

View File

@ -1,34 +1,35 @@
package com.discord.utilities.guilds;
import com.discord.api.guild.GuildVerificationLevel;
import com.discord.api.role.GuildRole;
import com.discord.models.guild.Guild;
import com.discord.models.member.GuildMember;
import com.discord.models.user.MeUser;
import com.discord.utilities.time.Clock;
import d0.z.d.m;
import java.util.Map;
import rx.functions.Func5;
import rx.functions.Func6;
/* compiled from: GuildVerificationLevelUtils.kt */
public final class GuildVerificationLevelUtils$observeVerificationLevelTriggered$1<T1, T2, T3, T4, T5, R> implements Func5<Long, Guild, GuildVerificationLevel, Map<Long, ? extends GuildMember>, MeUser, GuildVerificationLevel> {
public final class GuildVerificationLevelUtils$observeVerificationLevelTriggered$1<T1, T2, T3, T4, T5, T6, R> implements Func6<Long, Guild, GuildVerificationLevel, Map<Long, ? extends GuildMember>, MeUser, Map<Long, ? extends GuildRole>, GuildVerificationLevel> {
public final /* synthetic */ Clock $clock;
public GuildVerificationLevelUtils$observeVerificationLevelTriggered$1(Clock clock) {
this.$clock = clock;
}
public final GuildVerificationLevel call(Long l, Guild guild, GuildVerificationLevel guildVerificationLevel, Map<Long, GuildMember> map, MeUser meUser) {
public final GuildVerificationLevel call(Long l, Guild guild, GuildVerificationLevel guildVerificationLevel, Map<Long, GuildMember> map, MeUser meUser, Map<Long, GuildRole> map2) {
GuildVerificationLevelUtils guildVerificationLevelUtils = GuildVerificationLevelUtils.INSTANCE;
m.checkNotNullExpressionValue(meUser, "me");
m.checkNotNullExpressionValue(map, "members");
m.checkNotNullExpressionValue(guildVerificationLevel, "verificationLevel");
m.checkNotNullExpressionValue(l, "joinedAt");
return GuildVerificationLevelUtils.access$computeVerificationLevelTriggered(guildVerificationLevelUtils, meUser, guild, map.get(Long.valueOf(meUser.getId())), guildVerificationLevel, l.longValue(), this.$clock);
return GuildVerificationLevelUtils.access$computeVerificationLevelTriggered(guildVerificationLevelUtils, meUser, guild, map.get(Long.valueOf(meUser.getId())), guildVerificationLevel, l.longValue(), this.$clock, map2);
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object] */
@Override // rx.functions.Func5
public /* bridge */ /* synthetic */ GuildVerificationLevel call(Long l, Guild guild, GuildVerificationLevel guildVerificationLevel, Map<Long, ? extends GuildMember> map, MeUser meUser) {
return call(l, guild, guildVerificationLevel, (Map<Long, GuildMember>) map, meUser);
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object] */
@Override // rx.functions.Func6
public /* bridge */ /* synthetic */ GuildVerificationLevel call(Long l, Guild guild, GuildVerificationLevel guildVerificationLevel, Map<Long, ? extends GuildMember> map, MeUser meUser, Map<Long, ? extends GuildRole> map2) {
return call(l, guild, guildVerificationLevel, (Map<Long, GuildMember>) map, meUser, (Map<Long, GuildRole>) map2);
}
}

View File

@ -1,6 +1,7 @@
package com.discord.utilities.guilds;
import com.discord.api.guild.GuildVerificationLevel;
import com.discord.api.role.GuildRole;
import com.discord.models.guild.Guild;
import com.discord.models.member.GuildMember;
import com.discord.models.user.MeUser;
@ -14,6 +15,7 @@ import com.discord.utilities.time.ClockFactory;
import com.discord.utilities.user.UserUtils;
import d0.z.d.m;
import j0.l.a.r;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@ -25,16 +27,25 @@ public final class GuildVerificationLevelUtils {
private GuildVerificationLevelUtils() {
}
public static final /* synthetic */ GuildVerificationLevel access$computeVerificationLevelTriggered(GuildVerificationLevelUtils guildVerificationLevelUtils, MeUser meUser, Guild guild, GuildMember guildMember, GuildVerificationLevel guildVerificationLevel, long j, Clock clock) {
return guildVerificationLevelUtils.computeVerificationLevelTriggered(meUser, guild, guildMember, guildVerificationLevel, j, clock);
public static final /* synthetic */ GuildVerificationLevel access$computeVerificationLevelTriggered(GuildVerificationLevelUtils guildVerificationLevelUtils, MeUser meUser, Guild guild, GuildMember guildMember, GuildVerificationLevel guildVerificationLevel, long j, Clock clock, Map map) {
return guildVerificationLevelUtils.computeVerificationLevelTriggered(meUser, guild, guildMember, guildVerificationLevel, j, clock, map);
}
private final GuildVerificationLevel computeVerificationLevelTriggered(MeUser meUser, Guild guild, GuildMember guildMember, GuildVerificationLevel guildVerificationLevel, long j, Clock clock) {
private final GuildVerificationLevel computeVerificationLevelTriggered(MeUser meUser, Guild guild, GuildMember guildMember, GuildVerificationLevel guildVerificationLevel, long j, Clock clock, Map<Long, GuildRole> map) {
List<Long> roles;
GuildRole guildRole;
boolean z2 = false;
boolean z3 = guild != null && guild.isOwner(meUser.getId());
if (!(guildMember == null || (roles = guildMember.getRoles()) == null || !(!roles.isEmpty()))) {
z2 = true;
if (!(guildMember == null || (roles = guildMember.getRoles()) == null)) {
ArrayList arrayList = new ArrayList();
for (Object obj : roles) {
if (!((map == null || (guildRole = map.get(Long.valueOf(((Number) obj).longValue()))) == null) ? true : guildRole.e())) {
arrayList.add(obj);
}
}
if (!arrayList.isEmpty()) {
z2 = true;
}
}
UserUtils userUtils = UserUtils.INSTANCE;
boolean hasPhone = userUtils.getHasPhone(meUser);
@ -92,11 +103,12 @@ public final class GuildVerificationLevelUtils {
Guild guild = storeGuilds.getGuild(j);
Map<Long, GuildMember> map = storeGuilds.getMembers().get(Long.valueOf(j));
MeUser me2 = storeUser.getMe();
Map<Long, GuildRole> map2 = storeGuilds.getRoles().get(Long.valueOf(j));
GuildMember guildMember = map != null ? map.get(Long.valueOf(me2.getId())) : null;
if (guild == null || (guildVerificationLevel = guild.getVerificationLevel()) == null) {
guildVerificationLevel = GuildVerificationLevel.NONE;
}
return computeVerificationLevelTriggered(me2, guild, guildMember, guildVerificationLevel, GuildMemberUtilsKt.getJoinedAtOrNow(storeGuilds.getGuildsJoinedAt().get(Long.valueOf(j))), clock);
return computeVerificationLevelTriggered(me2, guild, guildMember, guildVerificationLevel, GuildMemberUtilsKt.getJoinedAtOrNow(storeGuilds.getGuildsJoinedAt().get(Long.valueOf(j))), clock, map2);
}
public final Observable<GuildVerificationLevel> observeVerificationLevelTriggered(long j, StoreGuilds storeGuilds, StoreUser storeUser, Clock clock) {
@ -107,7 +119,7 @@ public final class GuildVerificationLevelUtils {
Observable<Guild> observeGuild = storeGuilds.observeGuild(j);
Observable<GuildVerificationLevel> observeVerificationLevel = storeGuilds.observeVerificationLevel(j);
Observable<Map<Long, GuildMember>> observeComputed = storeGuilds.observeComputed(j);
Observable<GuildVerificationLevel> q = Observable.g(observeJoinedAt, observeGuild, observeVerificationLevel, Observable.h0(new r(observeComputed.j, new LeadingEdgeThrottle(1500, TimeUnit.MILLISECONDS))), storeUser.observeMe(true), new GuildVerificationLevelUtils$observeVerificationLevelTriggered$1(clock)).q();
Observable<GuildVerificationLevel> q = Observable.f(observeJoinedAt, observeGuild, observeVerificationLevel, Observable.h0(new r(observeComputed.j, new LeadingEdgeThrottle(1500, TimeUnit.MILLISECONDS))), storeUser.observeMe(true), storeGuilds.observeRoles(j), new GuildVerificationLevelUtils$observeVerificationLevelTriggered$1(clock)).q();
m.checkNotNullExpressionValue(q, "Observable\n .comb… .distinctUntilChanged()");
return q;
}

View File

@ -12,6 +12,7 @@ import com.discord.api.user.User;
import com.discord.api.utcdatetime.UtcDateTime;
import com.discord.models.domain.NonceGenerator;
import com.discord.models.message.Message;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.time.Clock;
import d0.t.n;
import d0.t.o;
@ -55,7 +56,7 @@ public final class LocalMessageCreatorsKt {
return createLocalApplicationCommandMessage(id2, b2, channelId, c, author, z2, z3, l, clock);
}
public static final Message createLocalMessage(String str, long j, User user, List<User> list, boolean z2, boolean z3, Application application, MessageActivity messageActivity, Clock clock, List<LocalAttachment> list2, Long l, Long l2, Integer num, List<? extends BaseSticker> list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, String str2) {
public static final Message createLocalMessage(String str, long j, User user, List<User> list, boolean z2, boolean z3, Application application, MessageActivity messageActivity, Clock clock, List<LocalAttachment> list2, Long l, Long l2, Integer num, List<? extends BaseSticker> list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, CaptchaHelper.CaptchaPayload captchaPayload) {
ArrayList arrayList;
m.checkNotNullParameter(str, "content");
m.checkNotNullParameter(user, "author");
@ -78,11 +79,11 @@ public final class LocalMessageCreatorsKt {
} else {
arrayList = null;
}
return new Message(computeNonce, j, null, user, str, utcDateTime, null, bool, bool, list, emptyList, emptyList2, emptyList3, emptyList4, valueOf, bool, null, valueOf2, messageActivity, application, null, messageReference, null, null, arrayList, null, null, null, null, null, Boolean.FALSE, z3, messageAllowedMentions, num, l, l2, list2, str2, 4, 0, null);
return new Message(computeNonce, j, null, user, str, utcDateTime, null, bool, bool, list, emptyList, emptyList2, emptyList3, emptyList4, valueOf, bool, null, valueOf2, messageActivity, application, null, messageReference, null, null, arrayList, null, null, null, null, null, Boolean.FALSE, z3, messageAllowedMentions, num, l, l2, list2, captchaPayload, 4, 0, null);
}
public static /* synthetic */ Message createLocalMessage$default(String str, long j, User user, List list, boolean z2, boolean z3, Application application, MessageActivity messageActivity, Clock clock, List list2, Long l, Long l2, Integer num, List list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, String str2, int i, Object obj) {
return createLocalMessage(str, j, user, list, z2, z3, application, messageActivity, clock, list2, l, l2, num, list3, messageReference, messageAllowedMentions, (i & 65536) != 0 ? null : str2);
public static /* synthetic */ Message createLocalMessage$default(String str, long j, User user, List list, boolean z2, boolean z3, Application application, MessageActivity messageActivity, Clock clock, List list2, Long l, Long l2, Integer num, List list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
return createLocalMessage(str, j, user, list, z2, z3, application, messageActivity, clock, list2, l, l2, num, list3, messageReference, messageAllowedMentions, (i & 65536) != 0 ? null : captchaPayload);
}
public static final Message createThreadStarterMessageNotFoundMessage(long j, User user, Clock clock) {

View File

@ -168,12 +168,18 @@ public final class MessageQueue {
long messageId = edit.getMessageId();
String content = edit.getContent();
MessageAllowedMentions allowedMentions = edit.getAllowedMentions();
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn(api.editMessage(channelId, messageId, new RestAPIParams.Message(content, null, null, null, null, null, allowedMentions != null ? RestAPIParams.Message.AllowedMentions.Companion.create(allowedMentions) : null, null, 188, null)), false), MessageQueue.class, (Context) null, new MessageQueue$doEdit$4(this, edit, drainListener), new MessageQueue$doEdit$3(this, drainListener), (Function0) null, (Function0) null, new MessageQueue$doEdit$2(this, drainListener), 50, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn(api.editMessage(channelId, messageId, new RestAPIParams.Message(content, null, null, null, null, null, allowedMentions != null ? RestAPIParams.Message.AllowedMentions.Companion.create(allowedMentions) : null, null, null, 444, null)), false), MessageQueue.class, (Context) null, new MessageQueue$doEdit$4(this, edit, drainListener), new MessageQueue$doEdit$3(this, drainListener), (Function0) null, (Function0) null, new MessageQueue$doEdit$2(this, drainListener), 50, (Object) null);
}
/* JADX WARNING: Removed duplicated region for block: B:46:0x00f1 */
/* JADX WARNING: Removed duplicated region for block: B:47:0x00f8 */
/* JADX WARNING: Removed duplicated region for block: B:50:0x0100 */
private final void doSend(MessageRequest.Send send, DrainListener drainListener) {
RestAPIParams.Message.Activity activity;
RestAPIParams.Message.MessageReference messageReference;
ArrayList arrayList;
CaptchaHelper.CaptchaPayload captchaPayload;
ArrayList arrayList2;
String k;
MessageResult.ValidationError validateMessage = send.validateMessage();
if (validateMessage != null) {
@ -183,7 +189,7 @@ public final class MessageQueue {
Message message = send.getMessage();
boolean z2 = message.getNonce() != null;
MessageActivity activity2 = message.getActivity();
ArrayList arrayList = null;
String str = null;
if (activity2 != null) {
Activity activity3 = send.getActivity();
activity = (activity3 == null || (k = activity3.k()) == null) ? null : new RestAPIParams.Message.Activity(activity2.b(), activity2.a(), k);
@ -207,20 +213,42 @@ public final class MessageQueue {
Long valueOf = application != null ? Long.valueOf(application.g()) : null;
List<StickerPartial> stickerItems = message.getStickerItems();
if (stickerItems != null) {
arrayList = new ArrayList(o.collectionSizeOrDefault(stickerItems, 10));
arrayList2 = new ArrayList(o.collectionSizeOrDefault(stickerItems, 10));
for (StickerPartial stickerPartial : stickerItems) {
arrayList.add(Long.valueOf(stickerPartial.getId()));
arrayList2.add(Long.valueOf(stickerPartial.getId()));
}
} else {
List<Sticker> stickers = message.getStickers();
if (stickers != null) {
arrayList = new ArrayList(o.collectionSizeOrDefault(stickers, 10));
arrayList2 = new ArrayList(o.collectionSizeOrDefault(stickers, 10));
for (Sticker sticker : stickers) {
arrayList.add(Long.valueOf(sticker.getId()));
arrayList2.add(Long.valueOf(sticker.getId()));
}
} else {
arrayList = null;
CaptchaHelper.CaptchaPayload captchaPayload2 = message.getCaptchaPayload();
String captchaKey = captchaPayload2 == null ? captchaPayload2.getCaptchaKey() : null;
captchaPayload = message.getCaptchaPayload();
if (captchaPayload != null) {
str = captchaPayload.getCaptchaRqtoken();
}
Observable<SendUtils.SendPayload> t = SendUtils.INSTANCE.getSendPayload(this.contentResolver, new RestAPIParams.Message(content, nonce, valueOf, activity, arrayList, messageReference, create, captchaKey, str), send.getAttachments()).t(new MessageQueue$doSend$1(send));
m.checkNotNullExpressionValue(t, "SendUtils\n .getSe… }\n }\n }");
Observable<R> F = t.x(MessageQueue$doSend$$inlined$filterIs$1.INSTANCE).F(MessageQueue$doSend$$inlined$filterIs$2.INSTANCE);
m.checkNotNullExpressionValue(F, "filter { it is T }.map { it as T }");
Observable z3 = F.Z(1).z(new MessageQueue$doSend$2(message));
m.checkNotNullExpressionValue(z3, "SendUtils\n .getSe…ge)\n }\n }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn(z3, z2), MessageQueue.class, (Context) null, new MessageQueue$doSend$5(this, send, drainListener), new MessageQueue$doSend$4(this, drainListener, message), (Function0) null, (Function0) null, new MessageQueue$doSend$3(this, drainListener), 50, (Object) null);
}
}
Observable<SendUtils.SendPayload> t = SendUtils.INSTANCE.getSendPayload(this.contentResolver, new RestAPIParams.Message(content, nonce, valueOf, activity, arrayList, messageReference, create, message.getCaptchaKey()), send.getAttachments()).t(new MessageQueue$doSend$1(send));
arrayList = arrayList2;
CaptchaHelper.CaptchaPayload captchaPayload2 = message.getCaptchaPayload();
if (captchaPayload2 == null) {
}
captchaPayload = message.getCaptchaPayload();
if (captchaPayload != null) {
}
Observable<SendUtils.SendPayload> t = SendUtils.INSTANCE.getSendPayload(this.contentResolver, new RestAPIParams.Message(content, nonce, valueOf, activity, arrayList, messageReference, create, captchaKey, str), send.getAttachments()).t(new MessageQueue$doSend$1(send));
m.checkNotNullExpressionValue(t, "SendUtils\n .getSe… }\n }\n }");
Observable<R> F = t.x(MessageQueue$doSend$$inlined$filterIs$1.INSTANCE).F(MessageQueue$doSend$$inlined$filterIs$2.INSTANCE);
m.checkNotNullExpressionValue(F, "filter { it is T }.map { it as T }");

View File

@ -1,13 +1,18 @@
package com.discord.utilities.premium;
import com.discord.api.guild.GuildFeature;
import com.discord.app.AppLog;
import com.discord.models.domain.ModelSubscription;
import com.discord.models.domain.premium.SubscriptionPlanType;
import com.discord.models.experiments.domain.Experiment;
import com.discord.models.guild.Guild;
import com.discord.stores.StoreExperiments;
import com.discord.stores.StoreGuildBoost;
import com.discord.stores.StoreGuilds;
import com.discord.stores.StoreStream;
import com.discord.utilities.analytics.Traits;
import com.discord.utilities.logging.Logger;
import com.discord.utilities.rest.RestAPI;
import d0.t.n;
import d0.t.u;
import d0.z.d.m;
import j0.p.a;
@ -33,24 +38,61 @@ public final class GuildBoostUtils {
private GuildBoostUtils() {
}
private final int getCurrentTierSubs(int i) {
public static /* synthetic */ int calculatePercentToNextTier$default(GuildBoostUtils guildBoostUtils, long j, int i, int i2, StoreExperiments storeExperiments, StoreGuilds storeGuilds, int i3, Object obj) {
if ((i3 & 8) != 0) {
storeExperiments = StoreStream.Companion.getExperiments();
}
if ((i3 & 16) != 0) {
storeGuilds = StoreStream.Companion.getGuilds();
}
return guildBoostUtils.calculatePercentToNextTier(j, i, i2, storeExperiments, storeGuilds);
}
public static /* synthetic */ int calculateTotalProgress$default(GuildBoostUtils guildBoostUtils, long j, int i, int i2, StoreExperiments storeExperiments, StoreGuilds storeGuilds, int i3, Object obj) {
if ((i3 & 8) != 0) {
storeExperiments = StoreStream.Companion.getExperiments();
}
if ((i3 & 16) != 0) {
storeGuilds = StoreStream.Companion.getGuilds();
}
return guildBoostUtils.calculateTotalProgress(j, i, i2, storeExperiments, storeGuilds);
}
public static /* synthetic */ int getBoostTier$default(GuildBoostUtils guildBoostUtils, long j, int i, StoreExperiments storeExperiments, StoreGuilds storeGuilds, int i2, Object obj) {
if ((i2 & 4) != 0) {
storeExperiments = StoreStream.Companion.getExperiments();
}
if ((i2 & 8) != 0) {
storeGuilds = StoreStream.Companion.getGuilds();
}
return guildBoostUtils.getBoostTier(j, i, storeExperiments, storeGuilds);
}
public static /* synthetic */ int getBoostsRequiredForTier$default(GuildBoostUtils guildBoostUtils, long j, int i, StoreExperiments storeExperiments, StoreGuilds storeGuilds, int i2, Object obj) {
if ((i2 & 4) != 0) {
storeExperiments = StoreStream.Companion.getExperiments();
}
if ((i2 & 8) != 0) {
storeGuilds = StoreStream.Companion.getGuilds();
}
return guildBoostUtils.getBoostsRequiredForTier(j, i, storeExperiments, storeGuilds);
}
private final int getCurrentTierSubs(boolean z2, int i) {
if (i == 1) {
return 2;
}
if (i != 2) {
return i != 3 ? 0 : 14;
if (i == 2) {
return z2 ? 5 : 7;
}
return 7;
if (i != 3) {
return 0;
}
return z2 ? 7 : 14;
}
private final int getNextTierSubs(int i) {
if (i == 1) {
return 7;
}
if (i != 2) {
return i != 3 ? 2 : 0;
}
return 14;
private final int getNextTierSubs(boolean z2, int i) {
return i != 1 ? i != 2 ? i != 3 ? 2 : 0 : z2 ? 7 : 14 : z2 ? 5 : 7;
}
private final Observable<ModifyGuildBoostSlotResult> modifyGuildBoostSlot(RestAPI restAPI, long j, ModelSubscription modelSubscription, boolean z2, StoreGuildBoost storeGuildBoost) {
@ -59,73 +101,77 @@ public final class GuildBoostUtils {
return z3;
}
/* JADX DEBUG: Multi-variable search result rejected for r5v8, resolved type: java.lang.Object */
/* JADX WARN: Multi-variable type inference failed */
public final List<ModelSubscription.SubscriptionAdditionalPlan> calculateAdditionalPlansWithGuildBoostAdjustment(ModelSubscription modelSubscription, int i) {
List<ModelSubscription.SubscriptionAdditionalPlan> list;
Object obj;
boolean z2;
m.checkNotNullParameter(modelSubscription, Traits.Payment.Type.SUBSCRIPTION);
ModelSubscription.SubscriptionRenewalMutations renewalMutations = modelSubscription.getRenewalMutations();
if (renewalMutations == null) {
list = modelSubscription.getPremiumAdditionalPlans();
} else {
list = renewalMutations.getPremiumAdditionalPlans();
if (list == null) {
list = n.emptyList();
List<ModelSubscription.SubscriptionAdditionalPlan> premiumAdditionalPlans = renewalMutations == null ? modelSubscription.getPremiumAdditionalPlans() : renewalMutations.getPremiumAdditionalPlans();
Iterator<T> it = premiumAdditionalPlans.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
break;
}
obj = it.next();
ModelSubscription.SubscriptionAdditionalPlan subscriptionAdditionalPlan = (ModelSubscription.SubscriptionAdditionalPlan) obj;
if (subscriptionAdditionalPlan.getPlanId() == SubscriptionPlanType.PREMIUM_GUILD_MONTH.getPlanId() || subscriptionAdditionalPlan.getPlanId() == SubscriptionPlanType.PREMIUM_GUILD_YEAR.getPlanId()) {
z2 = true;
continue;
} else {
z2 = false;
continue;
}
if (z2) {
break;
}
}
ModelSubscription.SubscriptionAdditionalPlan subscriptionAdditionalPlan = null;
if (list != null) {
Iterator<T> it = list.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
Object next = it.next();
ModelSubscription.SubscriptionAdditionalPlan subscriptionAdditionalPlan2 = (ModelSubscription.SubscriptionAdditionalPlan) next;
if (subscriptionAdditionalPlan2.getPlanId() == SubscriptionPlanType.PREMIUM_GUILD_MONTH.getPlanId() || subscriptionAdditionalPlan2.getPlanId() == SubscriptionPlanType.PREMIUM_GUILD_YEAR.getPlanId()) {
z2 = true;
continue;
} else {
z2 = false;
continue;
}
if (z2) {
subscriptionAdditionalPlan = next;
break;
}
}
subscriptionAdditionalPlan = subscriptionAdditionalPlan;
}
int quantity = (subscriptionAdditionalPlan != null ? subscriptionAdditionalPlan.getQuantity() : 0) + i;
if (quantity < 0 || subscriptionAdditionalPlan == null) {
ModelSubscription.SubscriptionAdditionalPlan subscriptionAdditionalPlan2 = (ModelSubscription.SubscriptionAdditionalPlan) obj;
int quantity = (subscriptionAdditionalPlan2 != null ? subscriptionAdditionalPlan2.getQuantity() : 0) + i;
if (quantity < 0 || subscriptionAdditionalPlan2 == null) {
AppLog appLog = AppLog.g;
Logger.e$default(appLog, "Error calculating additional_plans adjustment, new sub count:" + quantity, null, null, 6, null);
return modelSubscription.getPremiumAdditionalPlans();
}
ArrayList arrayList = new ArrayList();
for (Object obj : list) {
ModelSubscription.SubscriptionAdditionalPlan subscriptionAdditionalPlan3 = (ModelSubscription.SubscriptionAdditionalPlan) obj;
for (Object obj2 : premiumAdditionalPlans) {
ModelSubscription.SubscriptionAdditionalPlan subscriptionAdditionalPlan3 = (ModelSubscription.SubscriptionAdditionalPlan) obj2;
if ((subscriptionAdditionalPlan3.getPlanId() == SubscriptionPlanType.PREMIUM_GUILD_MONTH.getPlanId() || subscriptionAdditionalPlan3.getPlanId() == SubscriptionPlanType.PREMIUM_GUILD_YEAR.getPlanId()) ? false : true) {
arrayList.add(obj);
arrayList.add(obj2);
}
}
return quantity == 0 ? arrayList : u.plus((Collection) arrayList, (Iterable) d0.t.m.listOf(new ModelSubscription.SubscriptionAdditionalPlan(subscriptionAdditionalPlan.getPlanId(), quantity)));
return quantity == 0 ? arrayList : u.plus((Collection) arrayList, (Iterable) d0.t.m.listOf(new ModelSubscription.SubscriptionAdditionalPlan(subscriptionAdditionalPlan2.getPlanId(), quantity)));
}
public final int calculatePercentToNextTier(int i, int i2) {
public final int calculatePercentToNextTier(long j, int i, int i2, StoreExperiments storeExperiments, StoreGuilds storeGuilds) {
Guild guild;
m.checkNotNullParameter(storeExperiments, "storeExperiments");
m.checkNotNullParameter(storeGuilds, "storeGuilds");
if (i >= 3) {
return 100;
}
return d0.a0.a.roundToInt((((float) (i2 - getCurrentTierSubs(i))) / ((float) getNextTierSubs(i))) * ((float) 100));
boolean z2 = true;
Experiment guildExperiment = storeExperiments.getGuildExperiment("2022-02_boosting_tiers", j, true);
if (guildExperiment == null || guildExperiment.getBucket() != 1 || (guild = storeGuilds.getGuild(j)) == null || !guild.hasFeature(GuildFeature.EXPOSED_TO_BOOSTING_TIERS_EXPERIMENT)) {
z2 = false;
}
return d0.a0.a.roundToInt((((float) (i2 - getCurrentTierSubs(z2, i))) / ((float) getNextTierSubs(z2, i))) * ((float) 100));
}
public final int calculateTotalProgress(int i, int i2) {
public final int calculateTotalProgress(long j, int i, int i2, StoreExperiments storeExperiments, StoreGuilds storeGuilds) {
Guild guild;
m.checkNotNullParameter(storeExperiments, "storeExperiments");
m.checkNotNullParameter(storeGuilds, "storeGuilds");
if (i >= 3) {
return 100;
}
int nextTierSubs = getNextTierSubs(i);
int currentTierSubs = getCurrentTierSubs(i);
boolean z2 = true;
Experiment guildExperiment = storeExperiments.getGuildExperiment("2022-02_boosting_tiers", j, true);
if (guildExperiment == null || guildExperiment.getBucket() != 1 || (guild = storeGuilds.getGuild(j)) == null || !guild.hasFeature(GuildFeature.EXPOSED_TO_BOOSTING_TIERS_EXPERIMENT)) {
z2 = false;
}
int nextTierSubs = getNextTierSubs(z2, i);
int currentTierSubs = getCurrentTierSubs(z2, i);
return d0.a0.a.roundToInt(((((float) (i2 - currentTierSubs)) / ((float) (nextTierSubs - currentTierSubs))) * 33.3f) + (((float) i) * 33.3f));
}
@ -136,14 +182,49 @@ public final class GuildBoostUtils {
return modifyGuildBoostSlot(restAPI, j, modelSubscription, true, storeGuildBoost);
}
public final int getBoostTier(int i) {
if (i >= 14) {
public final int getBoostTier(long j, int i, StoreExperiments storeExperiments, StoreGuilds storeGuilds) {
Guild guild;
m.checkNotNullParameter(storeExperiments, "storeExperiments");
m.checkNotNullParameter(storeGuilds, "storeGuilds");
Experiment guildExperiment = storeExperiments.getGuildExperiment("2022-02_boosting_tiers", j, true);
if (guildExperiment != null && guildExperiment.getBucket() == 1 && (guild = storeGuilds.getGuild(j)) != null && guild.hasFeature(GuildFeature.EXPOSED_TO_BOOSTING_TIERS_EXPERIMENT)) {
if (i >= 7) {
return 3;
}
if (i >= 5) {
return 2;
}
return i >= 2 ? 1 : 0;
} else if (i >= 14) {
return 3;
} else {
if (i >= 7) {
return 2;
}
return i >= 2 ? 1 : 0;
}
if (i >= 7) {
}
public final int getBoostsRequiredForTier(long j, int i, StoreExperiments storeExperiments, StoreGuilds storeGuilds) {
Guild guild;
m.checkNotNullParameter(storeExperiments, "storeExperiments");
m.checkNotNullParameter(storeGuilds, "storeGuilds");
Experiment guildExperiment = storeExperiments.getGuildExperiment("2022-02_boosting_tiers", j, true);
boolean z2 = guildExperiment != null && guildExperiment.getBucket() == 1 && (guild = storeGuilds.getGuild(j)) != null && guild.hasFeature(GuildFeature.EXPOSED_TO_BOOSTING_TIERS_EXPERIMENT);
if (i == 1) {
return 2;
}
return i >= 2 ? 1 : 0;
if (i != 2) {
if (i != 3) {
return 0;
}
if (!z2) {
return 14;
}
} else if (z2) {
return 5;
}
return 7;
}
public final Observable<ModifyGuildBoostSlotResult> uncancelGuildBoostSlot(RestAPI restAPI, long j, ModelSubscription modelSubscription, StoreGuildBoost storeGuildBoost) {

View File

@ -118,6 +118,7 @@ import com.discord.restapi.SpotifyTokenInterceptor;
import com.discord.stores.StoreStream;
import com.discord.utilities.analytics.ChatInputComponentTypes;
import com.discord.utilities.auth.GoogleSmartLockManager;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.logging.Logger;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.systemlog.SystemLogUtils;
@ -433,8 +434,8 @@ public final class RestAPI implements RestAPIInterface {
apiSpotify = restAPI;
}
public static /* synthetic */ Observable addRelationship$default(RestAPI restAPI, String str, long j, Integer num, String str2, String str3, int i, Object obj) {
return restAPI.addRelationship(str, j, (i & 4) != 0 ? null : num, (i & 8) != 0 ? null : str2, (i & 16) != 0 ? null : str3);
public static /* synthetic */ Observable addRelationship$default(RestAPI restAPI, String str, long j, Integer num, String str2, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
return restAPI.addRelationship(str, j, (i & 4) != 0 ? null : num, (i & 8) != 0 ? null : str2, (i & 16) != 0 ? null : captchaPayload);
}
public static final Interceptor buildAnalyticsInterceptor() {
@ -595,9 +596,9 @@ public final class RestAPI implements RestAPIInterface {
return this._api.addRelationship(j, userRelationship, str);
}
public final Observable<Void> addRelationship(String str, long j, Integer num, String str2, String str3) {
public final Observable<Void> addRelationship(String str, long j, Integer num, String str2, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION);
return ObservableExtensionsKt.restSubscribeOn$default(this._api.addRelationship(j, new RestAPIParams.UserRelationship(num, str2, str3), jsonObjectOf(d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null);
return ObservableExtensionsKt.restSubscribeOn$default(this._api.addRelationship(j, new RestAPIParams.UserRelationship(num, str2, captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null), jsonObjectOf(d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null);
}
@Override // com.discord.restapi.RestAPIInterface
@ -2123,10 +2124,10 @@ public final class RestAPI implements RestAPIInterface {
return this._api.sendRelationshipRequest(add, str);
}
public final Observable<Void> sendRelationshipRequest(String str, String str2, int i, String str3) {
public final Observable<Void> sendRelationshipRequest(String str, String str2, int i, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION);
m.checkNotNullParameter(str2, "username");
return ObservableExtensionsKt.restSubscribeOn$default(this._api.sendRelationshipRequest(new RestAPIParams.UserRelationship.Add(str2, i, str3), jsonObjectOf(d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null);
return ObservableExtensionsKt.restSubscribeOn$default(this._api.sendRelationshipRequest(new RestAPIParams.UserRelationship.Add(str2, i, captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null), jsonObjectOf(d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null);
}
public final Observable<Void> setConsent(boolean z2, String str) {

View File

@ -26,7 +26,7 @@ import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import s.a.k0;
/* compiled from: SendUtils.kt */
@e(c = "com.discord.utilities.rest.SendUtils$compressImageAttachments$1", f = "SendUtils.kt", l = {317}, m = "invokeSuspend")
@e(c = "com.discord.utilities.rest.SendUtils$compressImageAttachments$1", f = "SendUtils.kt", l = {321}, m = "invokeSuspend")
public final class SendUtils$compressImageAttachments$1 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public final /* synthetic */ List $attachments;
public final /* synthetic */ Context $context;

View File

@ -2,13 +2,14 @@ package com.discord.utilities.rest;
import com.discord.app.AppFragment;
import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.messagesend.MessageResult;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function2;
/* compiled from: SendUtils.kt */
public final class SendUtils$handleCaptchaRequired$1 extends o implements Function2<AppFragment, String, Unit> {
public final class SendUtils$handleCaptchaRequired$1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ MessageResult.CaptchaRequired $messageResult;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -20,14 +21,14 @@ public final class SendUtils$handleCaptchaRequired$1 extends o implements Functi
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, str);
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(appFragment, captchaPayload);
return Unit.a;
}
public final void invoke(AppFragment appFragment, String str) {
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(str, "captchaToken");
StoreStream.Companion.getMessages().resendMessageWithCaptcha(this.$messageResult.getChannelId(), this.$messageResult.getNonce(), str);
m.checkNotNullParameter(captchaPayload, "captchaPayload");
StoreStream.Companion.getMessages().resendMessageWithCaptcha(this.$messageResult.getChannelId(), this.$messageResult.getNonce(), captchaPayload);
}
}

View File

@ -544,6 +544,8 @@ public final class SendUtils {
}
public final Observable<SendPayload> getSendPayload(ContentResolver contentResolver, RestAPIParams.Message message, List<? extends Attachment<?>> list) {
String str;
List<Attachment<?>> list2;
RestAPIParams.Message message2 = message;
m.checkNotNullParameter(contentResolver, "contentResolver");
m.checkNotNullParameter(message2, "apiParamMessage");
@ -559,9 +561,14 @@ public final class SendUtils {
}
String appendLinks = AttachmentUtilsKt.appendLinks(content, extractLinks);
if (!m.areEqual(appendLinks, message.getContent())) {
message2 = RestAPIParams.Message.copy$default(message, appendLinks, null, null, null, null, null, null, null, 254, null);
str = "Observable.just(SendPayl…ramMessage, emptyList()))";
list2 = extractLinks;
message2 = RestAPIParams.Message.copy$default(message, appendLinks, null, null, null, null, null, null, null, null, 510, null);
} else {
str = "Observable.just(SendPayl…ramMessage, emptyList()))";
list2 = extractLinks;
}
List<Attachment<?>> uniqueifyNames = uniqueifyNames(u.minus((Iterable) list, (Iterable) extractLinks));
List<Attachment<?>> uniqueifyNames = uniqueifyNames(u.minus((Iterable) list, (Iterable) list2));
if (!uniqueifyNames.isEmpty()) {
k kVar2 = new k(getPreprocessingFromAttachments(contentResolver, uniqueifyNames));
ArrayList arrayList = new ArrayList(d0.t.o.collectionSizeOrDefault(uniqueifyNames, 10));
@ -579,7 +586,7 @@ public final class SendUtils {
return m;
}
k kVar3 = new k(new SendPayload.ReadyToSend(message2, d0.t.n.emptyList()));
m.checkNotNullExpressionValue(kVar3, "Observable.just(SendPayl…ramMessage, emptyList()))");
m.checkNotNullExpressionValue(kVar3, str);
return kVar3;
}

View File

@ -57,9 +57,9 @@ public final class GuildBoostConfirmationView extends CardView {
public final void b(Guild guild, int i) {
m.checkNotNullParameter(guild, "guild");
int boostTier = GuildBoostUtils.INSTANCE.getBoostTier(guild.getPremiumSubscriptionCount() + i);
int boostTier$default = GuildBoostUtils.getBoostTier$default(GuildBoostUtils.INSTANCE, guild.getId(), guild.getPremiumSubscriptionCount() + i, null, null, 12, null);
boolean z2 = true;
char c = boostTier > guild.getPremiumTier() ? 1 : boostTier < guild.getPremiumTier() ? (char) 2 : 3;
char c = boostTier$default > guild.getPremiumTier() ? 1 : boostTier$default < guild.getPremiumTier() ? (char) 2 : 3;
SimpleDraweeView simpleDraweeView = this.j.f122b;
m.checkNotNullExpressionValue(simpleDraweeView, "binding.guildBoostConfirmationAvatar");
IconUtils.setIcon$default(simpleDraweeView, IconUtils.getForGuild$default(guild, null, false, null, 14, null), 0, (Function1) null, (MGImages.ChangeDetector) null, 28, (Object) null);
@ -92,10 +92,10 @@ public final class GuildBoostConfirmationView extends CardView {
ColorCompatKt.tintWithColorResource(imageView2, i3);
Chip chip4 = this.j.e;
m.checkNotNullExpressionValue(chip4, "binding.guildBoostConfirmationLevelInfoUpgrade");
chip4.setChipIcon(ContextCompat.getDrawable(getContext(), c(boostTier)));
chip4.setChipIcon(ContextCompat.getDrawable(getContext(), c(boostTier$default)));
Chip chip5 = this.j.e;
m.checkNotNullExpressionValue(chip5, "binding.guildBoostConfirmationLevelInfoUpgrade");
chip5.setText(d(boostTier));
chip5.setText(d(boostTier$default));
}
}

View File

@ -43,7 +43,7 @@ public final class GuildBoostProgressView extends FrameLayout {
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
}
public final void a(int i, int i2) {
public final void a(long j, int i, int i2) {
ImageView imageView = this.j.f201b;
int i3 = 0;
if (i == 0) {
@ -63,6 +63,6 @@ public final class GuildBoostProgressView extends FrameLayout {
textView.setText(i != 0 ? i != 1 ? i != 2 ? i != 3 ? "" : getContext().getString(R.string.premium_guild_tier_3) : getContext().getString(R.string.premium_guild_tier_2) : getContext().getString(R.string.premium_guild_tier_1) : getContext().getString(R.string.premium_guild_header_badge_no_tier));
ProgressBar progressBar = this.j.d;
m.checkNotNullExpressionValue(progressBar, "binding.progressProgress");
progressBar.setProgress(GuildBoostUtils.INSTANCE.calculatePercentToNextTier(i, i2));
progressBar.setProgress(GuildBoostUtils.calculatePercentToNextTier$default(GuildBoostUtils.INSTANCE, j, i, i2, null, null, 24, null));
}
}

View File

@ -3,6 +3,7 @@ package com.discord.widgets.auth;
import android.content.Intent;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetAuthCaptcha.kt */
@ -17,9 +18,14 @@ public final class WidgetAuthCaptcha$Companion$registerForResult$1<O> implements
m.checkNotNullExpressionValue(activityResult, "activityResult");
if (activityResult.getResultCode() == -1) {
Intent data = activityResult.getData();
String stringExtra = data != null ? data.getStringExtra("RESULT_EXTRA_CAPTCHA") : null;
String str = null;
String stringExtra = data != null ? data.getStringExtra("RESULT_EXTRA_TOKEN") : null;
Intent data2 = activityResult.getData();
if (data2 != null) {
str = data2.getStringExtra("RESULT_EXTRA_RQTOKEN");
}
if (stringExtra != null) {
this.$callback.invoke(stringExtra);
this.$callback.invoke(new CaptchaHelper.CaptchaPayload(stringExtra, str));
}
}
}

View File

@ -20,7 +20,8 @@ import kotlin.jvm.internal.DefaultConstructorMarker;
public final class WidgetAuthCaptcha extends WidgetCaptcha {
public static final Companion Companion = new Companion(null);
private static final String EXTRA_CAPTCHA_ERROR_BODY = "EXTRA_CAPTCHA_ERROR_BODY";
private static final String RESULT_EXTRA_TOKEN = "RESULT_EXTRA_CAPTCHA";
private static final String RESULT_EXTRA_RQTOKEN = "RESULT_EXTRA_RQTOKEN";
private static final String RESULT_EXTRA_TOKEN = "RESULT_EXTRA_TOKEN";
/* compiled from: WidgetAuthCaptcha.kt */
public static final class Companion {
@ -50,7 +51,7 @@ public final class WidgetAuthCaptcha extends WidgetCaptcha {
}
}
public final ActivityResultLauncher<Intent> registerForResult(AppFragment appFragment, Function1<? super String, Unit> function1) {
public final ActivityResultLauncher<Intent> registerForResult(AppFragment appFragment, Function1<? super CaptchaHelper.CaptchaPayload, Unit> function1) {
m.checkNotNullParameter(appFragment, "fragment");
m.checkNotNullParameter(function1, "callback");
ActivityResultLauncher<Intent> registerForActivityResult = appFragment.registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new WidgetAuthCaptcha$Companion$registerForResult$1(function1));

View File

@ -1,11 +1,12 @@
package com.discord.widgets.auth;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetAuthLogin.kt */
public final class WidgetAuthLogin$captchaForgotPasswordLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetAuthLogin$captchaForgotPasswordLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetAuthLogin this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -17,13 +18,13 @@ public final class WidgetAuthLogin$captchaForgotPasswordLauncher$1 extends o imp
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
m.checkNotNullParameter(str, "token");
WidgetAuthLogin.access$forgotPassword(this.this$0, str);
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetAuthLogin.access$forgotPassword(this.this$0, captchaPayload);
}
}

View File

@ -1,11 +1,12 @@
package com.discord.widgets.auth;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetAuthLogin.kt */
public final class WidgetAuthLogin$captchaLoginLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetAuthLogin$captchaLoginLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetAuthLogin this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -17,13 +18,13 @@ public final class WidgetAuthLogin$captchaLoginLauncher$1 extends o implements F
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
m.checkNotNullParameter(str, "token");
WidgetAuthLogin.login$default(this.this$0, str, false, 2, null);
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetAuthLogin.login$default(this.this$0, captchaPayload, false, 2, null);
}
}

View File

@ -22,6 +22,7 @@ import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.utilities.auth.GoogleSmartLockManager;
import com.discord.utilities.auth.GoogleSmartLockManagerKt;
import com.discord.utilities.auth.RegistrationFlowRepo;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.view.extensions.ViewExtensions;
@ -81,8 +82,8 @@ public final class WidgetAuthLogin extends AppFragment {
this.validationManager$delegate = g.lazy(new WidgetAuthLogin$validationManager$2(this));
}
public static final /* synthetic */ void access$forgotPassword(WidgetAuthLogin widgetAuthLogin, String str) {
widgetAuthLogin.forgotPassword(str);
public static final /* synthetic */ void access$forgotPassword(WidgetAuthLogin widgetAuthLogin, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetAuthLogin.forgotPassword(captchaPayload);
}
public static final /* synthetic */ WidgetAuthLoginBinding access$getBinding$p(WidgetAuthLogin widgetAuthLogin) {
@ -113,20 +114,20 @@ public final class WidgetAuthLogin extends AppFragment {
widgetAuthLogin.showEmailSentToast(str);
}
private final void forgotPassword(String str) {
private final void forgotPassword(CaptchaHelper.CaptchaPayload captchaPayload) {
String textOrEmpty = getBinding().e.getTextOrEmpty();
if (textOrEmpty.length() == 0) {
m.g(getContext(), R.string.login_required, 0, null, 12);
} else {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui(StoreStream.Companion.getAuthentication().forgotPassword(textOrEmpty, str)), getBinding().h, 0, 2, null), getContext(), "REST: forgotPassword", (Function1) null, new WidgetAuthLogin$forgotPassword$1(this, textOrEmpty), new WidgetAuthLogin$forgotPassword$2(this, textOrEmpty), (Function0) null, (Function0) null, 100, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui(StoreStream.Companion.getAuthentication().forgotPassword(textOrEmpty, captchaPayload)), getBinding().h, 0, 2, null), getContext(), "REST: forgotPassword", (Function1) null, new WidgetAuthLogin$forgotPassword$1(this, textOrEmpty), new WidgetAuthLogin$forgotPassword$2(this, textOrEmpty), (Function0) null, (Function0) null, 100, (Object) null);
}
}
public static /* synthetic */ void forgotPassword$default(WidgetAuthLogin widgetAuthLogin, String str, int i, Object obj) {
public static /* synthetic */ void forgotPassword$default(WidgetAuthLogin widgetAuthLogin, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
captchaPayload = null;
}
widgetAuthLogin.forgotPassword(str);
widgetAuthLogin.forgotPassword(captchaPayload);
}
private final WidgetAuthLoginBinding getBinding() {
@ -203,41 +204,41 @@ public final class WidgetAuthLogin extends AppFragment {
getBinding().g.requestFocus();
}
private final void login(String str, String str2, String str3, boolean z2) {
Context context = getContext();
if (context != null) {
d0.z.d.m.checkNotNullExpressionValue(context, "context ?: return");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui$default(StoreStream.Companion.getAuthentication().login(str, str2, str3, z2, GoogleSmartLockManagerKt.hasSmartLockCredentials(getMostRecentIntent()) ? RestAPIParams.AuthLogin.LoginSource.LOGIN_SOURCE_KEYCHAIN_AUTO : null), this, null, 2, null), getBinding().h, 0, 2, null), context, "REST: login", (Function1) null, new WidgetAuthLogin$login$1(this, str, str2, context), new WidgetAuthLogin$login$2(this, str), (Function0) null, (Function0) null, 100, (Object) null);
}
}
private final void login(String str, boolean z2) {
private final void login(CaptchaHelper.CaptchaPayload captchaPayload, boolean z2) {
if (ValidationManager.validate$default(getValidationManager(), false, 1, null)) {
String textOrEmpty = getBinding().e.getTextOrEmpty();
TextInputLayout textInputLayout = getBinding().g;
d0.z.d.m.checkNotNullExpressionValue(textInputLayout, "binding.authLoginPasswordWrap");
login(textOrEmpty, ViewExtensions.getTextOrEmpty(textInputLayout), str, z2);
login(textOrEmpty, ViewExtensions.getTextOrEmpty(textInputLayout), captchaPayload, z2);
}
}
public static /* synthetic */ void login$default(WidgetAuthLogin widgetAuthLogin, String str, String str2, String str3, boolean z2, int i, Object obj) {
if ((i & 4) != 0) {
str3 = null;
private final void login(String str, String str2, CaptchaHelper.CaptchaPayload captchaPayload, boolean z2) {
Context context = getContext();
if (context != null) {
d0.z.d.m.checkNotNullExpressionValue(context, "context ?: return");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui$default(StoreStream.Companion.getAuthentication().login(str, str2, captchaPayload, z2, GoogleSmartLockManagerKt.hasSmartLockCredentials(getMostRecentIntent()) ? RestAPIParams.AuthLogin.LoginSource.LOGIN_SOURCE_KEYCHAIN_AUTO : null), this, null, 2, null), getBinding().h, 0, 2, null), context, "REST: login", (Function1) null, new WidgetAuthLogin$login$1(this, str, str2, context), new WidgetAuthLogin$login$2(this, str), (Function0) null, (Function0) null, 100, (Object) null);
}
if ((i & 8) != 0) {
z2 = false;
}
widgetAuthLogin.login(str, str2, str3, z2);
}
public static /* synthetic */ void login$default(WidgetAuthLogin widgetAuthLogin, String str, boolean z2, int i, Object obj) {
public static /* synthetic */ void login$default(WidgetAuthLogin widgetAuthLogin, CaptchaHelper.CaptchaPayload captchaPayload, boolean z2, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
captchaPayload = null;
}
if ((i & 2) != 0) {
z2 = false;
}
widgetAuthLogin.login(str, z2);
widgetAuthLogin.login(captchaPayload, z2);
}
public static /* synthetic */ void login$default(WidgetAuthLogin widgetAuthLogin, String str, String str2, CaptchaHelper.CaptchaPayload captchaPayload, boolean z2, int i, Object obj) {
if ((i & 4) != 0) {
captchaPayload = null;
}
if ((i & 8) != 0) {
z2 = false;
}
widgetAuthLogin.login(str, str2, captchaPayload, z2);
}
private final void onLoginSuccess(String str, String str2) {

View File

@ -1,12 +1,13 @@
package com.discord.widgets.auth;
import com.discord.utilities.auth.RegistrationFlowRepo;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetAuthRegisterAccountInformation.kt */
public final class WidgetAuthRegisterAccountInformation$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetAuthRegisterAccountInformation$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetAuthRegisterAccountInformation this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -18,14 +19,14 @@ public final class WidgetAuthRegisterAccountInformation$captchaLauncher$1 extend
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
m.checkNotNullParameter(str, "token");
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(captchaPayload, "captchaPayload");
RegistrationFlowRepo.trackTransition$default(RegistrationFlowRepo.Companion.getINSTANCE(), "Captcha", "success", null, 4, null);
WidgetAuthRegisterAccountInformation.access$register(this.this$0, str);
WidgetAuthRegisterAccountInformation.access$register(this.this$0, captchaPayload);
}
}

View File

@ -19,6 +19,7 @@ import com.discord.stores.StoreStream;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.auth.RegistrationFlowRepo;
import com.discord.utilities.birthday.BirthdayHelper;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.time.TimeUtils;
@ -72,8 +73,8 @@ public final class WidgetAuthRegisterAccountInformation extends AppFragment {
return widgetAuthRegisterAccountInformation.isConsentRequired;
}
public static final /* synthetic */ void access$register(WidgetAuthRegisterAccountInformation widgetAuthRegisterAccountInformation, String str) {
widgetAuthRegisterAccountInformation.register(str);
public static final /* synthetic */ void access$register(WidgetAuthRegisterAccountInformation widgetAuthRegisterAccountInformation, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetAuthRegisterAccountInformation.register(captchaPayload);
}
public static final /* synthetic */ void access$setConsentRequired$p(WidgetAuthRegisterAccountInformation widgetAuthRegisterAccountInformation, boolean z2) {
@ -175,7 +176,7 @@ public final class WidgetAuthRegisterAccountInformation extends AppFragment {
return true;
}
private final void register(String str) {
private final void register(CaptchaHelper.CaptchaPayload captchaPayload) {
if (!this.shouldValidateInputs || ValidationManager.validate$default(getValidationManager(), false, 1, null)) {
RegistrationFlowRepo.Companion companion = RegistrationFlowRepo.Companion;
if (companion.getINSTANCE().getBirthday() != null || !this.shouldShowAgeGate) {
@ -189,7 +190,7 @@ public final class WidgetAuthRegisterAccountInformation extends AppFragment {
String phoneToken = companion.getINSTANCE().getPhoneToken();
TextInputLayout textInputLayout2 = getBinding().d;
m.checkNotNullExpressionValue(textInputLayout2, "binding.authRegisterAccountInformationPasswordWrap");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(authentication.register(textOrEmpty, email, phoneToken, ViewExtensions.getTextOrEmpty(textInputLayout2), str, isConsented(), uTCDateTime), this, null, 2, null), WidgetAuthRegisterAccountInformation.class, getContext(), (Function1) null, new WidgetAuthRegisterAccountInformation$register$2(this), (Function0) null, (Function0) null, WidgetAuthRegisterAccountInformation$register$1.INSTANCE, 52, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(authentication.register(textOrEmpty, email, phoneToken, ViewExtensions.getTextOrEmpty(textInputLayout2), captchaPayload, isConsented(), uTCDateTime), this, null, 2, null), WidgetAuthRegisterAccountInformation.class, getContext(), (Function1) null, new WidgetAuthRegisterAccountInformation$register$2(this), (Function0) null, (Function0) null, WidgetAuthRegisterAccountInformation$register$1.INSTANCE, 52, (Object) null);
return;
}
RegistrationFlowRepo.trackTransition$default(companion.getINSTANCE(), "Account Information", "success", null, 4, null);
@ -200,11 +201,11 @@ public final class WidgetAuthRegisterAccountInformation extends AppFragment {
RegistrationFlowRepo.trackTransition$default(RegistrationFlowRepo.Companion.getINSTANCE(), "Account Information", "input_error", null, 4, null);
}
public static /* synthetic */ void register$default(WidgetAuthRegisterAccountInformation widgetAuthRegisterAccountInformation, String str, int i, Object obj) {
public static /* synthetic */ void register$default(WidgetAuthRegisterAccountInformation widgetAuthRegisterAccountInformation, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
captchaPayload = null;
}
widgetAuthRegisterAccountInformation.register(str);
widgetAuthRegisterAccountInformation.register(captchaPayload);
}
@Override // com.discord.app.AppFragment, com.discord.app.AppLogger.a

View File

@ -1,11 +1,12 @@
package com.discord.widgets.auth;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetAuthRegisterIdentity.kt */
public final class WidgetAuthRegisterIdentity$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetAuthRegisterIdentity$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetAuthRegisterIdentity this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -17,13 +18,13 @@ public final class WidgetAuthRegisterIdentity$captchaLauncher$1 extends o implem
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
m.checkNotNullParameter(str, "token");
WidgetAuthRegisterIdentity.access$registerViaPhone(this.this$0, str);
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetAuthRegisterIdentity.access$registerViaPhone(this.this$0, captchaPayload);
}
}

View File

@ -22,6 +22,7 @@ import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.auth.RegistrationFlowRepo;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.view.extensions.ViewExtensions;
@ -89,8 +90,8 @@ public final class WidgetAuthRegisterIdentity extends AppFragment {
widgetAuthRegisterIdentity.handleNext();
}
public static final /* synthetic */ void access$registerViaPhone(WidgetAuthRegisterIdentity widgetAuthRegisterIdentity, String str) {
widgetAuthRegisterIdentity.registerViaPhone(str);
public static final /* synthetic */ void access$registerViaPhone(WidgetAuthRegisterIdentity widgetAuthRegisterIdentity, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetAuthRegisterIdentity.registerViaPhone(captchaPayload);
}
public static final /* synthetic */ void access$setInputMode(WidgetAuthRegisterIdentity widgetAuthRegisterIdentity, PhoneOrEmailInputView.Mode mode) {
@ -183,17 +184,17 @@ public final class WidgetAuthRegisterIdentity extends AppFragment {
j.e(requireContext(), WidgetAuthRegisterAccountInformation.class, null, 4);
}
private final void registerViaPhone(String str) {
private final void registerViaPhone(CaptchaHelper.CaptchaPayload captchaPayload) {
String textOrEmpty = getBinding().d.getTextOrEmpty();
RegistrationFlowRepo.Companion.getINSTANCE().setPhone(textOrEmpty);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui$default(RestCallStateKt.logNetworkAction(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().postAuthRegisterPhone(new RestAPIParams.AuthRegisterPhone(textOrEmpty, str)), false, 1, null), WidgetAuthRegisterIdentity$registerViaPhone$1.INSTANCE), this, null, 2, null), getBinding().h, 0, 2, null), WidgetAuthRegisterIdentity.class, getContext(), (Function1) null, new WidgetAuthRegisterIdentity$registerViaPhone$3(this), (Function0) null, (Function0) null, new WidgetAuthRegisterIdentity$registerViaPhone$2(this, textOrEmpty), 52, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui$default(RestCallStateKt.logNetworkAction(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().postAuthRegisterPhone(new RestAPIParams.AuthRegisterPhone(textOrEmpty, captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null)), false, 1, null), WidgetAuthRegisterIdentity$registerViaPhone$1.INSTANCE), this, null, 2, null), getBinding().h, 0, 2, null), WidgetAuthRegisterIdentity.class, getContext(), (Function1) null, new WidgetAuthRegisterIdentity$registerViaPhone$3(this), (Function0) null, (Function0) null, new WidgetAuthRegisterIdentity$registerViaPhone$2(this, textOrEmpty), 52, (Object) null);
}
public static /* synthetic */ void registerViaPhone$default(WidgetAuthRegisterIdentity widgetAuthRegisterIdentity, String str, int i, Object obj) {
public static /* synthetic */ void registerViaPhone$default(WidgetAuthRegisterIdentity widgetAuthRegisterIdentity, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
captchaPayload = null;
}
widgetAuthRegisterIdentity.registerViaPhone(str);
widgetAuthRegisterIdentity.registerViaPhone(captchaPayload);
}
private final void setInputMode(PhoneOrEmailInputView.Mode mode) {

View File

@ -1,11 +1,12 @@
package com.discord.widgets.auth;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetOauth2Authorize.kt */
public final class WidgetOauth2Authorize$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetOauth2Authorize$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetOauth2Authorize this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -17,13 +18,13 @@ public final class WidgetOauth2Authorize$captchaLauncher$1 extends o implements
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
m.checkNotNullParameter(str, "token");
WidgetOauth2Authorize.access$authorizeApplication(this.this$0, str);
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetOauth2Authorize.access$authorizeApplication(this.this$0, captchaPayload);
}
}

View File

@ -226,11 +226,14 @@ public class WidgetOauth2Authorize extends AppFragment {
return false;
}
public static /* synthetic */ Observable post$default(OAuth2Authorize oAuth2Authorize, String str, int i, Object obj) {
public static /* synthetic */ Observable post$default(OAuth2Authorize oAuth2Authorize, String str, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
}
return oAuth2Authorize.post(str);
if ((i & 2) != 0) {
str2 = null;
}
return oAuth2Authorize.post(str, str2);
}
public final long component1() {
@ -364,8 +367,8 @@ public class WidgetOauth2Authorize extends AppFragment {
return getHasBotPermission();
}
public final Observable<RestAPIParams.OAuth2Authorize.ResponsePost> post(String str) {
return RestAPI.Companion.getApi().postOauth2Authorize(String.valueOf(this.clientId), this.state, this.responseType, this.redirectUrl, this.prompt, this.scope, this.permissions, this.codeChallenge, this.codeChallengeMethod, h0.plus(g0.mapOf(o.to("authorize", "true")), str != null ? g0.mapOf(o.to(CaptchaHelper.CAPTCHA_KEY, str)) : h0.emptyMap()));
public final Observable<RestAPIParams.OAuth2Authorize.ResponsePost> post(String str, String str2) {
return RestAPI.Companion.getApi().postOauth2Authorize(String.valueOf(this.clientId), this.state, this.responseType, this.redirectUrl, this.prompt, this.scope, this.permissions, this.codeChallenge, this.codeChallengeMethod, h0.plus(h0.plus(g0.mapOf(o.to("authorize", "true")), str != null ? g0.mapOf(o.to(CaptchaHelper.CAPTCHA_KEY, str)) : h0.emptyMap()), str2 != null ? g0.mapOf(o.to("captcha_rqtoken", str2)) : h0.emptyMap()));
}
public String toString() {
@ -478,16 +481,16 @@ public class WidgetOauth2Authorize extends AppFragment {
this.adapter = new SimpleRecyclerAdapter<>(null, WidgetOauth2Authorize$adapter$1.INSTANCE, 1, null);
}
public static final /* synthetic */ void access$authorizeApplication(WidgetOauth2Authorize widgetOauth2Authorize, String str) {
widgetOauth2Authorize.authorizeApplication(str);
public static final /* synthetic */ void access$authorizeApplication(WidgetOauth2Authorize widgetOauth2Authorize, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetOauth2Authorize.authorizeApplication(captchaPayload);
}
public static final /* synthetic */ ValidationManager access$getValidationManager$p(WidgetOauth2Authorize widgetOauth2Authorize) {
return widgetOauth2Authorize.getValidationManager();
}
private final void authorizeApplication(String str) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(getOauth2ViewModel().getOauthAuthorize().post(str), false, 1, null), this, null, 2, null), getClass(), (Context) null, (Function1) null, new WidgetOauth2Authorize$authorizeApplication$1(this), (Function0) null, (Function0) null, new WidgetOauth2Authorize$authorizeApplication$2(this), 54, (Object) null);
private final void authorizeApplication(CaptchaHelper.CaptchaPayload captchaPayload) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(getOauth2ViewModel().getOauthAuthorize().post(captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null), false, 1, null), this, null, 2, null), getClass(), (Context) null, (Function1) null, new WidgetOauth2Authorize$authorizeApplication$1(this), (Function0) null, (Function0) null, new WidgetOauth2Authorize$authorizeApplication$2(this), 54, (Object) null);
}
private final void configureAgeNoticeUI(long j) {

View File

@ -1,12 +1,13 @@
package com.discord.widgets.auth;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.widgets.auth.WidgetOauth2AuthorizeSamsung;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetOauth2AuthorizeSamsung.kt */
public final class WidgetOauth2AuthorizeSamsung$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetOauth2AuthorizeSamsung$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetOauth2AuthorizeSamsung this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -18,16 +19,16 @@ public final class WidgetOauth2AuthorizeSamsung$captchaLauncher$1 extends o impl
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
m.checkNotNullParameter(str, "token");
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(captchaPayload, "captchaPayload");
String access$getSamsungAuthCode$p = WidgetOauth2AuthorizeSamsung.access$getSamsungAuthCode$p(this.this$0);
if (access$getSamsungAuthCode$p != null) {
WidgetOauth2AuthorizeSamsung.access$authorizeForSamsung(this.this$0, access$getSamsungAuthCode$p, str);
WidgetOauth2AuthorizeSamsung.access$authorizeForSamsung(this.this$0, access$getSamsungAuthCode$p, captchaPayload);
} else {
WidgetOauth2AuthorizeSamsung.Companion.logW$default(WidgetOauth2AuthorizeSamsung.Companion, "auth code not set", null, 2, null);
}

View File

@ -14,6 +14,7 @@ import com.discord.app.AppLog;
import com.discord.restapi.RestAPIParams;
import com.discord.samsung.SamsungConnect$SamsungCallbackException;
import com.discord.samsung.SamsungConnectActivity;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.widgets.auth.WidgetOauth2Authorize;
@ -100,8 +101,8 @@ public final class WidgetOauth2AuthorizeSamsung extends WidgetOauth2Authorize {
this.samsungDisclaimerLauncher = registerForActivityResult2;
}
public static final /* synthetic */ void access$authorizeForSamsung(WidgetOauth2AuthorizeSamsung widgetOauth2AuthorizeSamsung, String str, String str2) {
widgetOauth2AuthorizeSamsung.authorizeForSamsung(str, str2);
public static final /* synthetic */ void access$authorizeForSamsung(WidgetOauth2AuthorizeSamsung widgetOauth2AuthorizeSamsung, String str, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetOauth2AuthorizeSamsung.authorizeForSamsung(str, captchaPayload);
}
public static final /* synthetic */ String access$getSamsungAuthCode$p(WidgetOauth2AuthorizeSamsung widgetOauth2AuthorizeSamsung) {
@ -128,8 +129,8 @@ public final class WidgetOauth2AuthorizeSamsung extends WidgetOauth2Authorize {
widgetOauth2AuthorizeSamsung.samsungAuthCode = str;
}
private final void authorizeForSamsung(String str, String str2) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(getOauth2ViewModel().getOauthAuthorize().post(str2), false, 1, null), this, null, 2, null), WidgetOauth2AuthorizeSamsung.class, (Context) null, (Function1) null, new WidgetOauth2AuthorizeSamsung$authorizeForSamsung$1(this), (Function0) null, (Function0) null, new WidgetOauth2AuthorizeSamsung$authorizeForSamsung$2(this, str), 54, (Object) null);
private final void authorizeForSamsung(String str, CaptchaHelper.CaptchaPayload captchaPayload) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(getOauth2ViewModel().getOauthAuthorize().post(captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null), false, 1, null), this, null, 2, null), WidgetOauth2AuthorizeSamsung.class, (Context) null, (Function1) null, new WidgetOauth2AuthorizeSamsung$authorizeForSamsung$1(this), (Function0) null, (Function0) null, new WidgetOauth2AuthorizeSamsung$authorizeForSamsung$2(this, str), 54, (Object) null);
}
private final void handleConnectActivityFailure(SamsungConnectActivity.Result.Failure failure) {

View File

@ -3,6 +3,7 @@ package com.discord.widgets.captcha;
import android.content.Intent;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetCaptcha.kt */
@ -17,9 +18,14 @@ public final class WidgetCaptcha$Companion$registerForResult$1<O> implements Act
m.checkNotNullExpressionValue(activityResult, "activityResult");
if (activityResult.getResultCode() == -1) {
Intent data = activityResult.getData();
String stringExtra = data != null ? data.getStringExtra("RESULT_EXTRA_CAPTCHA") : null;
String str = null;
String stringExtra = data != null ? data.getStringExtra("RESULT_EXTRA_TOKEN") : null;
Intent data2 = activityResult.getData();
if (data2 != null) {
str = data2.getStringExtra("RESULT_EXTRA_RQTOKEN");
}
if (stringExtra != null) {
this.$callback.invoke(stringExtra);
this.$callback.invoke(new CaptchaHelper.CaptchaPayload(stringExtra, str));
}
}
}

View File

@ -31,7 +31,8 @@ public class WidgetCaptcha extends AppFragment {
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.b0(WidgetCaptcha.class, "binding", "getBinding()Lcom/discord/databinding/WidgetCaptchaBinding;", 0)};
public static final Companion Companion = new Companion(null);
private static final String EXTRA_CAPTCHA_ERROR_BODY = "EXTRA_CAPTCHA_ERROR_BODY";
private static final String RESULT_EXTRA_TOKEN = "RESULT_EXTRA_CAPTCHA";
private static final String RESULT_EXTRA_RQTOKEN = "RESULT_EXTRA_RQTOKEN";
private static final String RESULT_EXTRA_TOKEN = "RESULT_EXTRA_TOKEN";
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetCaptcha$binding$2.INSTANCE, null, 2, null);
/* compiled from: WidgetCaptcha.kt */
@ -62,7 +63,7 @@ public class WidgetCaptcha extends AppFragment {
}
}
public final ActivityResultLauncher<Intent> registerForResult(AppFragment appFragment, Function1<? super String, Unit> function1) {
public final ActivityResultLauncher<Intent> registerForResult(AppFragment appFragment, Function1<? super CaptchaHelper.CaptchaPayload, Unit> function1) {
m.checkNotNullParameter(appFragment, "fragment");
m.checkNotNullParameter(function1, "callback");
ActivityResultLauncher<Intent> registerForActivityResult = appFragment.registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new WidgetCaptcha$Companion$registerForResult$1(function1));
@ -83,10 +84,13 @@ public class WidgetCaptcha extends AppFragment {
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
String captchaToken = captchaHelper.getCaptchaToken();
if (captchaToken != null) {
String captchaRqtoken = captchaHelper.getCaptchaRqtoken();
captchaHelper.setCaptchaToken(null);
captchaHelper.setCaptchaRqtoken(null);
trackTransition$default(this, "submitted", null, 2, null);
Intent intent = new Intent();
intent.putExtra(RESULT_EXTRA_TOKEN, captchaToken);
intent.putExtra(RESULT_EXTRA_RQTOKEN, captchaRqtoken);
activity.setResult(-1, intent);
activity.finish();
}
@ -127,6 +131,8 @@ public class WidgetCaptcha extends AppFragment {
CaptchaErrorBody captchaErrorBody = (CaptchaErrorBody) serializableExtra;
String captchaSitekey = captchaErrorBody != null ? captchaErrorBody.getCaptchaSitekey() : null;
CaptchaService captchaService = captchaErrorBody != null ? captchaErrorBody.getCaptchaService() : null;
String captchaRqdata = captchaErrorBody != null ? captchaErrorBody.getCaptchaRqdata() : null;
CaptchaHelper.INSTANCE.setCaptchaRqtoken(captchaErrorBody != null ? captchaErrorBody.getCaptchaRqtoken() : null);
if (captchaSitekey == null || captchaService != CaptchaService.HCAPTCHA) {
FragmentActivity requireActivity = requireActivity();
m.checkNotNullExpressionValue(requireActivity, "requireActivity()");
@ -134,7 +140,7 @@ public class WidgetCaptcha extends AppFragment {
} else {
FragmentActivity requireActivity2 = requireActivity();
m.checkNotNullExpressionValue(requireActivity2, "requireActivity()");
captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2);
captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2, captchaRqdata);
}
String string = captchaRequest instanceof CaptchaHelper.CaptchaRequest.HCaptcha ? getString(R.string.verify_by_hcaptcha) : getString(R.string.verify_by_recaptcha);
m.checkNotNullExpressionValue(string, "when (captchaRequest) {\n…erify_by_recaptcha)\n }");

View File

@ -21,7 +21,7 @@ import kotlin.jvm.functions.Function2;
public final class WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1 extends o implements Function1<FragmentActivity, Boolean> {
public final /* synthetic */ CaptchaErrorBody $error;
public final /* synthetic */ Function0 $onCaptchaAttemptFailed;
public final /* synthetic */ Function2 $onCaptchaTokenReceived;
public final /* synthetic */ Function2 $onCaptchaPayloadReceived;
public final /* synthetic */ String $requestKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -30,7 +30,7 @@ public final class WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1 ex
this.$requestKey = str;
this.$error = captchaErrorBody;
this.$onCaptchaAttemptFailed = function0;
this.$onCaptchaTokenReceived = function2;
this.$onCaptchaPayloadReceived = function2;
}
/* Return type fixed from 'java.lang.Object' to match base method */
@ -67,7 +67,7 @@ public final class WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1 ex
if (fragment == null) {
return true;
}
WidgetCaptchaBottomSheet.Companion.registerForResult((AppFragment) fragment, this.$requestKey, this.$onCaptchaTokenReceived);
WidgetCaptchaBottomSheet.Companion.registerForResult((AppFragment) fragment, this.$requestKey, this.$onCaptchaPayloadReceived);
return true;
}
}

View File

@ -2,6 +2,7 @@ package com.discord.widgets.captcha;
import android.os.Bundle;
import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
@ -9,14 +10,14 @@ import kotlin.jvm.functions.Function2;
/* compiled from: WidgetCaptchaBottomSheet.kt */
public final class WidgetCaptchaBottomSheet$Companion$registerForResult$1 extends o implements Function2<String, Bundle, Unit> {
public final /* synthetic */ AppFragment $fragment;
public final /* synthetic */ Function2 $onCaptchaTokenReceived;
public final /* synthetic */ Function2 $onCaptchaPayloadReceived;
public final /* synthetic */ String $requestKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetCaptchaBottomSheet$Companion$registerForResult$1(String str, Function2 function2, AppFragment appFragment) {
super(2);
this.$requestKey = str;
this.$onCaptchaTokenReceived = function2;
this.$onCaptchaPayloadReceived = function2;
this.$fragment = appFragment;
}
@ -29,11 +30,14 @@ public final class WidgetCaptchaBottomSheet$Companion$registerForResult$1 extend
}
public final void invoke(String str, Bundle bundle) {
String string;
m.checkNotNullParameter(str, "resultRequestKey");
m.checkNotNullParameter(bundle, "bundle");
if (m.areEqual(this.$requestKey, str) && (string = bundle.getString("INTENT_EXTRA_CAPTCHA_TOKEN", "")) != null && (!m.areEqual(string, ""))) {
this.$onCaptchaTokenReceived.invoke(this.$fragment, string);
if (m.areEqual(this.$requestKey, str)) {
String string = bundle.getString("INTENT_EXTRA_CAPTCHA_TOKEN", "");
String string2 = bundle.getString("INTENT_EXTRA_CAPTCHA_RQTOKEN", "");
if (string != null && (!m.areEqual(string, ""))) {
this.$onCaptchaPayloadReceived.invoke(this.$fragment, new CaptchaHelper.CaptchaPayload(string, string2));
}
}
}
}

View File

@ -47,6 +47,7 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
private static final String ARG_REQUEST_KEY = "INTENT_EXTRA_REQUEST_CODE";
public static final Companion Companion = new Companion(null);
private static final String NOTICE_NAME = "captcha notice";
private static final String RESULT_EXTRA_CAPTCHA_RQTOKEN = "INTENT_EXTRA_CAPTCHA_RQTOKEN";
private static final String RESULT_EXTRA_CAPTCHA_TOKEN = "INTENT_EXTRA_CAPTCHA_TOKEN";
private static final List<c<? extends AppFragment>> resolvableFragments = n.listOf((Object[]) new c[]{a0.getOrCreateKotlinClass(WidgetTabsHost.class), a0.getOrCreateKotlinClass(WidgetIncomingShare.class)});
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetCaptchaBottomSheet$binding$2.INSTANCE, null, 2, null);
@ -82,16 +83,16 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
companion.show(fragmentManager, str, captchaErrorBody, function0);
}
public final void enqueue(String str, Function2<? super AppFragment, ? super String, Unit> function2, Function0<Unit> function0, CaptchaErrorBody captchaErrorBody) {
public final void enqueue(String str, Function2<? super AppFragment, ? super CaptchaHelper.CaptchaPayload, Unit> function2, Function0<Unit> function0, CaptchaErrorBody captchaErrorBody) {
m.checkNotNullParameter(str, "requestKey");
m.checkNotNullParameter(function2, "onCaptchaTokenReceived");
m.checkNotNullParameter(function2, "onCaptchaPayloadReceived");
StoreStream.Companion.getNotices().requestToShow(new StoreNotices.Notice(WidgetCaptchaBottomSheet.NOTICE_NAME, null, 0, 0, false, WidgetCaptchaBottomSheet.access$getResolvableFragments$cp(), 0, false, 0, new WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1(str, captchaErrorBody, function0, function2), FontUtils.MAX_FONT_SCALING, null));
}
public final void registerForResult(AppFragment appFragment, String str, Function2<? super AppFragment, ? super String, Unit> function2) {
public final void registerForResult(AppFragment appFragment, String str, Function2<? super AppFragment, ? super CaptchaHelper.CaptchaPayload, Unit> function2) {
m.checkNotNullParameter(appFragment, "fragment");
m.checkNotNullParameter(str, "requestKey");
m.checkNotNullParameter(function2, "onCaptchaTokenReceived");
m.checkNotNullParameter(function2, "onCaptchaPayloadReceived");
FragmentKt.setFragmentResultListener(appFragment, str, new WidgetCaptchaBottomSheet$Companion$registerForResult$1(str, function2, appFragment));
}
@ -161,10 +162,13 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
String captchaToken = captchaHelper.getCaptchaToken();
if (captchaToken != null) {
String captchaRqtoken = captchaHelper.getCaptchaRqtoken();
captchaHelper.setCaptchaToken(null);
captchaHelper.setCaptchaRqtoken(null);
String requestCode = getRequestCode();
Bundle bundle = new Bundle();
bundle.putString(RESULT_EXTRA_CAPTCHA_TOKEN, captchaToken);
bundle.putString(RESULT_EXTRA_CAPTCHA_RQTOKEN, captchaRqtoken);
FragmentKt.setFragmentResult(this, requestCode, bundle);
dismiss();
}
@ -186,6 +190,10 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
CaptchaHelper.CaptchaRequest captchaRequest;
String captchaSitekey = getCaptchaErrorBody().getCaptchaSitekey();
CaptchaService captchaService = getCaptchaErrorBody().getCaptchaService();
String captchaRqdata = getCaptchaErrorBody().getCaptchaRqdata();
String captchaRqtoken = getCaptchaErrorBody().getCaptchaRqtoken();
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
captchaHelper.setCaptchaRqtoken(captchaRqtoken);
if (captchaSitekey == null || captchaService != CaptchaService.HCAPTCHA) {
FragmentActivity requireActivity = requireActivity();
m.checkNotNullExpressionValue(requireActivity, "requireActivity()");
@ -193,9 +201,9 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
} else {
FragmentActivity requireActivity2 = requireActivity();
m.checkNotNullExpressionValue(requireActivity2, "requireActivity()");
captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2);
captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2, captchaRqdata);
}
ObservableExtensionsKt.appSubscribe$default(CaptchaHelper.INSTANCE.tryShowCaptcha(captchaRequest), WidgetCaptchaBottomSheet.class, (Context) null, (Function1) null, new WidgetCaptchaBottomSheet$openCaptcha$2(this), (Function0) null, (Function0) null, new WidgetCaptchaBottomSheet$openCaptcha$1(this), 54, (Object) null);
ObservableExtensionsKt.appSubscribe$default(captchaHelper.tryShowCaptcha(captchaRequest), WidgetCaptchaBottomSheet.class, (Context) null, (Function1) null, new WidgetCaptchaBottomSheet$openCaptcha$2(this), (Function0) null, (Function0) null, new WidgetCaptchaBottomSheet$openCaptcha$1(this), 54, (Object) null);
}
@Override // com.discord.app.AppBottomSheet

View File

@ -25,6 +25,7 @@ import com.discord.api.permission.Permission;
import com.discord.api.role.GuildRole;
import com.discord.api.user.User;
import com.discord.api.utcdatetime.UtcDateTime;
import com.discord.app.AppLog;
import com.discord.models.member.GuildMember;
import com.discord.models.message.Message;
import com.discord.models.user.CoreUser;
@ -37,6 +38,7 @@ import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.guilds.PublicGuildUtils;
import com.discord.utilities.icon.IconUtils;
import com.discord.utilities.images.MGImages;
import com.discord.utilities.logging.Logger;
import com.discord.utilities.message.MessageUtils;
import com.discord.utilities.permissions.PermissionUtils;
import com.discord.utilities.textprocessing.DiscordParser;
@ -398,8 +400,11 @@ public final class WidgetChatListAdapterItemMessage extends WidgetChatListItem {
configureReplyLayoutDirection();
} else if (message2.hasStickers()) {
configureReplyContentWithResourceId(R.string.reply_quote_sticker_mobile);
} else if (message2.hasAttachments() || message2.hasEmbeds()) {
} else if (message2.hasAttachments() || message2.shouldShowReplyPreviewAsAttachment() || message2.hasEmbeds()) {
configureReplyContentWithResourceId(R.string.reply_quote_no_text_content_mobile);
} else {
AppLog appLog = AppLog.g;
Logger.e$default(appLog, "Unhandled reply preview: " + messageEntry2, null, null, 6, null);
}
}
}

View File

@ -1,11 +1,12 @@
package com.discord.widgets.contact_sync;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetContactSync.kt */
public final class WidgetContactSync$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetContactSync$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetContactSync this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -17,13 +18,13 @@ public final class WidgetContactSync$captchaLauncher$1 extends o implements Func
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
m.checkNotNullParameter(str, "token");
WidgetContactSync.access$submitPhoneNumber(this.this$0, str);
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetContactSync.access$submitPhoneNumber(this.this$0, captchaPayload);
}
}

View File

@ -24,6 +24,7 @@ import com.discord.app.LoggingConfig;
import com.discord.databinding.WidgetContactSyncBinding;
import com.discord.utilities.accessibility.AccessibilityUtils;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.contacts.ContactsProviderUtils;
import com.discord.utilities.error.Error;
import com.discord.utilities.mg_recycler.MGRecyclerAdapter;
@ -160,8 +161,8 @@ public final class WidgetContactSync extends AppFragment {
widgetContactSync.displayedChildIndex = i;
}
public static final /* synthetic */ void access$submitPhoneNumber(WidgetContactSync widgetContactSync, String str) {
widgetContactSync.submitPhoneNumber(str);
public static final /* synthetic */ void access$submitPhoneNumber(WidgetContactSync widgetContactSync, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetContactSync.submitPhoneNumber(captchaPayload);
}
private final void configureToolbar(WidgetContactSyncViewModel.ToolbarConfig toolbarConfig) {
@ -357,15 +358,15 @@ public final class WidgetContactSync extends AppFragment {
requestContacts(new WidgetContactSync$requestContactsPermissions$1(this), new WidgetContactSync$requestContactsPermissions$2(this));
}
private final void submitPhoneNumber(String str) {
getViewModel().onPhoneNumberSubmitted(getBinding().f2338b.f120b.getTextOrEmpty(), str);
private final void submitPhoneNumber(CaptchaHelper.CaptchaPayload captchaPayload) {
getViewModel().onPhoneNumberSubmitted(getBinding().f2338b.f120b.getTextOrEmpty(), captchaPayload);
}
public static /* synthetic */ void submitPhoneNumber$default(WidgetContactSync widgetContactSync, String str, int i, Object obj) {
public static /* synthetic */ void submitPhoneNumber$default(WidgetContactSync widgetContactSync, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
captchaPayload = null;
}
widgetContactSync.submitPhoneNumber(str);
widgetContactSync.submitPhoneNumber(captchaPayload);
}
@Override // com.discord.app.AppFragment, com.discord.app.AppLogger.a

View File

@ -21,6 +21,7 @@ import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error;
import com.discord.utilities.mg_recycler.MGRecyclerAdapterSimple;
import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
@ -1315,9 +1316,9 @@ public final class WidgetContactSyncViewModel extends AppViewModel<ViewState> {
}
@MainThread
public final void onPhoneNumberSubmitted(String str, String str2) {
public final void onPhoneNumberSubmitted(String str, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(str, "phoneNumber");
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);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.userAddPhone(new RestAPIParams.Phone(str, WidgetUserPhoneManage.Companion.Source.CONTACT_SYNC.getSource(), captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null)), 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

View File

@ -22,6 +22,7 @@ import com.discord.stores.StoreUserPresence;
import com.discord.stores.StoreUserRelationships;
import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error;
import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
import com.discord.utilities.rest.RestAPI;
@ -1508,11 +1509,11 @@ public final class FriendsListViewModel extends AppViewModel<ViewState> {
this((i & 1) != 0 ? Companion.observeStores() : observable, (i & 2) != 0 ? StoreStream.Companion.getChannels() : storeChannels, (i & 4) != 0 ? RestAPI.Companion.getApi() : restAPI);
}
public static /* synthetic */ void acceptFriendSuggestion$default(FriendsListViewModel friendsListViewModel, String str, int i, String str2, int i2, Object obj) {
public static /* synthetic */ void acceptFriendSuggestion$default(FriendsListViewModel friendsListViewModel, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) {
if ((i2 & 4) != 0) {
str2 = null;
captchaPayload = null;
}
friendsListViewModel.acceptFriendSuggestion(str, i, str2);
friendsListViewModel.acceptFriendSuggestion(str, i, captchaPayload);
}
public static final /* synthetic */ void access$emitCaptchaErrorEvent(FriendsListViewModel friendsListViewModel, Error error, String str, int i) {
@ -1718,9 +1719,9 @@ public final class FriendsListViewModel extends AppViewModel<ViewState> {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.addRelationship$default(this.restAPI, LOCATION, j, null, null, null, 28, null), false, 1, null), this, null, 2, null), FriendsListViewModel.class, (Context) null, (Function1) null, new FriendsListViewModel$acceptFriendRequest$2(this, str), (Function0) null, (Function0) null, new FriendsListViewModel$acceptFriendRequest$1(this), 54, (Object) null);
}
public final void acceptFriendSuggestion(String str, int i, String str2) {
public final void acceptFriendSuggestion(String str, int i, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(str, "username");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().sendRelationshipRequest("Friends List - Friend Suggestion", str, i, str2), false, 1, null), this, null, 2, null), FriendsListViewModel.class, (Context) null, (Function1) null, new FriendsListViewModel$acceptFriendSuggestion$2(this, str, i), (Function0) null, (Function0) null, FriendsListViewModel$acceptFriendSuggestion$1.INSTANCE, 54, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().sendRelationshipRequest("Friends List - Friend Suggestion", str, i, captchaPayload), false, 1, null), this, null, 2, null), FriendsListViewModel.class, (Context) null, (Function1) null, new FriendsListViewModel$acceptFriendSuggestion$2(this, str, i), (Function0) null, (Function0) null, FriendsListViewModel$acceptFriendSuggestion$1.INSTANCE, 54, (Object) null);
}
@MainThread

View File

@ -1,11 +1,12 @@
package com.discord.widgets.friends;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetFriendsAddById.kt */
public final class WidgetFriendsAddById$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetFriendsAddById$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetFriendsAddById this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -17,13 +18,13 @@ public final class WidgetFriendsAddById$captchaLauncher$1 extends o implements F
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
m.checkNotNullParameter(str, "token");
WidgetFriendsAddById.access$extractTargetAndSendFriendRequest(this.this$0, str);
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetFriendsAddById.access$extractTargetAndSendFriendRequest(this.this$0, captchaPayload);
}
}

View File

@ -21,6 +21,7 @@ import com.discord.models.user.User;
import com.discord.stores.StoreStream;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPI;
@ -144,8 +145,8 @@ public final class WidgetFriendsAddById extends AppFragment {
super(R.layout.widget_friends_add_by_id);
}
public static final /* synthetic */ void access$extractTargetAndSendFriendRequest(WidgetFriendsAddById widgetFriendsAddById, String str) {
widgetFriendsAddById.extractTargetAndSendFriendRequest(str);
public static final /* synthetic */ void access$extractTargetAndSendFriendRequest(WidgetFriendsAddById widgetFriendsAddById, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetFriendsAddById.extractTargetAndSendFriendRequest(captchaPayload);
}
public static final /* synthetic */ WidgetFriendsAddByIdBinding access$getBinding$p(WidgetFriendsAddById widgetFriendsAddById) {
@ -164,13 +165,13 @@ public final class WidgetFriendsAddById extends AppFragment {
widgetFriendsAddById.setInputEditError(charSequence);
}
private final void extractTargetAndSendFriendRequest(String str) {
private final void extractTargetAndSendFriendRequest(CaptchaHelper.CaptchaPayload captchaPayload) {
TextInputLayout textInputLayout = getBinding().e;
m.checkNotNullExpressionValue(textInputLayout, "binding.friendsAddTextEditWrap");
String textOrEmpty = ViewExtensions.getTextOrEmpty(textInputLayout);
Companion.UserNameDiscriminator access$extractUsernameAndDiscriminator = Companion.access$extractUsernameAndDiscriminator(Companion, textOrEmpty);
if (access$extractUsernameAndDiscriminator.getDiscriminator() != null) {
sendFriendRequest(access$extractUsernameAndDiscriminator.getUsername(), access$extractUsernameAndDiscriminator.getDiscriminator().intValue(), str);
sendFriendRequest(access$extractUsernameAndDiscriminator.getUsername(), access$extractUsernameAndDiscriminator.getDiscriminator().intValue(), captchaPayload);
return;
}
Context context = getContext();
@ -182,11 +183,11 @@ public final class WidgetFriendsAddById extends AppFragment {
AnalyticsTracker.INSTANCE.friendRequestFailed(textOrEmpty, access$extractUsernameAndDiscriminator.getUsername(), access$extractUsernameAndDiscriminator.getDiscriminator(), "Invalid Username");
}
public static /* synthetic */ void extractTargetAndSendFriendRequest$default(WidgetFriendsAddById widgetFriendsAddById, String str, int i, Object obj) {
public static /* synthetic */ void extractTargetAndSendFriendRequest$default(WidgetFriendsAddById widgetFriendsAddById, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
captchaPayload = null;
}
widgetFriendsAddById.extractTargetAndSendFriendRequest(str);
widgetFriendsAddById.extractTargetAndSendFriendRequest(captchaPayload);
}
private final WidgetFriendsAddByIdBinding getBinding() {
@ -208,15 +209,15 @@ public final class WidgetFriendsAddById extends AppFragment {
WidgetCaptcha.Companion.launch(requireContext(), this.captchaLauncher, CaptchaErrorBody.Companion.createFromError(error));
}
private final void sendFriendRequest(String str, int i, String str2) {
ObservableExtensionsKt.ui$default(RestAPI.Companion.getApi().sendRelationshipRequest("Search - Add Friend Search", str, i, str2), this, null, 2, null).k(o.h(new WidgetFriendsAddById$sendFriendRequest$1(this, str), getAppActivity(), new WidgetFriendsAddById$sendFriendRequest$2(this, str, i)));
private final void sendFriendRequest(String str, int i, CaptchaHelper.CaptchaPayload captchaPayload) {
ObservableExtensionsKt.ui$default(RestAPI.Companion.getApi().sendRelationshipRequest("Search - Add Friend Search", str, i, captchaPayload), this, null, 2, null).k(o.h(new WidgetFriendsAddById$sendFriendRequest$1(this, str), getAppActivity(), new WidgetFriendsAddById$sendFriendRequest$2(this, str, i)));
}
public static /* synthetic */ void sendFriendRequest$default(WidgetFriendsAddById widgetFriendsAddById, String str, int i, String str2, int i2, Object obj) {
public static /* synthetic */ void sendFriendRequest$default(WidgetFriendsAddById widgetFriendsAddById, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) {
if ((i2 & 4) != 0) {
str2 = null;
captchaPayload = null;
}
widgetFriendsAddById.sendFriendRequest(str, i, str2);
widgetFriendsAddById.sendFriendRequest(str, i, captchaPayload);
}
private final void setInputEditError(CharSequence charSequence) {

View File

@ -1,11 +1,12 @@
package com.discord.widgets.friends;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetFriendsFindNearby.kt */
public final class WidgetFriendsFindNearby$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetFriendsFindNearby$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetFriendsFindNearby this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -17,17 +18,17 @@ public final class WidgetFriendsFindNearby$captchaLauncher$1 extends o implement
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
Integer discriminator;
m.checkNotNullParameter(str, "token");
m.checkNotNullParameter(captchaPayload, "token");
String username = WidgetFriendsFindNearby.access$getViewModel$p(this.this$0).getUsername();
if (username != null && (discriminator = WidgetFriendsFindNearby.access$getViewModel$p(this.this$0).getDiscriminator()) != null) {
WidgetFriendsFindNearby.access$sendFriendRequest(this.this$0, username, discriminator.intValue(), str);
WidgetFriendsFindNearby.access$sendFriendRequest(this.this$0, username, discriminator.intValue(), captchaPayload);
}
}
}

View File

@ -22,6 +22,7 @@ import com.discord.stores.StoreStream;
import com.discord.utilities.accessibility.AccessibilityUtils;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.dimen.DimenUtils;
import com.discord.utilities.error.Error;
@ -257,8 +258,8 @@ public final class WidgetFriendsFindNearby extends AppFragment {
widgetFriendsFindNearby.launchCaptchaFlow(error);
}
public static final /* synthetic */ void access$sendFriendRequest(WidgetFriendsFindNearby widgetFriendsFindNearby, String str, int i, String str2) {
widgetFriendsFindNearby.sendFriendRequest(str, i, str2);
public static final /* synthetic */ void access$sendFriendRequest(WidgetFriendsFindNearby widgetFriendsFindNearby, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetFriendsFindNearby.sendFriendRequest(str, i, captchaPayload);
}
public static final /* synthetic */ void access$setResultsAdapter$p(WidgetFriendsFindNearby widgetFriendsFindNearby, WidgetFriendsAddUserAdapter widgetFriendsAddUserAdapter) {
@ -411,17 +412,17 @@ public final class WidgetFriendsFindNearby extends AppFragment {
WidgetCaptcha.Companion.launch(requireContext(), this.captchaLauncher, CaptchaErrorBody.Companion.createFromError(error));
}
private final void sendFriendRequest(String str, int i, String str2) {
private final void sendFriendRequest(String str, int i, CaptchaHelper.CaptchaPayload captchaPayload) {
getViewModel().setUsername(str);
getViewModel().setDiscriminator(Integer.valueOf(i));
ObservableExtensionsKt.ui$default(RestAPI.Companion.getApi().sendRelationshipRequest("Nearby - Add Friend Suggestion", str, i, str2), this, null, 2, null).k(o.h(new WidgetFriendsFindNearby$sendFriendRequest$1(this, str), getAppActivity(), new WidgetFriendsFindNearby$sendFriendRequest$2(this, str, i)));
ObservableExtensionsKt.ui$default(RestAPI.Companion.getApi().sendRelationshipRequest("Nearby - Add Friend Suggestion", str, i, captchaPayload), this, null, 2, null).k(o.h(new WidgetFriendsFindNearby$sendFriendRequest$1(this, str), getAppActivity(), new WidgetFriendsFindNearby$sendFriendRequest$2(this, str, i)));
}
public static /* synthetic */ void sendFriendRequest$default(WidgetFriendsFindNearby widgetFriendsFindNearby, String str, int i, String str2, int i2, Object obj) {
public static /* synthetic */ void sendFriendRequest$default(WidgetFriendsFindNearby widgetFriendsFindNearby, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) {
if ((i2 & 4) != 0) {
str2 = null;
captchaPayload = null;
}
widgetFriendsFindNearby.sendFriendRequest(str, i, str2);
widgetFriendsFindNearby.sendFriendRequest(str, i, captchaPayload);
}
private final void updateMeUserIdAndInitNearbyManager() {

View File

@ -1,13 +1,14 @@
package com.discord.widgets.friends;
import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.widgets.friends.FriendsListViewModel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function2;
/* compiled from: WidgetFriendsList.kt */
public final class WidgetFriendsList$handleCaptchaError$1 extends o implements Function2<AppFragment, String, Unit> {
public final class WidgetFriendsList$handleCaptchaError$1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ FriendsListViewModel.Event.CaptchaError $event;
public final /* synthetic */ WidgetFriendsList this$0;
@ -21,14 +22,14 @@ public final class WidgetFriendsList$handleCaptchaError$1 extends o implements F
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, str);
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(appFragment, captchaPayload);
return Unit.a;
}
public final void invoke(AppFragment appFragment, String str) {
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(str, "captchaToken");
WidgetFriendsList.access$getViewModel$p(this.this$0).acceptFriendSuggestion(this.$event.getUsername(), this.$event.getDiscriminator(), str);
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetFriendsList.access$getViewModel$p(this.this$0).acceptFriendSuggestion(this.$event.getUsername(), this.$event.getDiscriminator(), captchaPayload);
}
}

View File

@ -15,6 +15,7 @@ import com.discord.app.AppFragment;
import com.discord.models.domain.ModelInvite;
import com.discord.restapi.RestAPIParams;
import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.channel.ChannelSelector;
import com.discord.utilities.coroutines.RxCoroutineExtensionsKt;
import com.discord.utilities.error.AppCancellationException;
@ -44,9 +45,9 @@ import kotlin.jvm.internal.Ref$ObjectRef;
import kotlinx.coroutines.CoroutineScope;
import retrofit2.HttpException;
/* compiled from: InviteJoinHelper.kt */
@e(c = "com.discord.widgets.guilds.invite.InviteJoinHelper$joinViaInvite$4", f = "InviteJoinHelper.kt", l = {78, 103, 112, 113, 127, 166, 195}, m = "invokeSuspend")
@e(c = "com.discord.widgets.guilds.invite.InviteJoinHelper$joinViaInvite$4", f = "InviteJoinHelper.kt", l = {79, 104, 117, 118, 132, 171, 200}, m = "invokeSuspend")
public final class InviteJoinHelper$joinViaInvite$4 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public final /* synthetic */ String $captchaKey;
public final /* synthetic */ CaptchaHelper.CaptchaPayload $captchaPayload;
public final /* synthetic */ AppFragment $fragment;
public final /* synthetic */ ModelInvite $invite;
public final /* synthetic */ Class $javaClass;
@ -61,13 +62,13 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
public int label;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public InviteJoinHelper$joinViaInvite$4(AppFragment appFragment, ModelInvite modelInvite, String str, Function2 function2, String str2, Class cls, Function2 function22, Function2 function23, Continuation continuation) {
public InviteJoinHelper$joinViaInvite$4(AppFragment appFragment, ModelInvite modelInvite, String str, Function2 function2, CaptchaHelper.CaptchaPayload captchaPayload, Class cls, Function2 function22, Function2 function23, Continuation continuation) {
super(2, continuation);
this.$fragment = appFragment;
this.$invite = modelInvite;
this.$location = str;
this.$onInvitePostSuccess = function2;
this.$captchaKey = str2;
this.$captchaPayload = captchaPayload;
this.$javaClass = cls;
this.$onInvitePostError = function22;
this.$onInviteFlowFinished = function23;
@ -76,7 +77,7 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
@Override // d0.w.i.a.a
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
m.checkNotNullParameter(continuation, "completion");
return new InviteJoinHelper$joinViaInvite$4(this.$fragment, this.$invite, this.$location, this.$onInvitePostSuccess, this.$captchaKey, this.$javaClass, this.$onInvitePostError, this.$onInviteFlowFinished, continuation);
return new InviteJoinHelper$joinViaInvite$4(this.$fragment, this.$invite, this.$location, this.$onInvitePostSuccess, this.$captchaPayload, this.$javaClass, this.$onInvitePostError, this.$onInviteFlowFinished, continuation);
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@ -85,21 +86,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: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:102:0x024d A[RETURN] */
/* JADX WARNING: Removed duplicated region for block: B:103:0x024e */
/* JADX WARNING: Removed duplicated region for block: B:112:0x0285 */
/* JADX WARNING: Removed duplicated region for block: B:125:0x02d0 */
/* JADX WARNING: Removed duplicated region for block: B:129:0x02df */
/* JADX WARNING: Removed duplicated region for block: B:159:0x0370 */
/* JADX WARNING: Removed duplicated region for block: B:160:0x037e */
/* JADX WARNING: Removed duplicated region for block: B:172:0x03d2 */
/* JADX WARNING: Removed duplicated region for block: B:175:0x03e5 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) {
@ -332,13 +333,20 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
}
return Unit.a;
}
RestAPI api = RestAPI.Companion.getApi();
ModelInvite modelInvite6 = this.$invite;
String str2 = this.$location;
CaptchaHelper.CaptchaPayload captchaPayload = this.$captchaPayload;
String captchaKey = captchaPayload != null ? captchaPayload.getCaptchaKey() : null;
CaptchaHelper.CaptchaPayload captchaPayload2 = this.$captchaPayload;
String captchaRqtoken = captchaPayload2 != null ? captchaPayload2.getCaptchaRqtoken() : null;
Boolean boxBoolean3 = b.boxBoolean(true);
this.L$0 = ref$ObjectRef2;
this.L$1 = modelInvite4;
this.L$2 = null;
this.L$3 = null;
this.label = 3;
obj3 = RxCoroutineExtensionsKt.appAwaitSingle(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().postInviteCode(this.$invite, this.$location, new RestAPIParams.InviteCode(this.$captchaKey)), false, 1, null)), ref$ObjectRef2.element, boxBoolean3, this);
obj3 = RxCoroutineExtensionsKt.appAwaitSingle(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(api.postInviteCode(modelInvite6, str2, new RestAPIParams.InviteCode(captchaKey, captchaRqtoken)), false, 1, null)), ref$ObjectRef2.element, boxBoolean3, this);
if (obj3 == coroutine_suspended) {
return coroutine_suspended;
}
@ -479,7 +487,7 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
}
return Unit.a;
case 3:
ModelInvite modelInvite6 = (ModelInvite) this.L$1;
ModelInvite modelInvite7 = (ModelInvite) this.L$1;
ref$ObjectRef2 = (Ref$ObjectRef) this.L$0;
l.throwOnFailure(obj);
obj3 = obj;

View File

@ -13,6 +13,7 @@ import com.discord.app.AppFragment;
import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.models.domain.ModelInvite;
import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.channel.ChannelSelector;
import com.discord.utilities.coroutines.AppCoroutineScopeKt;
import com.discord.utilities.error.Error;
@ -43,8 +44,8 @@ public final class InviteJoinHelper {
inviteJoinHelper.navigateToGuild(modelInvite);
}
public static /* synthetic */ Job joinViaInvite$default(InviteJoinHelper inviteJoinHelper, ModelInvite modelInvite, Class cls, AppFragment appFragment, String str, Function2 function2, Function2 function22, Function2 function23, String str2, int i, Object obj) {
return inviteJoinHelper.joinViaInvite(modelInvite, cls, appFragment, str, (i & 16) != 0 ? new InviteJoinHelper$joinViaInvite$1(null) : function2, (i & 32) != 0 ? new InviteJoinHelper$joinViaInvite$2(null) : function22, (i & 64) != 0 ? new InviteJoinHelper$joinViaInvite$3(null) : function23, (i & 128) != 0 ? null : str2);
public static /* synthetic */ Job joinViaInvite$default(InviteJoinHelper inviteJoinHelper, ModelInvite modelInvite, Class cls, AppFragment appFragment, String str, Function2 function2, Function2 function22, Function2 function23, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
return inviteJoinHelper.joinViaInvite(modelInvite, cls, appFragment, str, (i & 16) != 0 ? new InviteJoinHelper$joinViaInvite$1(null) : function2, (i & 32) != 0 ? new InviteJoinHelper$joinViaInvite$2(null) : function22, (i & 64) != 0 ? new InviteJoinHelper$joinViaInvite$3(null) : function23, (i & 128) != 0 ? null : captchaPayload);
}
private final void navigateToChannel(Context context, AppFragment appFragment, ModelInvite modelInvite) {
@ -82,7 +83,7 @@ public final class InviteJoinHelper {
}
}
public final Job joinViaInvite(ModelInvite modelInvite, Class<?> cls, AppFragment appFragment, String str, Function2<? super Error, ? super Continuation<? super Unit>, ? extends Object> function2, Function2<? super ModelInvite, ? super Continuation<? super Unit>, ? extends Object> function22, Function2<? super ModelInvite, ? super Continuation<? super Unit>, ? extends Object> function23, String str2) {
public final Job joinViaInvite(ModelInvite modelInvite, Class<?> cls, AppFragment appFragment, String str, Function2<? super Error, ? super Continuation<? super Unit>, ? extends Object> function2, Function2<? super ModelInvite, ? super Continuation<? super Unit>, ? extends Object> function22, Function2<? super ModelInvite, ? super Continuation<? super Unit>, ? extends Object> function23, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(modelInvite, "invite");
m.checkNotNullParameter(cls, "javaClass");
m.checkNotNullParameter(appFragment, "fragment");
@ -92,6 +93,6 @@ public final class InviteJoinHelper {
m.checkNotNullParameter(function23, "onInviteFlowFinished");
LifecycleOwner viewLifecycleOwner = appFragment.getViewLifecycleOwner();
m.checkNotNullExpressionValue(viewLifecycleOwner, "fragment.viewLifecycleOwner");
return AppCoroutineScopeKt.appLaunch$default(LifecycleOwnerKt.getLifecycleScope(viewLifecycleOwner), cls, (CoroutineContext) null, (CoroutineStart) null, new InviteJoinHelper$joinViaInvite$4(appFragment, modelInvite, str, function22, str2, cls, function2, function23, null), 6, (Object) null);
return AppCoroutineScopeKt.appLaunch$default(LifecycleOwnerKt.getLifecycleScope(viewLifecycleOwner), cls, (CoroutineContext) null, (CoroutineStart) null, new InviteJoinHelper$joinViaInvite$4(appFragment, modelInvite, str, function22, captchaPayload, cls, function2, function23, null), 6, (Object) null);
}
}

View File

@ -3,6 +3,7 @@ package com.discord.widgets.guilds.join;
import android.content.Context;
import com.discord.api.guild.Guild;
import com.discord.restapi.RestAPIParams;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
@ -13,14 +14,14 @@ import kotlin.jvm.functions.Function1;
import rx.Subscription;
/* compiled from: GuildJoinHelper.kt */
public final class GuildJoinHelperKt {
public static final void joinGuild(Context context, long j, boolean z2, String str, Long l, String str2, Class<?> cls, Function1<? super Subscription, Unit> function1, Function1<? super Error, Unit> function12, String str3, Function1<? super Guild, Unit> function13) {
public static final void joinGuild(Context context, long j, boolean z2, String str, Long l, String str2, Class<?> cls, Function1<? super Subscription, Unit> function1, Function1<? super Error, Unit> function12, CaptchaHelper.CaptchaPayload captchaPayload, Function1<? super Guild, Unit> function13) {
m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(cls, "errorClass");
m.checkNotNullParameter(function13, "onNext");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().joinGuild(j, z2, str, l, new RestAPIParams.InviteCode(str3), str2), false, 1, null)), cls, (Context) null, function1, new GuildJoinHelperKt$joinGuild$1(context, j, z2, str, l, cls, function1, function12, function13), (Function0) null, (Function0) null, function13, 50, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().joinGuild(j, z2, str, l, new RestAPIParams.InviteCode(captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null), str2), false, 1, null)), cls, (Context) null, function1, new GuildJoinHelperKt$joinGuild$1(context, j, z2, str, l, cls, function1, function12, function13), (Function0) null, (Function0) null, function13, 50, (Object) null);
}
public static /* synthetic */ void joinGuild$default(Context context, long j, boolean z2, String str, Long l, String str2, Class cls, Function1 function1, Function1 function12, String str3, Function1 function13, int i, Object obj) {
joinGuild(context, j, z2, (i & 8) != 0 ? null : str, (i & 16) != 0 ? null : l, (i & 32) != 0 ? null : str2, cls, (i & 128) != 0 ? null : function1, (i & 256) != 0 ? null : function12, (i & 512) != 0 ? null : str3, function13);
public static /* synthetic */ void joinGuild$default(Context context, long j, boolean z2, String str, Long l, String str2, Class cls, Function1 function1, Function1 function12, CaptchaHelper.CaptchaPayload captchaPayload, Function1 function13, int i, Object obj) {
joinGuild(context, j, z2, (i & 8) != 0 ? null : str, (i & 16) != 0 ? null : l, (i & 32) != 0 ? null : str2, cls, (i & 128) != 0 ? null : function1, (i & 256) != 0 ? null : function12, (i & 512) != 0 ? null : captchaPayload, function13);
}
}

View File

@ -19,7 +19,7 @@ import kotlin.jvm.functions.Function2;
/* compiled from: WidgetGuildJoinCaptchaBottomSheet.kt */
public final class WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCaptchaNotice$1 extends o implements Function1<FragmentActivity, Boolean> {
public final /* synthetic */ CaptchaErrorBody $error;
public final /* synthetic */ Function2 $onCaptchaTokenReceived;
public final /* synthetic */ Function2 $onCaptchaPayloadReceived;
public final /* synthetic */ String $requestKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -27,7 +27,7 @@ public final class WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCapt
super(1);
this.$requestKey = str;
this.$error = captchaErrorBody;
this.$onCaptchaTokenReceived = function2;
this.$onCaptchaPayloadReceived = function2;
}
/* Return type fixed from 'java.lang.Object' to match base method */
@ -64,7 +64,7 @@ public final class WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCapt
if (fragment == null) {
return true;
}
WidgetGuildJoinCaptchaBottomSheet.Companion.registerForResult((AppFragment) fragment, this.$requestKey, this.$onCaptchaTokenReceived);
WidgetGuildJoinCaptchaBottomSheet.Companion.registerForResult((AppFragment) fragment, this.$requestKey, this.$onCaptchaPayloadReceived);
return true;
}
}

View File

@ -2,6 +2,7 @@ package com.discord.widgets.guilds.join;
import android.os.Bundle;
import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
@ -9,14 +10,14 @@ import kotlin.jvm.functions.Function2;
/* compiled from: WidgetGuildJoinCaptchaBottomSheet.kt */
public final class WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult$1 extends o implements Function2<String, Bundle, Unit> {
public final /* synthetic */ AppFragment $fragment;
public final /* synthetic */ Function2 $onCaptchaTokenReceived;
public final /* synthetic */ Function2 $onCaptchaPayloadReceived;
public final /* synthetic */ String $requestKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult$1(String str, Function2 function2, AppFragment appFragment) {
super(2);
this.$requestKey = str;
this.$onCaptchaTokenReceived = function2;
this.$onCaptchaPayloadReceived = function2;
this.$fragment = appFragment;
}
@ -29,11 +30,14 @@ public final class WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult
}
public final void invoke(String str, Bundle bundle) {
String string;
m.checkNotNullParameter(str, "resultRequestKey");
m.checkNotNullParameter(bundle, "bundle");
if (m.areEqual(this.$requestKey, str) && (string = bundle.getString("INTENT_EXTRA_CAPTCHA_TOKEN", "")) != null && (!m.areEqual(string, ""))) {
this.$onCaptchaTokenReceived.invoke(this.$fragment, string);
if (m.areEqual(this.$requestKey, str)) {
String string = bundle.getString("INTENT_EXTRA_CAPTCHA_TOKEN", "");
String string2 = bundle.getString("INTENT_EXTRA_CAPTCHA_RQTOKEN", "");
if (string != null && (!m.areEqual(string, ""))) {
this.$onCaptchaPayloadReceived.invoke(this.$fragment, new CaptchaHelper.CaptchaPayload(string, string2));
}
}
}
}

View File

@ -42,6 +42,7 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
private static final String ARG_REQUEST_KEY = "INTENT_EXTRA_REQUEST_CODE";
public static final Companion Companion = new Companion(null);
private static final String NOTICE_NAME = "guild captcha notice";
private static final String RESULT_EXTRA_CAPTCHA_RQTOKEN = "INTENT_EXTRA_CAPTCHA_RQTOKEN";
private static final String RESULT_EXTRA_CAPTCHA_TOKEN = "INTENT_EXTRA_CAPTCHA_TOKEN";
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetGuildJoinCaptchaBottomSheet$binding$2.INSTANCE, null, 2, null);
private final Lazy captchaErrorBody$delegate = g.lazy(new WidgetGuildJoinCaptchaBottomSheet$captchaErrorBody$2(this));
@ -56,16 +57,16 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
this();
}
public final void enqueue(String str, Function2<? super AppFragment, ? super String, Unit> function2, CaptchaErrorBody captchaErrorBody) {
public final void enqueue(String str, Function2<? super AppFragment, ? super CaptchaHelper.CaptchaPayload, Unit> function2, CaptchaErrorBody captchaErrorBody) {
m.checkNotNullParameter(str, "requestKey");
m.checkNotNullParameter(function2, "onCaptchaTokenReceived");
m.checkNotNullParameter(function2, "onCaptchaPayloadReceived");
StoreStream.Companion.getNotices().requestToShow(new StoreNotices.Notice(WidgetGuildJoinCaptchaBottomSheet.NOTICE_NAME, null, 0, 0, false, d0.t.m.listOf(a0.getOrCreateKotlinClass(WidgetTabsHost.class)), 0, false, 0, new WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCaptchaNotice$1(str, captchaErrorBody, function2), FontUtils.MAX_FONT_SCALING, null));
}
public final void registerForResult(AppFragment appFragment, String str, Function2<? super AppFragment, ? super String, Unit> function2) {
public final void registerForResult(AppFragment appFragment, String str, Function2<? super AppFragment, ? super CaptchaHelper.CaptchaPayload, Unit> function2) {
m.checkNotNullParameter(appFragment, "fragment");
m.checkNotNullParameter(str, "requestKey");
m.checkNotNullParameter(function2, "onCaptchaTokenReceived");
m.checkNotNullParameter(function2, "onCaptchaPayloadReceived");
FragmentKt.setFragmentResultListener(appFragment, str, new WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult$1(str, function2, appFragment));
}
@ -114,10 +115,13 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
String captchaToken = captchaHelper.getCaptchaToken();
if (captchaToken != null) {
String captchaRqtoken = captchaHelper.getCaptchaRqtoken();
captchaHelper.setCaptchaToken(null);
captchaHelper.setCaptchaRqtoken(null);
String requestCode = getRequestCode();
Bundle bundle = new Bundle();
bundle.putString(RESULT_EXTRA_CAPTCHA_TOKEN, captchaToken);
bundle.putString(RESULT_EXTRA_CAPTCHA_RQTOKEN, captchaRqtoken);
FragmentKt.setFragmentResult(this, requestCode, bundle);
dismiss();
}
@ -139,6 +143,10 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
CaptchaHelper.CaptchaRequest captchaRequest;
String captchaSitekey = getCaptchaErrorBody().getCaptchaSitekey();
CaptchaService captchaService = getCaptchaErrorBody().getCaptchaService();
String captchaRqdata = getCaptchaErrorBody().getCaptchaRqdata();
String captchaRqtoken = getCaptchaErrorBody().getCaptchaRqtoken();
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
captchaHelper.setCaptchaRqtoken(captchaRqtoken);
if (captchaSitekey == null || captchaService != CaptchaService.HCAPTCHA) {
FragmentActivity requireActivity = requireActivity();
m.checkNotNullExpressionValue(requireActivity, "requireActivity()");
@ -146,9 +154,9 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
} else {
FragmentActivity requireActivity2 = requireActivity();
m.checkNotNullExpressionValue(requireActivity2, "requireActivity()");
captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2);
captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2, captchaRqdata);
}
ObservableExtensionsKt.appSubscribe$default(CaptchaHelper.INSTANCE.tryShowCaptcha(captchaRequest), WidgetGuildJoinCaptchaBottomSheet.class, (Context) null, (Function1) null, new WidgetGuildJoinCaptchaBottomSheet$openCaptcha$2(this), (Function0) null, (Function0) null, new WidgetGuildJoinCaptchaBottomSheet$openCaptcha$1(this), 54, (Object) null);
ObservableExtensionsKt.appSubscribe$default(captchaHelper.tryShowCaptcha(captchaRequest), WidgetGuildJoinCaptchaBottomSheet.class, (Context) null, (Function1) null, new WidgetGuildJoinCaptchaBottomSheet$openCaptcha$2(this), (Function0) null, (Function0) null, new WidgetGuildJoinCaptchaBottomSheet$openCaptcha$1(this), 54, (Object) null);
}
public static final void show(FragmentManager fragmentManager, String str, CaptchaErrorBody captchaErrorBody) {

View File

@ -13,6 +13,6 @@ public final class WidgetGuildProfileSheet$configureGuildActions$1 implements Vi
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
WidgetGuildProfileSheet.access$getViewModel$p(this.this$0).onClickMarkAsRead(this.this$0.getContext(), this.$guildId);
WidgetGuildProfileSheet.access$getViewModel$p(this.this$0).onClickMarkAsRead(this.$guildId);
}
}

View File

@ -17,6 +17,6 @@ public final class WidgetGuildProfileSheet$viewModel$2 extends o implements Func
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final AppViewModel<WidgetGuildProfileSheetViewModel.ViewState> mo1invoke() {
return new WidgetGuildProfileSheetViewModel(null, null, null, WidgetGuildProfileSheet.access$getArgumentsOrDefault$p(this.this$0).getBoolean("com.discord.intent.extra.EXTRA_VIEWING_GUILD"), null, null, null, WidgetGuildProfileSheet.access$getArgumentsOrDefault$p(this.this$0).getLong("com.discord.intent.extra.EXTRA_GUILD_ID"), null, 375, null);
return new WidgetGuildProfileSheetViewModel(null, null, WidgetGuildProfileSheet.access$getArgumentsOrDefault$p(this.this$0).getBoolean("com.discord.intent.extra.EXTRA_VIEWING_GUILD"), null, null, null, WidgetGuildProfileSheet.access$getArgumentsOrDefault$p(this.this$0).getLong("com.discord.intent.extra.EXTRA_GUILD_ID"), null, 187, null);
}
}

View File

@ -4,21 +4,27 @@ import com.discord.R;
import com.discord.widgets.guilds.profile.WidgetGuildProfileSheetViewModel;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import rx.subjects.PublishSubject;
/* compiled from: WidgetGuildProfileSheetViewModel.kt */
public final class WidgetGuildProfileSheetViewModel$onClickMarkAsRead$1 extends o implements Function0<Unit> {
public final class WidgetGuildProfileSheetViewModel$onClickMarkAsRead$1 extends o implements Function1<Void, Unit> {
public final /* synthetic */ WidgetGuildProfileSheetViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetGuildProfileSheetViewModel$onClickMarkAsRead$1(WidgetGuildProfileSheetViewModel widgetGuildProfileSheetViewModel) {
super(0);
super(1);
this.this$0 = widgetGuildProfileSheetViewModel;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Void r1) {
invoke(r1);
return Unit.a;
}
public final void invoke(Void r3) {
PublishSubject access$getEventSubject$p = WidgetGuildProfileSheetViewModel.access$getEventSubject$p(this.this$0);
access$getEventSubject$p.k.onNext(new WidgetGuildProfileSheetViewModel.Event.DismissAndShowToast(R.string.marked_as_read));
}

View File

@ -22,7 +22,6 @@ import com.discord.stores.StoreAnalytics;
import com.discord.stores.StoreEmoji;
import com.discord.stores.StoreGuildProfiles;
import com.discord.stores.StoreLurking;
import com.discord.stores.StoreMessageAck;
import com.discord.stores.StoreStream;
import com.discord.stores.StoreUser;
import com.discord.stores.StoreUserGuildSettings;
@ -51,7 +50,6 @@ public final class WidgetGuildProfileSheetViewModel extends AppViewModel<ViewSta
private final PublishSubject<Event> eventSubject;
private final long guildId;
private boolean isEmojiSectionExpanded;
private final StoreMessageAck messageAck;
private final RestAPI restAPI;
private final StoreLurking storeLurking;
private final StoreUserGuildSettings storeUserGuildSettings;
@ -1292,18 +1290,16 @@ public final class WidgetGuildProfileSheetViewModel extends AppViewModel<ViewSta
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetGuildProfileSheetViewModel(StoreUserSettings storeUserSettings, StoreUserGuildSettings storeUserGuildSettings, StoreMessageAck storeMessageAck, boolean z2, RestAPI restAPI, StoreLurking storeLurking, StoreAnalytics storeAnalytics, long j, Observable<StoreState> observable) {
public WidgetGuildProfileSheetViewModel(StoreUserSettings storeUserSettings, StoreUserGuildSettings storeUserGuildSettings, boolean z2, RestAPI restAPI, StoreLurking storeLurking, StoreAnalytics storeAnalytics, long j, Observable<StoreState> observable) {
super(ViewState.Loading.INSTANCE);
m.checkNotNullParameter(storeUserSettings, "storeUserSettings");
m.checkNotNullParameter(storeUserGuildSettings, "storeUserGuildSettings");
m.checkNotNullParameter(storeMessageAck, "messageAck");
m.checkNotNullParameter(restAPI, "restAPI");
m.checkNotNullParameter(storeLurking, "storeLurking");
m.checkNotNullParameter(storeAnalytics, "storeAnalytics");
m.checkNotNullParameter(observable, "storeObservable");
this.storeUserSettings = storeUserSettings;
this.storeUserGuildSettings = storeUserGuildSettings;
this.messageAck = storeMessageAck;
this.viewingGuild = z2;
this.restAPI = restAPI;
this.storeLurking = storeLurking;
@ -1314,8 +1310,8 @@ public final class WidgetGuildProfileSheetViewModel extends AppViewModel<ViewSta
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ WidgetGuildProfileSheetViewModel(StoreUserSettings storeUserSettings, StoreUserGuildSettings storeUserGuildSettings, StoreMessageAck storeMessageAck, boolean z2, RestAPI restAPI, StoreLurking storeLurking, StoreAnalytics storeAnalytics, long j, Observable observable, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? StoreStream.Companion.getUserSettings() : storeUserSettings, (i & 2) != 0 ? StoreStream.Companion.getUserGuildSettings() : storeUserGuildSettings, (i & 4) != 0 ? StoreStream.Companion.getMessageAck() : storeMessageAck, z2, (i & 16) != 0 ? RestAPI.Companion.getApi() : restAPI, (i & 32) != 0 ? StoreStream.Companion.getLurking() : storeLurking, (i & 64) != 0 ? StoreStream.Companion.getAnalytics() : storeAnalytics, j, (i & 256) != 0 ? Companion.observeStores(j) : observable);
public /* synthetic */ WidgetGuildProfileSheetViewModel(StoreUserSettings storeUserSettings, StoreUserGuildSettings storeUserGuildSettings, boolean z2, RestAPI restAPI, StoreLurking storeLurking, StoreAnalytics storeAnalytics, long j, Observable observable, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? StoreStream.Companion.getUserSettings() : storeUserSettings, (i & 2) != 0 ? StoreStream.Companion.getUserGuildSettings() : storeUserGuildSettings, z2, (i & 8) != 0 ? RestAPI.Companion.getApi() : restAPI, (i & 16) != 0 ? StoreStream.Companion.getLurking() : storeLurking, (i & 32) != 0 ? StoreStream.Companion.getAnalytics() : storeAnalytics, j, (i & 128) != 0 ? Companion.observeStores(j) : observable);
}
public static final /* synthetic */ PublishSubject access$getEventSubject$p(WidgetGuildProfileSheetViewModel widgetGuildProfileSheetViewModel) {
@ -1501,8 +1497,8 @@ public final class WidgetGuildProfileSheetViewModel extends AppViewModel<ViewSta
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.leaveGuild(j), false, 1, null), this, null, 2, null), WidgetGuildProfileSheetViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetGuildProfileSheetViewModel$onClickLeaveServer$1(function0), 62, (Object) null);
}
public final void onClickMarkAsRead(Context context, long j) {
this.messageAck.ackGuild(context, j, new WidgetGuildProfileSheetViewModel$onClickMarkAsRead$1(this));
public final void onClickMarkAsRead(long j) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.ackGuild(j), false, 1, null), this, null, 2, null), WidgetGuildProfileSheetViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetGuildProfileSheetViewModel$onClickMarkAsRead$1(this), 62, (Object) null);
}
public final void onClickResetNickname(long j, Function0<Unit> function0) {

View File

@ -40,6 +40,7 @@ import com.discord.utilities.drawable.DrawableCompat;
import com.discord.utilities.icon.IconUtils;
import com.discord.utilities.images.MGImages;
import com.discord.utilities.permissions.PermissionUtils;
import com.discord.utilities.premium.GuildBoostUtils;
import com.discord.utilities.premium.PremiumUtils;
import com.discord.utilities.resources.StringResourceUtilsKt;
import com.discord.utilities.rx.ObservableExtensionsKt;
@ -423,10 +424,10 @@ public final class WidgetServerSettingsOverview extends AppFragment {
FloatingActionButton floatingActionButton = getBinding().h.f;
m.checkNotNullExpressionValue(floatingActionButton, "binding.uploadBanner.uploadBannerFab");
ViewExtensions.setEnabledAlpha$default(floatingActionButton, false, 0.0f, 2, null);
int premiumSubscriptionCount = 7 - guild.getPremiumSubscriptionCount();
int boostsRequiredForTier$default = GuildBoostUtils.getBoostsRequiredForTier$default(GuildBoostUtils.INSTANCE, guild.getId(), 2, null, null, 12, null) - guild.getPremiumSubscriptionCount();
Resources resources2 = getResources();
m.checkNotNullExpressionValue(resources2, "resources");
CharSequence quantityString = StringResourceUtilsKt.getQuantityString(resources2, requireContext(), (int) R.plurals.guild_settings_overview_boost_unlock_boosts, premiumSubscriptionCount, Integer.valueOf(premiumSubscriptionCount));
CharSequence quantityString = StringResourceUtilsKt.getQuantityString(resources2, requireContext(), (int) R.plurals.guild_settings_overview_boost_unlock_boosts, boostsRequiredForTier$default, Integer.valueOf(boostsRequiredForTier$default));
TextView textView7 = getBinding().h.i;
m.checkNotNullExpressionValue(textView7, "binding.uploadBanner.uploadBannerUnlock");
ViewExtensions.setTextAndVisibilityBy(textView7, b.k(this, R.string.guild_settings_overview_boost_unlock, new Object[]{quantityString}, null, 4));
@ -586,10 +587,10 @@ public final class WidgetServerSettingsOverview extends AppFragment {
FloatingActionButton floatingActionButton = getBinding().i.c;
m.checkNotNullExpressionValue(floatingActionButton, "binding.uploadSplash.ser…gsOverviewUploadSplashFab");
ViewExtensions.setEnabledAlpha$default(floatingActionButton, false, 0.0f, 2, null);
int premiumSubscriptionCount = 2 - guild.getPremiumSubscriptionCount();
int boostsRequiredForTier$default = GuildBoostUtils.getBoostsRequiredForTier$default(GuildBoostUtils.INSTANCE, guild.getId(), 1, null, null, 12, null) - guild.getPremiumSubscriptionCount();
Resources resources2 = getResources();
m.checkNotNullExpressionValue(resources2, "resources");
CharSequence quantityString = StringResourceUtilsKt.getQuantityString(resources2, requireContext(), (int) R.plurals.guild_settings_overview_boost_unlock_boosts, premiumSubscriptionCount, Integer.valueOf(premiumSubscriptionCount));
CharSequence quantityString = StringResourceUtilsKt.getQuantityString(resources2, requireContext(), (int) R.plurals.guild_settings_overview_boost_unlock_boosts, boostsRequiredForTier$default, Integer.valueOf(boostsRequiredForTier$default));
TextView textView7 = getBinding().i.h;
m.checkNotNullExpressionValue(textView7, "binding.uploadSplash.uploadSplashUnlock");
ViewExtensions.setTextAndVisibilityBy(textView7, b.k(this, R.string.guild_settings_overview_boost_unlock, new Object[]{quantityString}, null, 4));

View File

@ -15,6 +15,7 @@ import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.drawable.DrawableCompat;
import com.discord.utilities.guilds.GuildUtilsKt;
import com.discord.utilities.mg_recycler.MGRecyclerAdapter;
import com.discord.utilities.premium.GuildBoostUtils;
import com.discord.utilities.premium.PremiumUtils;
import com.discord.utilities.resources.StringResourceUtilsKt;
import com.discord.utilities.threads.ThreadUtils;
@ -75,15 +76,15 @@ public final class GuildBoostPerkView extends RelativeLayout {
this.binding.c.addOnItemTouchListener(new GuildBoostPerkView$initialize$1());
}
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x030b: APUT
(r1v9 com.discord.widgets.servers.guildboost.GuildBoostPerkViewAdapter$GuildBoostPerkViewListItem[])
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x030a: APUT
(r2v18 com.discord.widgets.servers.guildboost.GuildBoostPerkViewAdapter$GuildBoostPerkViewListItem[])
(6 ??[int, float, short, byte, char])
(r3v16 com.discord.widgets.servers.guildboost.GuildBoostPerkViewAdapter$GuildBoostPerkViewListItem)
(r3v21 com.discord.widgets.servers.guildboost.GuildBoostPerkViewAdapter$GuildBoostPerkViewListItem)
*/
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x041e: APUT
(r1v4 com.discord.widgets.servers.guildboost.GuildBoostPerkViewAdapter$GuildBoostPerkViewListItem[])
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x041d: APUT
(r2v16 com.discord.widgets.servers.guildboost.GuildBoostPerkViewAdapter$GuildBoostPerkViewListItem[])
(6 ??[int, float, short, byte, char])
(r14v1 com.discord.widgets.servers.guildboost.GuildBoostPerkViewAdapter$GuildBoostPerkViewListItem)
(r8v2 com.discord.widgets.servers.guildboost.GuildBoostPerkViewAdapter$GuildBoostPerkViewListItem)
*/
public final void configure(int i, int i2, long j) {
List list;
@ -94,15 +95,15 @@ public final class GuildBoostPerkView extends RelativeLayout {
} else {
this.binding.d.setBackgroundColor(ColorCompat.getThemedColor(this, (int) R.attr.primary_700));
}
int i3 = i != 1 ? i != 2 ? i != 3 ? 0 : 14 : 7 : 2;
int boostsRequiredForTier$default = GuildBoostUtils.getBoostsRequiredForTier$default(GuildBoostUtils.INSTANCE, j, i, null, null, 12, null);
TextView textView = this.binding.f;
m.checkNotNullExpressionValue(textView, "binding.perksLevelHeaderText");
GuildBoostPerkViewAdapter.GuildBoostPerkViewListItem guildBoostPerkViewListItem = null;
b.n(textView, i != 1 ? i != 2 ? i != 3 ? 0 : R.string.guild_settings_guild_premium_perks_title_tier_3 : R.string.guild_settings_guild_premium_perks_title_tier_2 : R.string.guild_settings_guild_premium_perks_title_tier_1, new Object[0], null, 4);
int i4 = i != 1 ? i != 2 ? i != 3 ? 0 : z2 ? R.drawable.ic_perk_tier_3_boosted : R.drawable.ic_perk_tier_3_unboosted : z2 ? R.drawable.ic_perk_tier_2_boosted : R.drawable.ic_perk_tier_2_unboosted : z2 ? R.drawable.ic_perk_tier_1_boosted : R.drawable.ic_perk_tier_1_unboosted;
int i3 = i != 1 ? i != 2 ? i != 3 ? 0 : z2 ? R.drawable.ic_perk_tier_3_boosted : R.drawable.ic_perk_tier_3_unboosted : z2 ? R.drawable.ic_perk_tier_2_boosted : R.drawable.ic_perk_tier_2_unboosted : z2 ? R.drawable.ic_perk_tier_1_boosted : R.drawable.ic_perk_tier_1_unboosted;
TextView textView2 = this.binding.f;
m.checkNotNullExpressionValue(textView2, "binding.perksLevelHeaderText");
DrawableCompat.setCompoundDrawablesCompat$default(textView2, i4, 0, 0, 0, 14, (Object) null);
DrawableCompat.setCompoundDrawablesCompat$default(textView2, i3, 0, 0, 0, 14, (Object) null);
this.binding.f.setTextColor(z2 ? ColorCompat.getColor(getContext(), (int) R.color.white) : ColorCompat.getThemedColor(getContext(), (int) R.attr.primary_300));
TextView textView3 = this.binding.e;
m.checkNotNullExpressionValue(textView3, "binding.perksLevelHeaderBoosts");
@ -110,7 +111,7 @@ public final class GuildBoostPerkView extends RelativeLayout {
m.checkNotNullExpressionValue(resources, "resources");
Context context = getContext();
m.checkNotNullExpressionValue(context, "context");
textView3.setText(StringResourceUtilsKt.getQuantityString(resources, context, (int) R.plurals.guild_settings_premium_guild_tier_requirement_required, i3, Integer.valueOf(i3)));
textView3.setText(StringResourceUtilsKt.getQuantityString(resources, context, (int) R.plurals.guild_settings_premium_guild_tier_requirement_required, boostsRequiredForTier$default, Integer.valueOf(boostsRequiredForTier$default)));
TextView textView4 = this.binding.e;
m.checkNotNullExpressionValue(textView4, "binding.perksLevelHeaderBoosts");
textView4.setVisibility(z2 ^ true ? 0 : 8);

View File

@ -238,10 +238,10 @@ public final class WidgetGuildBoost extends AppFragment {
}
}
private final void configureProgressBar(int i, int i2) {
private final void configureProgressBar(long j, int i, int i2) {
ProgressBar progressBar = getBinding().l.f194b;
m.checkNotNullExpressionValue(progressBar, "binding.progress.boostBarProgressBar");
progressBar.setProgress(GuildBoostUtils.INSTANCE.calculateTotalProgress(i, i2));
progressBar.setProgress(GuildBoostUtils.calculateTotalProgress$default(GuildBoostUtils.INSTANCE, j, i, i2, null, null, 24, null));
ProgressBar progressBar2 = getBinding().l.f194b;
m.checkNotNullExpressionValue(progressBar2, "binding.progress.boostBarProgressBar");
boolean z2 = false;
@ -288,7 +288,7 @@ public final class WidgetGuildBoost extends AppFragment {
int premiumTier = loaded.getGuild().getPremiumTier();
int premiumSubscriptionCount = loaded.getGuild().getPremiumSubscriptionCount();
configureToolbar(loaded.getGuild().getName());
configureProgressBar(premiumTier, premiumSubscriptionCount);
configureProgressBar(loaded.getGuild().getId(), premiumTier, premiumSubscriptionCount);
configureViewpager(premiumTier, premiumSubscriptionCount);
getBinding().e.a(loaded.getMeUser().getPremiumTier(), new WidgetGuildBoost$configureUI$2(this));
getBinding().f.a(loaded.getMeUser().getPremiumTier(), false);

View File

@ -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 + " - 115.4 - Beta (115104)");
textView.setText(string + " - 116.5 - Beta (116105)");
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);

View File

@ -76,7 +76,7 @@ public final class SettingsGuildBoostSampleGuildAdapter extends MGRecyclerAdapte
TextView textView2 = this.binding.f2200b;
m.checkNotNullExpressionValue(textView2, "binding.boostedSampleGuildCount");
textView2.setText(StringResourceUtilsKt.getI18nPluralString(a.x(this.itemView, "itemView", "itemView.context"), R.plurals.premium_guild_subscription_available_numSubscriptions, premiumSubscriptionCount, Integer.valueOf(premiumSubscriptionCount)));
this.binding.e.a(item.getGuild().getPremiumTier(), premiumSubscriptionCount);
this.binding.e.a(item.getGuild().getId(), item.getGuild().getPremiumTier(), premiumSubscriptionCount);
this.itemView.setOnClickListener(new SettingsGuildBoostSampleGuildAdapter$GuildListItem$onConfigure$1(this, item));
}
}

View File

@ -286,7 +286,7 @@ public final class WidgetSettingsGuildBoostSubscriptionAdapter extends MGRecycle
TextView textView2 = this.binding.e;
m.checkNotNullExpressionValue(textView2, "binding.boostedSampleGuildCount");
textView2.setText(b.h(context, R.string.premium_guild_subscription_guild_subsription_subtitle, new Object[]{i18nPluralString}, null, 4));
this.binding.d.a(guildItem.getGuild().getPremiumTier(), guildItem.getGuild().getPremiumSubscriptionCount());
this.binding.d.a(guildItem.getGuild().getId(), guildItem.getGuild().getPremiumTier(), guildItem.getGuild().getPremiumSubscriptionCount());
return;
}
}

View File

@ -6,6 +6,7 @@ import com.discord.api.channel.Channel;
import com.discord.models.user.MeUser;
import com.discord.stores.StoreMessages;
import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.messagesend.MessageResult;
import com.discord.utilities.view.extensions.ViewExtensions;
import com.discord.widgets.chat.list.ViewEmbedGameInvite;
@ -18,16 +19,16 @@ import kotlin.Pair;
import rx.Observable;
/* compiled from: WidgetIncomingShare.kt */
public final class WidgetIncomingShare$onSendClicked$2<T, R> implements b<Pair<? extends MeUser, ? extends Channel>, Observable<? extends Pair<? extends MeUser, ? extends MessageResult>>> {
public final /* synthetic */ String $captchaKey;
public final /* synthetic */ CaptchaHelper.CaptchaPayload $captchaPayload;
public final /* synthetic */ List $data;
public final /* synthetic */ ViewEmbedGameInvite.Model $gameInviteModel;
public final /* synthetic */ WidgetIncomingShare this$0;
public WidgetIncomingShare$onSendClicked$2(WidgetIncomingShare widgetIncomingShare, List list, ViewEmbedGameInvite.Model model, String str) {
public WidgetIncomingShare$onSendClicked$2(WidgetIncomingShare widgetIncomingShare, List list, ViewEmbedGameInvite.Model model, CaptchaHelper.CaptchaPayload captchaPayload) {
this.this$0 = widgetIncomingShare;
this.$data = list;
this.$gameInviteModel = model;
this.$captchaKey = str;
this.$captchaPayload = captchaPayload;
}
/* Return type fixed from 'java.lang.Object' to match base method */
@ -55,6 +56,6 @@ public final class WidgetIncomingShare$onSendClicked$2<T, R> implements b<Pair<?
ViewEmbedGameInvite.Model model2 = this.$gameInviteModel;
Activity activity = model2 != null ? model2.getActivity() : null;
ViewEmbedGameInvite.Model model3 = this.$gameInviteModel;
return StoreMessages.sendMessage$default(messages, h, component1, textOrEmpty, null, list, null, null, null, application, activity, model3 != null ? model3.getMessageActivity() : null, null, null, null, this.$captchaKey, 14464, null).F(new WidgetIncomingShare$onSendClicked$2$$special$$inlined$let$lambda$1(this, component1));
return StoreMessages.sendMessage$default(messages, h, component1, textOrEmpty, null, list, null, null, null, application, activity, model3 != null ? model3.getMessageActivity() : null, null, null, null, this.$captchaPayload, 14464, null).F(new WidgetIncomingShare$onSendClicked$2$$special$$inlined$let$lambda$1(this, component1));
}
}

View File

@ -12,6 +12,7 @@ import com.discord.models.user.MeUser;
import com.discord.stores.StoreStream;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error;
import com.discord.utilities.guilds.GuildUtilsKt;
import com.discord.utilities.messagesend.MessageResult;
@ -51,7 +52,7 @@ public final class WidgetIncomingShare$onSendClicked$3 extends o implements Func
/* compiled from: WidgetIncomingShare.kt */
/* renamed from: com.discord.widgets.share.WidgetIncomingShare$onSendClicked$3$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function2<AppFragment, String, Unit> {
public static final class AnonymousClass2 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetIncomingShare$onSendClicked$3 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -63,16 +64,16 @@ public final class WidgetIncomingShare$onSendClicked$3 extends o implements Func
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, str);
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(appFragment, captchaPayload);
return Unit.a;
}
public final void invoke(AppFragment appFragment, String str) {
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(str, "captchaToken");
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetIncomingShare$onSendClicked$3 widgetIncomingShare$onSendClicked$3 = this.this$0;
WidgetIncomingShare.access$onSendClicked(widgetIncomingShare$onSendClicked$3.this$0, widgetIncomingShare$onSendClicked$3.$context, widgetIncomingShare$onSendClicked$3.$receiver, widgetIncomingShare$onSendClicked$3.$gameInviteModel, widgetIncomingShare$onSendClicked$3.$contentModel, widgetIncomingShare$onSendClicked$3.$isOnCooldown, widgetIncomingShare$onSendClicked$3.$maxFileSizeMB, widgetIncomingShare$onSendClicked$3.$isUserPremium, str);
WidgetIncomingShare.access$onSendClicked(widgetIncomingShare$onSendClicked$3.this$0, widgetIncomingShare$onSendClicked$3.$context, widgetIncomingShare$onSendClicked$3.$receiver, widgetIncomingShare$onSendClicked$3.$gameInviteModel, widgetIncomingShare$onSendClicked$3.$contentModel, widgetIncomingShare$onSendClicked$3.$isOnCooldown, widgetIncomingShare$onSendClicked$3.$maxFileSizeMB, widgetIncomingShare$onSendClicked$3.$isUserPremium, captchaPayload);
}
}

View File

@ -18,7 +18,7 @@ public final class WidgetIncomingShare$onViewBound$4 implements View.OnClickList
public final /* synthetic */ WidgetIncomingShare this$0;
/* compiled from: WidgetIncomingShare.kt */
@e(c = "com.discord.widgets.share.WidgetIncomingShare$onViewBound$4$1", f = "WidgetIncomingShare.kt", l = {137}, m = "invokeSuspend")
@e(c = "com.discord.widgets.share.WidgetIncomingShare$onViewBound$4$1", f = "WidgetIncomingShare.kt", l = {138}, m = "invokeSuspend")
/* renamed from: com.discord.widgets.share.WidgetIncomingShare$onViewBound$4$1 reason: invalid class name */
public static final class AnonymousClass1 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public int label;

View File

@ -33,6 +33,7 @@ import com.discord.stores.StoreUser;
import com.discord.utilities.ShareUtils;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.attachments.AttachmentUtilsKt;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.channel.ChannelSelector;
import com.discord.utilities.dimen.DimenUtils;
import com.discord.utilities.intent.IntentUtils;
@ -482,8 +483,8 @@ public final class WidgetIncomingShare extends AppFragment {
widgetIncomingShare.initialize(contentModel);
}
public static final /* synthetic */ void access$onSendClicked(WidgetIncomingShare widgetIncomingShare, Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, String str) {
widgetIncomingShare.onSendClicked(context, itemDataPayload, model, contentModel, z2, i, z3, str);
public static final /* synthetic */ void access$onSendClicked(WidgetIncomingShare widgetIncomingShare, Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetIncomingShare.onSendClicked(context, itemDataPayload, model, contentModel, z2, i, z3, captchaPayload);
}
public static final /* synthetic */ void access$onSendCompleted(WidgetIncomingShare widgetIncomingShare) {
@ -656,7 +657,7 @@ public final class WidgetIncomingShare extends AppFragment {
}
}
private final void onSendClicked(Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, String str) {
private final void onSendClicked(Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, CaptchaHelper.CaptchaPayload captchaPayload) {
Observable.c cVar;
List<Attachment> list;
boolean z4;
@ -758,7 +759,7 @@ public final class WidgetIncomingShare extends AppFragment {
Observable observeMe$default = StoreUser.observeMe$default(companion2.getUsers(), false, 1, null);
Observable<R> k = companion2.getChannelsSelected().observeSelectedChannel().k(cVar);
m.checkNotNullExpressionValue(k, "StoreStream\n … .compose(filter)");
Observable z8 = Observable.j(observeMe$default, ObservableExtensionsKt.takeSingleUntilTimeout$default(k, 1000, false, 2, null), WidgetIncomingShare$onSendClicked$1.INSTANCE).Z(1).z(new WidgetIncomingShare$onSendClicked$2(this, list, model, str));
Observable z8 = Observable.j(observeMe$default, ObservableExtensionsKt.takeSingleUntilTimeout$default(k, 1000, false, 2, null), WidgetIncomingShare$onSendClicked$1.INSTANCE).Z(1).z(new WidgetIncomingShare$onSendClicked$2(this, list, model, captchaPayload));
m.checkNotNullExpressionValue(z8, "Observable\n .comb…ervable.empty()\n }");
WidgetGlobalSearchAdapter widgetGlobalSearchAdapter = this.resultsAdapter;
if (widgetGlobalSearchAdapter == null) {
@ -767,8 +768,8 @@ public final class WidgetIncomingShare extends AppFragment {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer(ObservableExtensionsKt.ui(z8, this, widgetGlobalSearchAdapter), getBinding().f2458b, 0), WidgetIncomingShare.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetIncomingShare$onSendClicked$3(this, list, context, itemDataPayload, model, contentModel, z2, i, z3, z4, z5, z6), 62, (Object) null);
}
public static /* synthetic */ void onSendClicked$default(WidgetIncomingShare widgetIncomingShare, Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, String str, int i2, Object obj) {
widgetIncomingShare.onSendClicked(context, itemDataPayload, model, contentModel, z2, i, z3, (i2 & 128) != 0 ? null : str);
public static /* synthetic */ void onSendClicked$default(WidgetIncomingShare widgetIncomingShare, Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) {
widgetIncomingShare.onSendClicked(context, itemDataPayload, model, contentModel, z2, i, z3, (i2 & 128) != 0 ? null : captchaPayload);
}
private final void onSendCompleted() {

View File

@ -1,11 +1,12 @@
package com.discord.widgets.user.phone;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetUserPhoneManage.kt */
public final class WidgetUserPhoneManage$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final class WidgetUserPhoneManage$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ WidgetUserPhoneManage this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -17,13 +18,13 @@ public final class WidgetUserPhoneManage$captchaLauncher$1 extends o implements
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(captchaPayload);
return Unit.a;
}
public final void invoke(String str) {
m.checkNotNullParameter(str, "token");
WidgetUserPhoneManage.access$updatePhoneNumber(this.this$0, str);
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetUserPhoneManage.access$updatePhoneNumber(this.this$0, captchaPayload);
}
}

View File

@ -21,6 +21,7 @@ import com.discord.stores.StoreStream;
import com.discord.stores.StoreUser;
import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.drawable.DrawableCompat;
import com.discord.utilities.intent.IntentUtilsKt;
import com.discord.utilities.rest.RestAPI;
@ -147,8 +148,8 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase {
widgetUserPhoneManage.source = str;
}
public static final /* synthetic */ void access$updatePhoneNumber(WidgetUserPhoneManage widgetUserPhoneManage, String str) {
widgetUserPhoneManage.updatePhoneNumber(str);
public static final /* synthetic */ void access$updatePhoneNumber(WidgetUserPhoneManage widgetUserPhoneManage, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetUserPhoneManage.updatePhoneNumber(captchaPayload);
}
private final void configureUI(MeUser meUser) {
@ -211,21 +212,21 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase {
WidgetNoticeDialog.Companion.show$default(companion, parentFragmentManager, i, i2, i3, b.i(resources4, R.string.cancel, new Object[0], null, 4), g0.mapOf(o.to(Integer.valueOf((int) R.id.notice_ok), new WidgetUserPhoneManage$removePhoneNumber$1(this))), null, null, null, Integer.valueOf((int) R.attr.notice_theme_positive_red), null, null, 0, null, 15808, null);
}
private final void updatePhoneNumber(String str) {
private final void updatePhoneNumber(CaptchaHelper.CaptchaPayload captchaPayload) {
String textOrEmpty = getBinding().f.getTextOrEmpty();
RestAPI api = RestAPI.Companion.getApi();
String str2 = this.source;
if (str2 == null) {
String str = this.source;
if (str == 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().f2661b, 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);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.restSubscribeOn$default(api.userAddPhone(new RestAPIParams.Phone(textOrEmpty, str, captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null)), false, 1, null), getBinding().f2661b, 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) {
public static /* synthetic */ void updatePhoneNumber$default(WidgetUserPhoneManage widgetUserPhoneManage, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
captchaPayload = null;
}
widgetUserPhoneManage.updatePhoneNumber(str);
widgetUserPhoneManage.updatePhoneNumber(captchaPayload);
}
@Override // com.discord.widgets.user.account.WidgetUserAccountVerifyBase, com.discord.app.AppFragment

View File

@ -3,6 +3,7 @@ package com.discord.widgets.user.usersheet;
import com.discord.R;
import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPIAbortMessages;
import com.discord.widgets.captcha.WidgetCaptchaBottomSheet;
@ -28,7 +29,7 @@ public final class WidgetUserSheetViewModel$addRelationship$2 extends o implemen
/* compiled from: WidgetUserSheetViewModel.kt */
/* renamed from: com.discord.widgets.user.usersheet.WidgetUserSheetViewModel$addRelationship$2$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function2<AppFragment, String, Unit> {
public static final class AnonymousClass1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ AnonymousClass1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -40,16 +41,16 @@ public final class WidgetUserSheetViewModel$addRelationship$2 extends o implemen
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, str);
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(appFragment, captchaPayload);
return Unit.a;
}
public final void invoke(AppFragment appFragment, String str) {
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(str, "captchaToken");
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetUserSheetViewModel$addRelationship$2 widgetUserSheetViewModel$addRelationship$2 = this.this$0.this$0;
widgetUserSheetViewModel$addRelationship$2.this$0.addRelationship(widgetUserSheetViewModel$addRelationship$2.$type, widgetUserSheetViewModel$addRelationship$2.$username, widgetUserSheetViewModel$addRelationship$2.$successMessageStringRes, str);
widgetUserSheetViewModel$addRelationship$2.this$0.addRelationship(widgetUserSheetViewModel$addRelationship$2.$type, widgetUserSheetViewModel$addRelationship$2.$username, widgetUserSheetViewModel$addRelationship$2.$successMessageStringRes, captchaPayload);
}
}

View File

@ -34,6 +34,7 @@ import com.discord.stores.StoreMediaSettings;
import com.discord.stores.StoreStream;
import com.discord.stores.StoreUserNotes;
import com.discord.stores.StoreUserProfile;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.dimen.DimenUtils;
import com.discord.utilities.guilds.RoleUtils;
import com.discord.utilities.icon.IconUtils;
@ -1829,11 +1830,11 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
widgetUserSheetViewModel.updateViewState(viewState);
}
public static /* synthetic */ void addRelationship$default(WidgetUserSheetViewModel widgetUserSheetViewModel, Integer num, String str, int i, String str2, int i2, Object obj) {
public static /* synthetic */ void addRelationship$default(WidgetUserSheetViewModel widgetUserSheetViewModel, Integer num, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) {
if ((i2 & 8) != 0) {
str2 = null;
captchaPayload = null;
}
widgetUserSheetViewModel.addRelationship(num, str, i, str2);
widgetUserSheetViewModel.addRelationship(num, str, i, captchaPayload);
}
private final UserProfileAdminView.ViewState createAdminViewState(Channel channel, boolean z2, boolean z3, ManageUserContext manageUserContext, VoiceState voiceState, boolean z4, boolean z5) {
@ -2159,9 +2160,9 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
return m.areEqual(a, l);
}
public final void addRelationship(Integer num, String str, @StringRes int i, String str2) {
public final void addRelationship(Integer num, String str, @StringRes int i, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(str, "username");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.addRelationship("User Profile", this.userId, num, this.friendToken, str2), false, 1, null), this, null, 2, null), WidgetUserSheetViewModel.class, (Context) null, (Function1) null, new WidgetUserSheetViewModel$addRelationship$2(this, num, str, i), (Function0) null, (Function0) null, new WidgetUserSheetViewModel$addRelationship$1(this, i), 54, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.addRelationship("User Profile", this.userId, num, this.friendToken, captchaPayload), false, 1, null), this, null, 2, null), WidgetUserSheetViewModel.class, (Context) null, (Function1) null, new WidgetUserSheetViewModel$addRelationship$2(this, num, str, i), (Function0) null, (Function0) null, new WidgetUserSheetViewModel$addRelationship$1(this, i), 54, (Object) null);
}
public final void banUser() {

View File

@ -3,6 +3,7 @@ package com.discord.widgets.voice.call;
import android.content.Context;
import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPIAbortMessages;
import com.discord.widgets.captcha.WidgetCaptchaBottomSheet;
@ -27,7 +28,7 @@ public final class WidgetCallFailed$sendFriendRequest$2<T> implements Action1<Er
/* compiled from: WidgetCallFailed.kt */
/* renamed from: com.discord.widgets.voice.call.WidgetCallFailed$sendFriendRequest$2$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function2<AppFragment, String, Unit> {
public static final class AnonymousClass1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> {
public final /* synthetic */ AnonymousClass1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -39,16 +40,16 @@ public final class WidgetCallFailed$sendFriendRequest$2<T> implements Action1<Er
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, str);
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
invoke(appFragment, captchaPayload);
return Unit.a;
}
public final void invoke(AppFragment appFragment, String str) {
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(str, "captchaToken");
m.checkNotNullParameter(captchaPayload, "captchaPayload");
WidgetCallFailed$sendFriendRequest$2 widgetCallFailed$sendFriendRequest$2 = this.this$0.this$0;
WidgetCallFailed.access$sendFriendRequest(widgetCallFailed$sendFriendRequest$2.this$0, widgetCallFailed$sendFriendRequest$2.$userId, widgetCallFailed$sendFriendRequest$2.$username, str);
WidgetCallFailed.access$sendFriendRequest(widgetCallFailed$sendFriendRequest$2.this$0, widgetCallFailed$sendFriendRequest$2.$userId, widgetCallFailed$sendFriendRequest$2.$username, captchaPayload);
}
}

View File

@ -14,6 +14,7 @@ import com.discord.app.AppDialog;
import com.discord.databinding.ViewDialogConfirmationBinding;
import com.discord.models.user.User;
import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
@ -58,8 +59,8 @@ public final class WidgetCallFailed extends AppDialog {
widgetCallFailed.configureUI(user);
}
public static final /* synthetic */ void access$sendFriendRequest(WidgetCallFailed widgetCallFailed, long j, String str, String str2) {
widgetCallFailed.sendFriendRequest(j, str, str2);
public static final /* synthetic */ void access$sendFriendRequest(WidgetCallFailed widgetCallFailed, long j, String str, CaptchaHelper.CaptchaPayload captchaPayload) {
widgetCallFailed.sendFriendRequest(j, str, captchaPayload);
}
private final void configureUI(User user) {
@ -77,15 +78,15 @@ public final class WidgetCallFailed extends AppDialog {
return (ViewDialogConfirmationBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]);
}
private final void sendFriendRequest(long j, String str, String str2) {
ObservableExtensionsKt.ui$default(RestAPI.addRelationship$default(RestAPI.Companion.getApi(), "Call", j, null, null, str2, 8, null), this, null, 2, null).k(o.h(new WidgetCallFailed$sendFriendRequest$1(this), getAppActivity(), new WidgetCallFailed$sendFriendRequest$2(this, j, str)));
private final void sendFriendRequest(long j, String str, CaptchaHelper.CaptchaPayload captchaPayload) {
ObservableExtensionsKt.ui$default(RestAPI.addRelationship$default(RestAPI.Companion.getApi(), "Call", j, null, null, captchaPayload, 8, null), this, null, 2, null).k(o.h(new WidgetCallFailed$sendFriendRequest$1(this), getAppActivity(), new WidgetCallFailed$sendFriendRequest$2(this, j, str)));
}
public static /* synthetic */ void sendFriendRequest$default(WidgetCallFailed widgetCallFailed, long j, String str, String str2, int i, Object obj) {
public static /* synthetic */ void sendFriendRequest$default(WidgetCallFailed widgetCallFailed, long j, String str, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) {
if ((i & 4) != 0) {
str2 = null;
captchaPayload = null;
}
widgetCallFailed.sendFriendRequest(j, str, str2);
widgetCallFailed.sendFriendRequest(j, str, captchaPayload);
}
@Override // com.discord.app.AppDialog

View File

@ -107,7 +107,7 @@ public final class MessageSendWorker extends Worker {
String string3 = getInputData().getString("com.discord.intent.extra.EXTRA_MESSAGE_ID");
long j2 = getInputData().getLong("com.discord.intent.extra.EXTRA_STICKER_ID", -1);
try {
Observable takeSingleUntilTimeout$default = ObservableExtensionsKt.takeSingleUntilTimeout$default(ObservableExtensionsKt.restSubscribeOn(RestAPI.Companion.getApi().sendMessage(j, new RestAPIParams.Message(string2, string3, null, null, j2 != -1 ? d0.t.m.listOf(Long.valueOf(j2)) : null, null, null, null, 236, null)), false), 0, false, 3, null);
Observable takeSingleUntilTimeout$default = ObservableExtensionsKt.takeSingleUntilTimeout$default(ObservableExtensionsKt.restSubscribeOn(RestAPI.Companion.getApi().sendMessage(j, new RestAPIParams.Message(string2, string3, null, null, j2 != -1 ? d0.t.m.listOf(Long.valueOf(j2)) : null, null, null, null, null, 492, null)), false), 0, false, 3, null);
Objects.requireNonNull(takeSingleUntilTimeout$default);
Message message = (Message) new j0.m.a(takeSingleUntilTimeout$default).b();
NotificationData.DisplayPayload displayPayload = NotificationCache.INSTANCE.get(j);

View File

@ -349,8 +349,8 @@
<item quantity="other">{count} messages</item>
</plurals>
<plurals name="forum_post_message_count_count">
<item quantity="one">1 message</item>
<item quantity="other">{count} messages</item>
<item quantity="one">1 Message</item>
<item quantity="other">{count} Messages</item>
</plurals>
<plurals name="game_feed_unknown_players_count">
<item quantity="one">{#} Unknown Player</item>

Some files were not shown because too many files have changed in this diff Show More