102.3 - Alpha (102203)

This commit is contained in:
Juby210 2021-11-11 08:35:24 +01:00
parent 2c53c4c142
commit 7d1252b380
150 changed files with 13208 additions and 11379 deletions

View File

@ -10,8 +10,8 @@ android {
applicationId 'com.discord'
minSdkVersion 21
targetSdkVersion 30
versionCode 102202
versionName "102.2 - Alpha"
versionCode 102203
versionName "102.3 - Alpha"
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="102202" android:versionName="102.2 - Alpha" 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="102203" android:versionName="102.3 - Alpha" 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"/>
@ -82,13 +82,10 @@
<data android:scheme="https" android:host="discord.com" android:pathPattern="/gifts/.*"/>
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/invite/.*"/>
<data android:scheme="https" android:host="discord.com" android:pathPattern="/invite/.*"/>
<data android:scheme="http" android:host="discord.com" android:pathPattern="/invite/.*"/>
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/template/.*"/>
<data android:scheme="https" android:host="discord.com" android:pathPattern="/template/.*"/>
<data android:scheme="http" android:host="discord.com" android:pathPattern="/template/.*"/>
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/channels/.*"/>
<data android:scheme="https" android:host="discord.com" android:pathPattern="/channels/.*"/>
<data android:scheme="http" android:host="discord.com" android:pathPattern="/channels/.*"/>
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/users/.*"/>
<data android:scheme="https" android:host="discord.com" android:pathPattern="/users/.*"/>
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/feature/.*"/>
@ -97,7 +94,6 @@
<data android:scheme="https" android:host="discord.com" android:pathPattern="/discovery"/>
<data android:scheme="https" android:host="discord.com" android:pathPattern="/query/.*"/>
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/query/.*"/>
<data android:scheme="http" android:host="discord.com" android:pathPattern="/ra/.*"/>
<data android:scheme="https" android:host="discord.com" android:pathPattern="/ra/.*"/>
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/events/.*"/>
<data android:scheme="https" android:host="discord.com" android:pathPattern="/events/.*"/>
@ -107,18 +103,14 @@
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/gifts/.*"/>
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/invite/.*"/>
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/invite/.*"/>
<data android:scheme="http" android:host="discordapp.com" android:pathPattern="/invite/.*"/>
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/template/.*"/>
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/template/.*"/>
<data android:scheme="http" android:host="discordapp.com" android:pathPattern="/template/.*"/>
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/channels/.*"/>
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/channels/.*"/>
<data android:scheme="http" android:host="discordapp.com" android:pathPattern="/channels/.*"/>
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/users/.*"/>
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/users/.*"/>
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/discovery"/>
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/discovery"/>
<data android:scheme="http" android:host="discordapp.com" android:pathPattern="/ra/.*"/>
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/ra/.*"/>
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/events/.*"/>
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/events/.*"/>
@ -129,11 +121,8 @@
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="discord" android:host="app" android:pathPattern="/.*"/>
<data android:scheme="https" android:host="discord.gift" android:pathPattern="/.*"/>
<data android:scheme="http" android:host="discord.gift" android:pathPattern="/.*"/>
<data android:scheme="https" android:host="discord.gg" android:pathPattern="/.*"/>
<data android:scheme="http" android:host="discord.gg" android:pathPattern="/.*"/>
<data android:scheme="https" android:host="discord.new" android:pathPattern="/.*"/>
<data android:scheme="http" android:host="discord.new" android:pathPattern="/.*"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

View File

@ -76,7 +76,7 @@ import java.util.Map;
import kotlin.jvm.functions.Function0;
/* compiled from: TypeAdapterRegistrar.kt */
public final class a {
public static final Map<Class<? extends Object>, Function0<Object>> a = h0.mapOf(o.to(ActivityPlatform.class, b.i), o.to(ApplicationStatus.class, C0023a.C), o.to(UtcDateTime.class, C0023a.G), o.to(NsfwAllowance.class, C0023a.H), o.to(PremiumTier.class, C0023a.I), o.to(ActivityType.class, C0023a.J), o.to(Phone.class, C0023a.K), o.to(ApplicationCommandType.class, C0023a.L), o.to(OAuthScope.class, C0023a.M), o.to(GuildVerificationLevel.class, C0023a.i), o.to(GuildExplicitContentFilter.class, C0023a.j), o.to(GuildMaxVideoChannelUsers.class, C0023a.k), o.to(ComponentType.class, C0023a.l), o.to(ButtonStyle.class, C0023a.m), o.to(ReportNodeChild.class, C0023a.n), o.to(ReportNodeElementData.class, C0023a.o), o.to(ReportNodeBottomButton.class, C0023a.p), o.to(ApplicationCommandPermissionType.class, C0023a.q), o.to(StageInstancePrivacyLevel.class, C0023a.r), o.to(FriendSuggestionReasonType.class, C0023a.f41s), o.to(AllowedInSuggestionsType.class, C0023a.t), o.to(StickerFormatType.class, C0023a.u), o.to(LocalizedString.class, C0023a.v), o.to(MessageActivityType.class, C0023a.w), o.to(EmbedType.class, C0023a.f42x), o.to(StickerType.class, C0023a.f43y), o.to(GuildScheduledEventStatus.class, C0023a.f44z), o.to(GuildScheduledEventEntityType.class, C0023a.A), o.to(Science.Event.SchemaObject.class, C0023a.B), o.to(GuildRoleSubscriptionBenefitType.class, C0023a.D), o.to(PriceTierType.class, C0023a.E), o.to(ApplicationType.class, C0023a.F));
public static final Map<Class<? extends Object>, Function0<Object>> a = h0.mapOf(o.to(ActivityPlatform.class, b.i), o.to(ActivityType.class, C0023a.C), o.to(ApplicationStatus.class, C0023a.H), o.to(UtcDateTime.class, C0023a.I), o.to(NsfwAllowance.class, C0023a.J), o.to(PremiumTier.class, C0023a.K), o.to(ActivityType.class, C0023a.L), o.to(Phone.class, C0023a.M), o.to(ApplicationCommandType.class, C0023a.N), o.to(OAuthScope.class, C0023a.i), o.to(GuildVerificationLevel.class, C0023a.j), o.to(GuildExplicitContentFilter.class, C0023a.k), o.to(GuildMaxVideoChannelUsers.class, C0023a.l), o.to(ComponentType.class, C0023a.m), o.to(ButtonStyle.class, C0023a.n), o.to(ReportNodeChild.class, C0023a.o), o.to(ReportNodeElementData.class, C0023a.p), o.to(ReportNodeBottomButton.class, C0023a.q), o.to(ApplicationCommandPermissionType.class, C0023a.r), o.to(StageInstancePrivacyLevel.class, C0023a.f41s), o.to(FriendSuggestionReasonType.class, C0023a.t), o.to(AllowedInSuggestionsType.class, C0023a.u), o.to(StickerFormatType.class, C0023a.v), o.to(LocalizedString.class, C0023a.w), o.to(MessageActivityType.class, C0023a.f42x), o.to(EmbedType.class, C0023a.f43y), o.to(StickerType.class, C0023a.f44z), o.to(GuildScheduledEventStatus.class, C0023a.A), o.to(GuildScheduledEventEntityType.class, C0023a.B), o.to(Science.Event.SchemaObject.class, C0023a.D), o.to(GuildRoleSubscriptionBenefitType.class, C0023a.E), o.to(PriceTierType.class, C0023a.F), o.to(ApplicationType.class, C0023a.G));
public static final List<c.i.d.o> b = n.listOf((Object[]) new c.i.d.o[]{ComponentRuntimeTypeAdapter.INSTANCE.a(), new NullSerializableTypeAdapterFactory()});
/* compiled from: kotlin-style lambda group */
@ -95,6 +95,7 @@ public final class a {
public static final C0023a K = new C0023a(28);
public static final C0023a L = new C0023a(29);
public static final C0023a M = new C0023a(30);
public static final C0023a N = new C0023a(31);
public static final C0023a i = new C0023a(0);
public static final C0023a j = new C0023a(1);
public static final C0023a k = new C0023a(2);
@ -121,80 +122,82 @@ public final class a {
/* renamed from: z reason: collision with root package name */
public static final C0023a f44z = new C0023a(17);
public final /* synthetic */ int N;
public final /* synthetic */ int O;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public C0023a(int i2) {
super(0);
this.N = i2;
this.O = i2;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final Object mo1invoke() {
switch (this.N) {
switch (this.O) {
case 0:
return new GuildVerificationLevelTypeAdapter();
case 1:
return new GuildExplicitContentFilterTypeAdapter();
case 2:
return new GuildMaxVideoChannelUsersTypeAdapter();
case 3:
return new ComponentTypeTypeAdapter();
case 4:
return new ButtonStyleTypeAdapter();
case 5:
return new ReportNodeChildTypeAdapter();
case 6:
return new ReportNodeElementDataTypeAdapter();
case 7:
return new ReportNodeBottomButtonTypeAdapter();
case 8:
return new ApplicationCommandPermissionTypeTypeAdapter();
case 9:
return new StageInstancePrivacyLevelTypeAdapter();
case 10:
return new FriendSuggestionReasonTypeAdapter();
case 11:
return new AllowedInSuggestionsTypeAdapter();
case 12:
return new StickerFormatTypeTypeAdapter();
case 13:
return new LocalizedStringTypeAdapter();
case 14:
return new MessageActivityTypeTypeAdapter();
case 15:
return new EmbedTypeTypeAdapter();
case 16:
return new StickerTypeTypeAdapter();
case 17:
return new GuildScheduledEventStatusTypeAdapter();
case 18:
return new GuildScheduledEventEntityTypeTypeAdapter();
case 19:
return new AnalyticsSchemaTypeAdapter();
case 20:
return new ApplicationStatusTypeAdapter();
case 21:
return new GuildRoleSubscriptionBenefitTypeAdapter();
case 22:
return new PriceTierTypeAdapter();
case 23:
return new ApplicationTypeAdapter();
case 24:
return new UtcDateTimeTypeAdapter();
case 25:
return new NsfwAllowanceTypeAdapter();
case 26:
return new PremiumTierTypeAdapter();
case 27:
return new ActivityTypeTypeAdapter();
case 28:
return new PhoneTypeAdapter();
case 29:
return new CommandTypeAdapter();
case 30:
return new OAuthScopeTypeAdapter();
case 1:
return new GuildVerificationLevelTypeAdapter();
case 2:
return new GuildExplicitContentFilterTypeAdapter();
case 3:
return new GuildMaxVideoChannelUsersTypeAdapter();
case 4:
return new ComponentTypeTypeAdapter();
case 5:
return new ButtonStyleTypeAdapter();
case 6:
return new ReportNodeChildTypeAdapter();
case 7:
return new ReportNodeElementDataTypeAdapter();
case 8:
return new ReportNodeBottomButtonTypeAdapter();
case 9:
return new ApplicationCommandPermissionTypeTypeAdapter();
case 10:
return new StageInstancePrivacyLevelTypeAdapter();
case 11:
return new FriendSuggestionReasonTypeAdapter();
case 12:
return new AllowedInSuggestionsTypeAdapter();
case 13:
return new StickerFormatTypeTypeAdapter();
case 14:
return new LocalizedStringTypeAdapter();
case 15:
return new MessageActivityTypeTypeAdapter();
case 16:
return new EmbedTypeTypeAdapter();
case 17:
return new StickerTypeTypeAdapter();
case 18:
return new GuildScheduledEventStatusTypeAdapter();
case 19:
return new GuildScheduledEventEntityTypeTypeAdapter();
case 20:
return new ActivityTypeTypeAdapter();
case 21:
return new AnalyticsSchemaTypeAdapter();
case 22:
return new GuildRoleSubscriptionBenefitTypeAdapter();
case 23:
return new PriceTierTypeAdapter();
case 24:
return new ApplicationTypeAdapter();
case 25:
return new ApplicationStatusTypeAdapter();
case 26:
return new UtcDateTimeTypeAdapter();
case 27:
return new NsfwAllowanceTypeAdapter();
case 28:
return new PremiumTierTypeAdapter();
case 29:
return new ActivityTypeTypeAdapter();
case 30:
return new PhoneTypeAdapter();
case 31:
return new CommandTypeAdapter();
default:
throw null;
}

View File

@ -0,0 +1,38 @@
package com.discord.api.activity;
import c.d.b.a.a;
import d0.z.d.m;
/* compiled from: ActivitySecrets.kt */
public final class ActivitySecrets {
private final String join;
private final String match;
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ActivitySecrets)) {
return false;
}
ActivitySecrets activitySecrets = (ActivitySecrets) obj;
return m.areEqual(this.match, activitySecrets.match) && m.areEqual(this.join, activitySecrets.join);
}
public int hashCode() {
String str = this.match;
int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
String str2 = this.join;
if (str2 != null) {
i = str2.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder R = a.R("ActivitySecrets(match=");
R.append(this.match);
R.append(", join=");
return a.H(R, this.join, ")");
}
}

View File

@ -1,4 +1,6 @@
package com.discord.api.activity;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: ActivityType.kt */
public enum ActivityType {
PLAYING(0),
@ -9,8 +11,18 @@ public enum ActivityType {
COMPETING(5),
UNKNOWN(-1);
public static final Companion Companion = new Companion(null);
private final int apiInt;
/* compiled from: ActivityType.kt */
public static final class Companion {
public Companion() {
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
}
}
private ActivityType(int i) {
this.apiInt = i;
}

View File

@ -1,31 +1,48 @@
package com.discord.api.activity;
import c.c.a.a0.d;
import com.discord.api.activity.ActivityType;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import d0.z.d.m;
import java.util.Objects;
/* compiled from: ActivityType.kt */
public final class ActivityTypeTypeAdapter extends TypeAdapter<ActivityType> {
/* Return type fixed from 'java.lang.Object' to match base method */
@Override // com.google.gson.TypeAdapter
public ActivityType read(JsonReader jsonReader) {
ActivityType activityType;
m.checkNotNullParameter(jsonReader, "in");
int y2 = jsonReader.y();
ActivityType[] values = ActivityType.values();
int i = 0;
while (true) {
if (i >= 7) {
activityType = null;
break;
}
activityType = values[i];
if (activityType.getApiInt$discord_api() == y2) {
break;
}
i++;
ActivityType.Companion companion = ActivityType.Companion;
Integer l1 = d.l1(jsonReader);
Objects.requireNonNull(companion);
ActivityType activityType = ActivityType.PLAYING;
int apiInt$discord_api = activityType.getApiInt$discord_api();
if (l1 != null && l1.intValue() == apiInt$discord_api) {
return activityType;
}
return activityType != null ? activityType : ActivityType.UNKNOWN;
ActivityType activityType2 = ActivityType.STREAMING;
int apiInt$discord_api2 = activityType2.getApiInt$discord_api();
if (l1 != null && l1.intValue() == apiInt$discord_api2) {
return activityType2;
}
ActivityType activityType3 = ActivityType.LISTENING;
int apiInt$discord_api3 = activityType3.getApiInt$discord_api();
if (l1 != null && l1.intValue() == apiInt$discord_api3) {
return activityType3;
}
ActivityType activityType4 = ActivityType.WATCHING;
int apiInt$discord_api4 = activityType4.getApiInt$discord_api();
if (l1 != null && l1.intValue() == apiInt$discord_api4) {
return activityType4;
}
ActivityType activityType5 = ActivityType.CUSTOM_STATUS;
int apiInt$discord_api5 = activityType5.getApiInt$discord_api();
if (l1 != null && l1.intValue() == apiInt$discord_api5) {
return activityType5;
}
ActivityType activityType6 = ActivityType.COMPETING;
return (l1 != null && l1.intValue() == activityType6.getApiInt$discord_api()) ? activityType6 : ActivityType.UNKNOWN;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.google.gson.stream.JsonWriter, java.lang.Object] */

View File

@ -13,6 +13,7 @@ public enum ApplicationCommandType {
ROLE(8),
MENTIONABLE(9),
NUMBER(10),
ATTACHMENT(11),
UNKNOWN(0);
public static final Companion Companion = new Companion(null);

View File

@ -36,6 +36,8 @@ public final class CommandTypeAdapter extends TypeAdapter<ApplicationCommandType
return ApplicationCommandType.MENTIONABLE;
case 10:
return ApplicationCommandType.NUMBER;
case 11:
return ApplicationCommandType.ATTACHMENT;
default:
return ApplicationCommandType.UNKNOWN;
}

View File

@ -0,0 +1,115 @@
package com.discord.api.embeddedactivities;
import c.d.b.a.a;
import com.discord.api.activity.ActivityAssets;
import com.discord.api.activity.ActivitySecrets;
import com.discord.api.activity.ActivityTimestamps;
import com.discord.api.activity.ActivityType;
import d0.z.d.m;
/* compiled from: EmbeddedActivity.kt */
public final class EmbeddedActivity {
private final long applicationId;
private final ActivityAssets assets;
private final Long createdAt;
private final String details;
private final String name;
private final ActivitySecrets secrets;
private final String state;
private final ActivityTimestamps timestamps;
private final ActivityType type;
public final long a() {
return this.applicationId;
}
public final ActivityAssets b() {
return this.assets;
}
public final Long c() {
return this.createdAt;
}
public final String d() {
return this.details;
}
public final String e() {
return this.name;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof EmbeddedActivity)) {
return false;
}
EmbeddedActivity embeddedActivity = (EmbeddedActivity) obj;
return this.applicationId == embeddedActivity.applicationId && m.areEqual(this.assets, embeddedActivity.assets) && m.areEqual(this.createdAt, embeddedActivity.createdAt) && m.areEqual(this.details, embeddedActivity.details) && m.areEqual(this.name, embeddedActivity.name) && m.areEqual(this.secrets, embeddedActivity.secrets) && m.areEqual(this.state, embeddedActivity.state) && m.areEqual(this.timestamps, embeddedActivity.timestamps) && m.areEqual(this.type, embeddedActivity.type);
}
public final ActivitySecrets f() {
return this.secrets;
}
public final String g() {
return this.state;
}
public final ActivityTimestamps h() {
return this.timestamps;
}
public int hashCode() {
long j = this.applicationId;
int i = ((int) (j ^ (j >>> 32))) * 31;
ActivityAssets activityAssets = this.assets;
int i2 = 0;
int hashCode = (i + (activityAssets != null ? activityAssets.hashCode() : 0)) * 31;
Long l = this.createdAt;
int hashCode2 = (hashCode + (l != null ? l.hashCode() : 0)) * 31;
String str = this.details;
int hashCode3 = (hashCode2 + (str != null ? str.hashCode() : 0)) * 31;
String str2 = this.name;
int hashCode4 = (hashCode3 + (str2 != null ? str2.hashCode() : 0)) * 31;
ActivitySecrets activitySecrets = this.secrets;
int hashCode5 = (hashCode4 + (activitySecrets != null ? activitySecrets.hashCode() : 0)) * 31;
String str3 = this.state;
int hashCode6 = (hashCode5 + (str3 != null ? str3.hashCode() : 0)) * 31;
ActivityTimestamps activityTimestamps = this.timestamps;
int hashCode7 = (hashCode6 + (activityTimestamps != null ? activityTimestamps.hashCode() : 0)) * 31;
ActivityType activityType = this.type;
if (activityType != null) {
i2 = activityType.hashCode();
}
return hashCode7 + i2;
}
public final ActivityType i() {
return this.type;
}
public String toString() {
StringBuilder R = a.R("EmbeddedActivity(applicationId=");
R.append(this.applicationId);
R.append(", assets=");
R.append(this.assets);
R.append(", createdAt=");
R.append(this.createdAt);
R.append(", details=");
R.append(this.details);
R.append(", name=");
R.append(this.name);
R.append(", secrets=");
R.append(this.secrets);
R.append(", state=");
R.append(this.state);
R.append(", timestamps=");
R.append(this.timestamps);
R.append(", type=");
R.append(this.type);
R.append(")");
return R.toString();
}
}

View File

@ -0,0 +1,56 @@
package com.discord.api.embeddedactivities;
import c.d.b.a.a;
import d0.z.d.m;
import java.util.List;
/* compiled from: EmbeddedActivityInGuild.kt */
public final class EmbeddedActivityInGuild {
private final long channelId;
private final EmbeddedActivity embeddedActivity;
private final List<Long> users;
public final long a() {
return this.channelId;
}
public final EmbeddedActivity b() {
return this.embeddedActivity;
}
public final List<Long> c() {
return this.users;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof EmbeddedActivityInGuild)) {
return false;
}
EmbeddedActivityInGuild embeddedActivityInGuild = (EmbeddedActivityInGuild) obj;
return this.channelId == embeddedActivityInGuild.channelId && m.areEqual(this.embeddedActivity, embeddedActivityInGuild.embeddedActivity) && m.areEqual(this.users, embeddedActivityInGuild.users);
}
public int hashCode() {
long j = this.channelId;
int i = ((int) (j ^ (j >>> 32))) * 31;
EmbeddedActivity embeddedActivity = this.embeddedActivity;
int i2 = 0;
int hashCode = (i + (embeddedActivity != null ? embeddedActivity.hashCode() : 0)) * 31;
List<Long> list = this.users;
if (list != null) {
i2 = list.hashCode();
}
return hashCode + i2;
}
public String toString() {
StringBuilder R = a.R("EmbeddedActivityInGuild(channelId=");
R.append(this.channelId);
R.append(", embeddedActivity=");
R.append(this.embeddedActivity);
R.append(", users=");
return a.J(R, this.users, ")");
}
}

View File

@ -0,0 +1,65 @@
package com.discord.api.embeddedactivities;
import c.d.b.a.a;
import d0.z.d.m;
import java.util.List;
/* compiled from: EmbeddedActivityInboundUpdate.kt */
public final class EmbeddedActivityInboundUpdate {
private final long channelId;
private final EmbeddedActivity embeddedActivity;
private final long guildId;
private final List<Long> users;
public final long a() {
return this.channelId;
}
public final EmbeddedActivity b() {
return this.embeddedActivity;
}
public final long c() {
return this.guildId;
}
public final List<Long> d() {
return this.users;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof EmbeddedActivityInboundUpdate)) {
return false;
}
EmbeddedActivityInboundUpdate embeddedActivityInboundUpdate = (EmbeddedActivityInboundUpdate) obj;
return this.channelId == embeddedActivityInboundUpdate.channelId && m.areEqual(this.embeddedActivity, embeddedActivityInboundUpdate.embeddedActivity) && this.guildId == embeddedActivityInboundUpdate.guildId && m.areEqual(this.users, embeddedActivityInboundUpdate.users);
}
public int hashCode() {
long j = this.channelId;
int i = ((int) (j ^ (j >>> 32))) * 31;
EmbeddedActivity embeddedActivity = this.embeddedActivity;
int i2 = 0;
int hashCode = embeddedActivity != null ? embeddedActivity.hashCode() : 0;
long j2 = this.guildId;
int i3 = (((i + hashCode) * 31) + ((int) (j2 ^ (j2 >>> 32)))) * 31;
List<Long> list = this.users;
if (list != null) {
i2 = list.hashCode();
}
return i3 + i2;
}
public String toString() {
StringBuilder R = a.R("EmbeddedActivityInboundUpdate(channelId=");
R.append(this.channelId);
R.append(", embeddedActivity=");
R.append(this.embeddedActivity);
R.append(", guildId=");
R.append(this.guildId);
R.append(", users=");
return a.J(R, this.users, ")");
}
}

View File

@ -3,6 +3,7 @@ package com.discord.api.guild;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import c.d.b.a.a;
import com.discord.api.channel.Channel;
import com.discord.api.embeddedactivities.EmbeddedActivityInGuild;
import com.discord.api.emoji.GuildEmoji;
import com.discord.api.guild.welcome.GuildWelcomeScreen;
import com.discord.api.guildhash.GuildHashes;
@ -28,6 +29,7 @@ public final class Guild {
private final List<Channel> channels;
private final Integer defaultMessageNotifications;
private final String description;
private final List<EmbeddedActivityInGuild> embeddedActivities;
private final List<GuildEmoji> emojis;
private final GuildExplicitContentFilter explicitContentFilter;
private final List<GuildFeature> features;
@ -66,11 +68,12 @@ public final class Guild {
private final List<VoiceState> voiceStates;
private final GuildWelcomeScreen welcomeScreen;
/* JADX DEBUG: Multi-variable search result rejected for r29v0, resolved type: java.util.List<? extends com.discord.api.guild.GuildFeature> */
/* JADX DEBUG: Multi-variable search result rejected for r30v0, resolved type: java.util.List<? extends com.discord.api.guild.GuildFeature> */
/* JADX WARN: Multi-variable type inference failed */
public Guild(List<GuildRole> list, List<GuildEmoji> list2, List<Sticker> list3, String str, String str2, Integer num, long j, String str3, long j2, String str4, GuildVerificationLevel guildVerificationLevel, GuildExplicitContentFilter guildExplicitContentFilter, List<Presence> list4, List<Channel> list5, List<GuildMember> list6, List<VoiceState> list7, boolean z2, int i, int i2, Long l, Long l2, List<? extends GuildFeature> list8, int i3, String str5, String str6, int i4, int i5, int i6, String str7, Long l3, Long l4, String str8, GuildWelcomeScreen guildWelcomeScreen, GuildMaxVideoChannelUsers guildMaxVideoChannelUsers, String str9, int i7, int i8, Integer num2, GuildHashes guildHashes, List<Channel> list9, List<Channel> list10, boolean z3, List<StageInstance> list11, List<GuildScheduledEvent> list12) {
public Guild(List<GuildRole> list, List<GuildEmoji> list2, List<Sticker> list3, String str, String str2, Integer num, long j, String str3, long j2, String str4, GuildVerificationLevel guildVerificationLevel, GuildExplicitContentFilter guildExplicitContentFilter, List<Presence> list4, List<Channel> list5, List<GuildMember> list6, List<VoiceState> list7, boolean z2, int i, int i2, Long l, Long l2, List<? extends GuildFeature> list8, int i3, String str5, String str6, int i4, int i5, int i6, String str7, Long l3, Long l4, String str8, GuildWelcomeScreen guildWelcomeScreen, GuildMaxVideoChannelUsers guildMaxVideoChannelUsers, String str9, int i7, int i8, Integer num2, GuildHashes guildHashes, List<Channel> list9, List<Channel> list10, boolean z3, List<StageInstance> list11, List<GuildScheduledEvent> list12, List<EmbeddedActivityInGuild> list13) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_NAME);
m.checkNotNullParameter(list8, "features");
m.checkNotNullParameter(list13, "embeddedActivities");
this.roles = list;
this.emojis = list2;
this.stickers = list3;
@ -115,12 +118,13 @@ public final class Guild {
this.nsfw = z3;
this.stageInstances = list11;
this.guildScheduledEvents = list12;
this.embeddedActivities = list13;
}
public static Guild a(Guild guild, List list, List list2, List list3, String str, String str2, Integer num, long j, String str3, long j2, String str4, GuildVerificationLevel guildVerificationLevel, GuildExplicitContentFilter guildExplicitContentFilter, List list4, List list5, List list6, List list7, boolean z2, int i, int i2, Long l, Long l2, List list8, int i3, String str5, String str6, int i4, int i5, int i6, String str7, Long l3, Long l4, String str8, GuildWelcomeScreen guildWelcomeScreen, GuildMaxVideoChannelUsers guildMaxVideoChannelUsers, String str9, int i7, int i8, Integer num2, GuildHashes guildHashes, List list9, List list10, boolean z3, List list11, List list12, int i9, int i10) {
List list13 = (i9 & 1) != 0 ? guild.roles : list;
List list14 = (i9 & 2) != 0 ? guild.emojis : list2;
List list15 = (i9 & 4) != 0 ? guild.stickers : list3;
public static Guild a(Guild guild, List list, List list2, List list3, String str, String str2, Integer num, long j, String str3, long j2, String str4, GuildVerificationLevel guildVerificationLevel, GuildExplicitContentFilter guildExplicitContentFilter, List list4, List list5, List list6, List list7, boolean z2, int i, int i2, Long l, Long l2, List list8, int i3, String str5, String str6, int i4, int i5, int i6, String str7, Long l3, Long l4, String str8, GuildWelcomeScreen guildWelcomeScreen, GuildMaxVideoChannelUsers guildMaxVideoChannelUsers, String str9, int i7, int i8, Integer num2, GuildHashes guildHashes, List list9, List list10, boolean z3, List list11, List list12, List list13, int i9, int i10) {
List list14 = (i9 & 1) != 0 ? guild.roles : list;
List list15 = (i9 & 2) != 0 ? guild.emojis : list2;
List list16 = (i9 & 4) != 0 ? guild.stickers : list3;
String str10 = (i9 & 8) != 0 ? guild.name : str;
String str11 = (i9 & 16) != 0 ? guild.description : str2;
Integer num3 = (i9 & 32) != 0 ? guild.defaultMessageNotifications : num;
@ -130,10 +134,9 @@ public final class Guild {
String str13 = (i9 & 512) != 0 ? guild.icon : str4;
GuildVerificationLevel guildVerificationLevel2 = (i9 & 1024) != 0 ? guild.verificationLevel : guildVerificationLevel;
GuildExplicitContentFilter guildExplicitContentFilter2 = (i9 & 2048) != 0 ? guild.explicitContentFilter : guildExplicitContentFilter;
List list16 = (i9 & 4096) != 0 ? guild.presences : list4;
List list17 = (i9 & 8192) != 0 ? guild.channels : list5;
List list18 = (i9 & 16384) != 0 ? guild.members : list6;
List<GuildScheduledEvent> list19 = null;
List list17 = (i9 & 4096) != 0 ? guild.presences : list4;
List list18 = (i9 & 8192) != 0 ? guild.channels : list5;
List list19 = (i9 & 16384) != 0 ? guild.members : list6;
List<VoiceState> list20 = (i9 & 32768) != 0 ? guild.voiceStates : null;
boolean z4 = (i9 & 65536) != 0 ? guild.unavailable : z2;
int i11 = (i9 & 131072) != 0 ? guild.mfaLevel : i;
@ -162,80 +165,84 @@ public final class Guild {
List<Channel> list23 = (i10 & 256) != 0 ? guild.threads : null;
boolean z5 = (i10 & 512) != 0 ? guild.nsfw : z3;
List<StageInstance> list24 = (i10 & 1024) != 0 ? guild.stageInstances : null;
if ((i10 & 2048) != 0) {
list19 = guild.guildScheduledEvents;
}
List<GuildScheduledEvent> list25 = (i10 & 2048) != 0 ? guild.guildScheduledEvents : null;
List<EmbeddedActivityInGuild> list26 = (i10 & 4096) != 0 ? guild.embeddedActivities : null;
Objects.requireNonNull(guild);
m.checkNotNullParameter(str10, ModelAuditLogEntry.CHANGE_KEY_NAME);
m.checkNotNullParameter(list21, "features");
return new Guild(list13, list14, list15, str10, str11, num3, j3, str12, j4, str13, guildVerificationLevel2, guildExplicitContentFilter2, list16, list17, list18, list20, z4, i11, i12, l5, l6, list21, i13, str14, str15, i14, i15, i16, str16, l7, l8, str17, guildWelcomeScreen2, guildMaxVideoChannelUsers2, str18, i17, i18, num4, guildHashes2, list22, list23, z5, list24, list19);
m.checkNotNullParameter(list26, "embeddedActivities");
return new Guild(list14, list15, list16, str10, str11, num3, j3, str12, j4, str13, guildVerificationLevel2, guildExplicitContentFilter2, list17, list18, list19, list20, z4, i11, i12, l5, l6, list21, i13, str14, str15, i14, i15, i16, str16, l7, l8, str17, guildWelcomeScreen2, guildMaxVideoChannelUsers2, str18, i17, i18, num4, guildHashes2, list22, list23, z5, list24, list25, list26);
}
public final int A() {
return this.premiumSubscriptionCount;
}
public final int B() {
return this.premiumTier;
}
public final List<Presence> B() {
public final List<Presence> C() {
return this.presences;
}
public final Long C() {
public final Long D() {
return this.publicUpdatesChannelId;
}
public final String D() {
public final String E() {
return this.region;
}
public final List<GuildRole> E() {
public final List<GuildRole> F() {
return this.roles;
}
public final Long F() {
public final Long G() {
return this.rulesChannelId;
}
public final String G() {
public final String H() {
return this.splash;
}
public final List<StageInstance> H() {
public final List<StageInstance> I() {
return this.stageInstances;
}
public final List<Sticker> I() {
public final List<Sticker> J() {
return this.stickers;
}
public final int J() {
public final int K() {
return this.systemChannelFlags;
}
public final Long K() {
public final Long L() {
return this.systemChannelId;
}
public final List<Channel> L() {
public final List<Channel> M() {
return this.threads;
}
public final boolean M() {
public final boolean N() {
return this.unavailable;
}
public final String N() {
public final String O() {
return this.vanityUrlCode;
}
public final GuildVerificationLevel O() {
public final GuildVerificationLevel P() {
return this.verificationLevel;
}
public final List<VoiceState> P() {
public final List<VoiceState> Q() {
return this.voiceStates;
}
public final GuildWelcomeScreen Q() {
public final GuildWelcomeScreen R() {
return this.welcomeScreen;
}
@ -263,7 +270,7 @@ public final class Guild {
return false;
}
Guild guild = (Guild) obj;
return m.areEqual(this.roles, guild.roles) && m.areEqual(this.emojis, guild.emojis) && m.areEqual(this.stickers, guild.stickers) && m.areEqual(this.name, guild.name) && m.areEqual(this.description, guild.description) && m.areEqual(this.defaultMessageNotifications, guild.defaultMessageNotifications) && this.f1606id == guild.f1606id && m.areEqual(this.region, guild.region) && this.ownerId == guild.ownerId && m.areEqual(this.icon, guild.icon) && m.areEqual(this.verificationLevel, guild.verificationLevel) && m.areEqual(this.explicitContentFilter, guild.explicitContentFilter) && m.areEqual(this.presences, guild.presences) && m.areEqual(this.channels, guild.channels) && m.areEqual(this.members, guild.members) && m.areEqual(this.voiceStates, guild.voiceStates) && this.unavailable == guild.unavailable && this.mfaLevel == guild.mfaLevel && this.afkTimeout == guild.afkTimeout && m.areEqual(this.afkChannelId, guild.afkChannelId) && m.areEqual(this.systemChannelId, guild.systemChannelId) && m.areEqual(this.features, guild.features) && this.memberCount == guild.memberCount && m.areEqual(this.banner, guild.banner) && m.areEqual(this.splash, guild.splash) && this.premiumTier == guild.premiumTier && this.premiumSubscriptionCount == guild.premiumSubscriptionCount && this.systemChannelFlags == guild.systemChannelFlags && m.areEqual(this.joinedAt, guild.joinedAt) && m.areEqual(this.rulesChannelId, guild.rulesChannelId) && m.areEqual(this.publicUpdatesChannelId, guild.publicUpdatesChannelId) && m.areEqual(this.preferredLocale, guild.preferredLocale) && m.areEqual(this.welcomeScreen, guild.welcomeScreen) && m.areEqual(this.maxVideoChannelUsers, guild.maxVideoChannelUsers) && m.areEqual(this.vanityUrlCode, guild.vanityUrlCode) && this.approximateMemberCount == guild.approximateMemberCount && this.approximatePresenceCount == guild.approximatePresenceCount && m.areEqual(this.permissions, guild.permissions) && m.areEqual(this.guildHashes, guild.guildHashes) && m.areEqual(this.channelUpdates, guild.channelUpdates) && m.areEqual(this.threads, guild.threads) && this.nsfw == guild.nsfw && m.areEqual(this.stageInstances, guild.stageInstances) && m.areEqual(this.guildScheduledEvents, guild.guildScheduledEvents);
return m.areEqual(this.roles, guild.roles) && m.areEqual(this.emojis, guild.emojis) && m.areEqual(this.stickers, guild.stickers) && m.areEqual(this.name, guild.name) && m.areEqual(this.description, guild.description) && m.areEqual(this.defaultMessageNotifications, guild.defaultMessageNotifications) && this.f1606id == guild.f1606id && m.areEqual(this.region, guild.region) && this.ownerId == guild.ownerId && m.areEqual(this.icon, guild.icon) && m.areEqual(this.verificationLevel, guild.verificationLevel) && m.areEqual(this.explicitContentFilter, guild.explicitContentFilter) && m.areEqual(this.presences, guild.presences) && m.areEqual(this.channels, guild.channels) && m.areEqual(this.members, guild.members) && m.areEqual(this.voiceStates, guild.voiceStates) && this.unavailable == guild.unavailable && this.mfaLevel == guild.mfaLevel && this.afkTimeout == guild.afkTimeout && m.areEqual(this.afkChannelId, guild.afkChannelId) && m.areEqual(this.systemChannelId, guild.systemChannelId) && m.areEqual(this.features, guild.features) && this.memberCount == guild.memberCount && m.areEqual(this.banner, guild.banner) && m.areEqual(this.splash, guild.splash) && this.premiumTier == guild.premiumTier && this.premiumSubscriptionCount == guild.premiumSubscriptionCount && this.systemChannelFlags == guild.systemChannelFlags && m.areEqual(this.joinedAt, guild.joinedAt) && m.areEqual(this.rulesChannelId, guild.rulesChannelId) && m.areEqual(this.publicUpdatesChannelId, guild.publicUpdatesChannelId) && m.areEqual(this.preferredLocale, guild.preferredLocale) && m.areEqual(this.welcomeScreen, guild.welcomeScreen) && m.areEqual(this.maxVideoChannelUsers, guild.maxVideoChannelUsers) && m.areEqual(this.vanityUrlCode, guild.vanityUrlCode) && this.approximateMemberCount == guild.approximateMemberCount && this.approximatePresenceCount == guild.approximatePresenceCount && m.areEqual(this.permissions, guild.permissions) && m.areEqual(this.guildHashes, guild.guildHashes) && m.areEqual(this.channelUpdates, guild.channelUpdates) && m.areEqual(this.threads, guild.threads) && this.nsfw == guild.nsfw && m.areEqual(this.stageInstances, guild.stageInstances) && m.areEqual(this.guildScheduledEvents, guild.guildScheduledEvents) && m.areEqual(this.embeddedActivities, guild.embeddedActivities);
}
public final List<Channel> f() {
@ -361,60 +368,62 @@ public final class Guild {
List<StageInstance> list11 = this.stageInstances;
int hashCode31 = (i9 + (list11 != null ? list11.hashCode() : 0)) * 31;
List<GuildScheduledEvent> list12 = this.guildScheduledEvents;
if (list12 != null) {
i = list12.hashCode();
int hashCode32 = (hashCode31 + (list12 != null ? list12.hashCode() : 0)) * 31;
List<EmbeddedActivityInGuild> list13 = this.embeddedActivities;
if (list13 != null) {
i = list13.hashCode();
}
return hashCode31 + i;
return hashCode32 + i;
}
public final String i() {
return this.description;
}
public final List<GuildEmoji> j() {
public final List<EmbeddedActivityInGuild> j() {
return this.embeddedActivities;
}
public final List<GuildEmoji> k() {
return this.emojis;
}
public final GuildExplicitContentFilter k() {
public final GuildExplicitContentFilter l() {
return this.explicitContentFilter;
}
public final List<GuildFeature> l() {
public final List<GuildFeature> m() {
return this.features;
}
public final GuildHashes m() {
public final GuildHashes n() {
return this.guildHashes;
}
public final List<GuildScheduledEvent> n() {
public final List<GuildScheduledEvent> o() {
return this.guildScheduledEvents;
}
public final String o() {
public final String p() {
return this.icon;
}
public final long p() {
public final long q() {
return this.f1606id;
}
public final String q() {
public final String r() {
return this.joinedAt;
}
public final GuildMaxVideoChannelUsers r() {
public final GuildMaxVideoChannelUsers s() {
return this.maxVideoChannelUsers;
}
public final int s() {
public final int t() {
return this.memberCount;
}
public final List<GuildMember> t() {
return this.members;
}
public String toString() {
StringBuilder R = a.R("Guild(roles=");
R.append(this.roles);
@ -503,30 +512,32 @@ public final class Guild {
R.append(", stageInstances=");
R.append(this.stageInstances);
R.append(", guildScheduledEvents=");
return a.J(R, this.guildScheduledEvents, ")");
R.append(this.guildScheduledEvents);
R.append(", embeddedActivities=");
return a.J(R, this.embeddedActivities, ")");
}
public final int u() {
public final List<GuildMember> u() {
return this.members;
}
public final int v() {
return this.mfaLevel;
}
public final String v() {
public final String w() {
return this.name;
}
public final boolean w() {
public final boolean x() {
return this.nsfw;
}
public final long x() {
public final long y() {
return this.ownerId;
}
public final String y() {
public final String z() {
return this.preferredLocale;
}
public final int z() {
return this.premiumSubscriptionCount;
}
}

View File

@ -1,5 +1,7 @@
package com.discord.api.guildscheduledevent;
import d0.t.n0;
import java.util.Set;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: GuildScheduledEventStatus.kt */
public enum GuildScheduledEventStatus {
@ -10,6 +12,7 @@ public enum GuildScheduledEventStatus {
UNKNOWN(0);
public static final Companion Companion = new Companion(null);
private static final Set<GuildScheduledEventStatus> DONE = n0.setOf((Object[]) new GuildScheduledEventStatus[]{COMPLETED, CANCELED});
private final int apiValue;
/* compiled from: GuildScheduledEventStatus.kt */
@ -25,6 +28,10 @@ public enum GuildScheduledEventStatus {
this.apiValue = i;
}
public static final /* synthetic */ Set access$getDONE$cp() {
return DONE;
}
public final int getApiValue() {
return this.apiValue;
}

View File

@ -3,6 +3,7 @@ package com.discord.gateway.io;
import c.d.b.a.a;
import com.discord.api.commands.ApplicationCommandAutocompleteResult;
import com.discord.api.commands.GuildApplicationCommands;
import com.discord.api.embeddedactivities.EmbeddedActivityInboundUpdate;
import com.discord.api.emoji.GuildEmojisUpdate;
import com.discord.api.friendsuggestions.FriendSuggestion;
import com.discord.api.friendsuggestions.FriendSuggestionDelete;
@ -145,7 +146,7 @@ public final class IncomingParser implements Model {
r6.data = com.discord.models.deserialization.gson.InboundGatewayGsonParser.fromJson(r7, com.discord.api.interaction.InteractionStateUpdate.class);
*/
/* JADX WARNING: Code restructure failed: missing block: B:187:0x044d, code lost:
if (r3.equals("MESSAGE_REACTION_ADD") != false) goto L_0x05a3;
if (r3.equals("MESSAGE_REACTION_ADD") != false) goto L_0x05b5;
*/
/* JADX WARNING: Code restructure failed: missing block: B:189:0x0457, code lost:
if (r3.equals("STAGE_INSTANCE_DELETE") != false) goto L_0x0489;
@ -175,73 +176,73 @@ public final class IncomingParser implements Model {
r6.data = r7.parse(new com.discord.models.domain.ModelUserRelationship());
*/
/* JADX WARNING: Code restructure failed: missing block: B:215:0x04f2, code lost:
if (r3.equals("MESSAGE_REACTION_REMOVE_ALL") != false) goto L_0x05a3;
if (r3.equals("MESSAGE_REACTION_REMOVE_ALL") != false) goto L_0x05b5;
*/
/* JADX WARNING: Code restructure failed: missing block: B:217:0x04fc, code lost:
if (r3.equals("GUILD_JOIN_REQUEST_UPDATE") != false) goto L_0x0592;
if (r3.equals("GUILD_JOIN_REQUEST_UPDATE") != false) goto L_0x05a4;
*/
/* JADX WARNING: Code restructure failed: missing block: B:225:0x052a, code lost:
if (r3.equals("USER_CONNECTIONS_INTEGRATION_JOINING") != false) goto L_0x052c;
/* JADX WARNING: Code restructure failed: missing block: B:228:0x053c, code lost:
if (r3.equals("USER_CONNECTIONS_INTEGRATION_JOINING") != false) goto L_0x053e;
*/
/* JADX WARNING: Code restructure failed: missing block: B:226:0x052c, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:229:0x053e, code lost:
r7.skipValue();
r6.data = kotlin.Unit.a;
*/
/* JADX WARNING: Code restructure failed: missing block: B:243:0x0590, code lost:
if (r3.equals("GUILD_JOIN_REQUEST_CREATE") != false) goto L_0x0592;
/* JADX WARNING: Code restructure failed: missing block: B:246:0x05a2, code lost:
if (r3.equals("GUILD_JOIN_REQUEST_CREATE") != false) goto L_0x05a4;
*/
/* JADX WARNING: Code restructure failed: missing block: B:244:0x0592, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:247:0x05a4, code lost:
r6.data = com.discord.models.deserialization.gson.InboundGatewayGsonParser.fromJson(r7, com.discord.api.guildjoinrequest.GuildJoinRequestCreateOrUpdate.class);
*/
/* JADX WARNING: Code restructure failed: missing block: B:246:0x05a1, code lost:
if (r3.equals("MESSAGE_REACTION_REMOVE_EMOJI") != false) goto L_0x05a3;
/* JADX WARNING: Code restructure failed: missing block: B:249:0x05b3, code lost:
if (r3.equals("MESSAGE_REACTION_REMOVE_EMOJI") != false) goto L_0x05b5;
*/
/* JADX WARNING: Code restructure failed: missing block: B:247:0x05a3, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:250:0x05b5, code lost:
r6.data = com.discord.models.deserialization.gson.InboundGatewayGsonParser.fromJson(r7, com.discord.api.message.reaction.MessageReactionUpdate.class);
*/
/* JADX WARNING: Code restructure failed: missing block: B:271:?, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:274:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:272:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:279:?, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:275:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:282:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:283:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:285:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:286:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:290:?, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:288:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:294:?, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:289:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:295:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:296:?, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:293:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:297:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:304:?, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:298:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:310:?, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:299:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:311:?, code lost:
/* JADX WARNING: Code restructure failed: missing block: B:300:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:308:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:314:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:315:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:50:0x0103, code lost:
@ -257,7 +258,7 @@ public final class IncomingParser implements Model {
if (r3.equals("MESSAGE_UPDATE") != false) goto L_0x0226;
*/
/* JADX WARNING: Code restructure failed: missing block: B:76:0x0198, code lost:
if (r3.equals("USER_CONNECTIONS_UPDATE") != false) goto L_0x052c;
if (r3.equals("USER_CONNECTIONS_UPDATE") != false) goto L_0x053e;
*/
/* JADX WARNING: Code restructure failed: missing block: B:84:0x01c9, code lost:
if (r3.equals("THREAD_DELETE") != false) goto L_0x01f8;
@ -269,7 +270,7 @@ public final class IncomingParser implements Model {
r6.data = com.discord.models.deserialization.gson.InboundGatewayGsonParser.fromJson(r7, com.discord.api.channel.Channel.class);
*/
/* JADX WARNING: Code restructure failed: missing block: B:95:0x0206, code lost:
if (r3.equals("MESSAGE_REACTION_REMOVE") != false) goto L_0x05a3;
if (r3.equals("MESSAGE_REACTION_REMOVE") != false) goto L_0x05b5;
*/
/* JADX WARNING: Code restructure failed: missing block: B:97:0x0210, code lost:
if (r3.equals("CHANNEL_RECIPIENT_ADD") != false) goto L_0x038c;
@ -356,6 +357,12 @@ public final class IncomingParser implements Model {
return;
}
break;
case -1580624828:
if (str.equals("EMBEDDED_ACTIVITY_UPDATE")) {
this.data = InboundGatewayGsonParser.fromJson(jsonReader, EmbeddedActivityInboundUpdate.class);
return;
}
break;
case -1553569310:
break;
case -1553064252:

View File

@ -0,0 +1,247 @@
package com.discord.models.embeddedactivities;
import a0.a.a.b;
import c.d.b.a.a;
import com.discord.api.activity.ActivityAssets;
import com.discord.api.activity.ActivitySecrets;
import com.discord.api.activity.ActivityTimestamps;
import com.discord.api.activity.ActivityType;
import d0.z.d.m;
import java.util.List;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: EmbeddedActivity.kt */
public final class EmbeddedActivity {
public static final Companion Companion = new Companion(null);
private final long applicationId;
private final ActivityAssets assets;
private final Long createdAt;
private final String details;
private final long guildId;
private final String name;
private final ActivitySecrets secrets;
private final String state;
private final ActivityTimestamps timestamps;
private final ActivityType type;
private final String url;
private final List<Long> userIds;
/* compiled from: EmbeddedActivity.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final EmbeddedActivity fromApiEmbeddedActivity(com.discord.api.embeddedactivities.EmbeddedActivity embeddedActivity, List<Long> list, String str, long j) {
m.checkNotNullParameter(embeddedActivity, "apiEmbeddedActivity");
m.checkNotNullParameter(list, "userIds");
m.checkNotNullParameter(str, "url");
long a = embeddedActivity.a();
ActivityAssets b = embeddedActivity.b();
Long c2 = embeddedActivity.c();
String d = embeddedActivity.d();
String e = embeddedActivity.e();
ActivitySecrets f = embeddedActivity.f();
String g = embeddedActivity.g();
ActivityTimestamps h = embeddedActivity.h();
ActivityType i = embeddedActivity.i();
if (i == null) {
i = ActivityType.UNKNOWN;
}
return new EmbeddedActivity(a, b, c2, d, e, f, g, h, i, list, str, j);
}
}
public EmbeddedActivity(long j, ActivityAssets activityAssets, Long l, String str, String str2, ActivitySecrets activitySecrets, String str3, ActivityTimestamps activityTimestamps, ActivityType activityType, List<Long> list, String str4, long j2) {
m.checkNotNullParameter(activityType, "type");
m.checkNotNullParameter(list, "userIds");
m.checkNotNullParameter(str4, "url");
this.applicationId = j;
this.assets = activityAssets;
this.createdAt = l;
this.details = str;
this.name = str2;
this.secrets = activitySecrets;
this.state = str3;
this.timestamps = activityTimestamps;
this.type = activityType;
this.userIds = list;
this.url = str4;
this.guildId = j2;
}
public static /* synthetic */ EmbeddedActivity copy$default(EmbeddedActivity embeddedActivity, long j, ActivityAssets activityAssets, Long l, String str, String str2, ActivitySecrets activitySecrets, String str3, ActivityTimestamps activityTimestamps, ActivityType activityType, List list, String str4, long j2, int i, Object obj) {
return embeddedActivity.copy((i & 1) != 0 ? embeddedActivity.applicationId : j, (i & 2) != 0 ? embeddedActivity.assets : activityAssets, (i & 4) != 0 ? embeddedActivity.createdAt : l, (i & 8) != 0 ? embeddedActivity.details : str, (i & 16) != 0 ? embeddedActivity.name : str2, (i & 32) != 0 ? embeddedActivity.secrets : activitySecrets, (i & 64) != 0 ? embeddedActivity.state : str3, (i & 128) != 0 ? embeddedActivity.timestamps : activityTimestamps, (i & 256) != 0 ? embeddedActivity.type : activityType, (i & 512) != 0 ? embeddedActivity.userIds : list, (i & 1024) != 0 ? embeddedActivity.url : str4, (i & 2048) != 0 ? embeddedActivity.guildId : j2);
}
public final long component1() {
return this.applicationId;
}
public final List<Long> component10() {
return this.userIds;
}
public final String component11() {
return this.url;
}
public final long component12() {
return this.guildId;
}
public final ActivityAssets component2() {
return this.assets;
}
public final Long component3() {
return this.createdAt;
}
public final String component4() {
return this.details;
}
public final String component5() {
return this.name;
}
public final ActivitySecrets component6() {
return this.secrets;
}
public final String component7() {
return this.state;
}
public final ActivityTimestamps component8() {
return this.timestamps;
}
public final ActivityType component9() {
return this.type;
}
public final EmbeddedActivity copy(long j, ActivityAssets activityAssets, Long l, String str, String str2, ActivitySecrets activitySecrets, String str3, ActivityTimestamps activityTimestamps, ActivityType activityType, List<Long> list, String str4, long j2) {
m.checkNotNullParameter(activityType, "type");
m.checkNotNullParameter(list, "userIds");
m.checkNotNullParameter(str4, "url");
return new EmbeddedActivity(j, activityAssets, l, str, str2, activitySecrets, str3, activityTimestamps, activityType, list, str4, j2);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof EmbeddedActivity)) {
return false;
}
EmbeddedActivity embeddedActivity = (EmbeddedActivity) obj;
return this.applicationId == embeddedActivity.applicationId && m.areEqual(this.assets, embeddedActivity.assets) && m.areEqual(this.createdAt, embeddedActivity.createdAt) && m.areEqual(this.details, embeddedActivity.details) && m.areEqual(this.name, embeddedActivity.name) && m.areEqual(this.secrets, embeddedActivity.secrets) && m.areEqual(this.state, embeddedActivity.state) && m.areEqual(this.timestamps, embeddedActivity.timestamps) && m.areEqual(this.type, embeddedActivity.type) && m.areEqual(this.userIds, embeddedActivity.userIds) && m.areEqual(this.url, embeddedActivity.url) && this.guildId == embeddedActivity.guildId;
}
public final long getApplicationId() {
return this.applicationId;
}
public final ActivityAssets getAssets() {
return this.assets;
}
public final Long getCreatedAt() {
return this.createdAt;
}
public final String getDetails() {
return this.details;
}
public final long getGuildId() {
return this.guildId;
}
public final String getName() {
return this.name;
}
public final ActivitySecrets getSecrets() {
return this.secrets;
}
public final String getState() {
return this.state;
}
public final ActivityTimestamps getTimestamps() {
return this.timestamps;
}
public final ActivityType getType() {
return this.type;
}
public final String getUrl() {
return this.url;
}
public final List<Long> getUserIds() {
return this.userIds;
}
public int hashCode() {
int a = b.a(this.applicationId) * 31;
ActivityAssets activityAssets = this.assets;
int i = 0;
int hashCode = (a + (activityAssets != null ? activityAssets.hashCode() : 0)) * 31;
Long l = this.createdAt;
int hashCode2 = (hashCode + (l != null ? l.hashCode() : 0)) * 31;
String str = this.details;
int hashCode3 = (hashCode2 + (str != null ? str.hashCode() : 0)) * 31;
String str2 = this.name;
int hashCode4 = (hashCode3 + (str2 != null ? str2.hashCode() : 0)) * 31;
ActivitySecrets activitySecrets = this.secrets;
int hashCode5 = (hashCode4 + (activitySecrets != null ? activitySecrets.hashCode() : 0)) * 31;
String str3 = this.state;
int hashCode6 = (hashCode5 + (str3 != null ? str3.hashCode() : 0)) * 31;
ActivityTimestamps activityTimestamps = this.timestamps;
int hashCode7 = (hashCode6 + (activityTimestamps != null ? activityTimestamps.hashCode() : 0)) * 31;
ActivityType activityType = this.type;
int hashCode8 = (hashCode7 + (activityType != null ? activityType.hashCode() : 0)) * 31;
List<Long> list = this.userIds;
int hashCode9 = (hashCode8 + (list != null ? list.hashCode() : 0)) * 31;
String str4 = this.url;
if (str4 != null) {
i = str4.hashCode();
}
return b.a(this.guildId) + ((hashCode9 + i) * 31);
}
public String toString() {
StringBuilder R = a.R("EmbeddedActivity(applicationId=");
R.append(this.applicationId);
R.append(", assets=");
R.append(this.assets);
R.append(", createdAt=");
R.append(this.createdAt);
R.append(", details=");
R.append(this.details);
R.append(", name=");
R.append(this.name);
R.append(", secrets=");
R.append(this.secrets);
R.append(", state=");
R.append(this.state);
R.append(", timestamps=");
R.append(this.timestamps);
R.append(", type=");
R.append(this.type);
R.append(", userIds=");
R.append(this.userIds);
R.append(", url=");
R.append(this.url);
R.append(", guildId=");
return a.B(R, this.guildId, ")");
}
}

View File

@ -66,42 +66,42 @@ public final class Guild {
/* JADX WARNING: Illegal instructions before constructor call */
public Guild(com.discord.api.guild.Guild guild) {
this(r0, r0, null, r6, r7, r0, r9, r11, r12, r14, r0, r0, r17, r18, r19, r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31, r32, r33, r0 == null ? GuildMaxVideoChannelUsers.Unlimited.INSTANCE : r0, guild.N(), guild.d(), guild.w(), 4, 0, null);
this(r0, r0, null, r6, r7, r0, r9, r11, r12, r14, r0, r0, r17, r18, r19, r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31, r32, r33, r0 == null ? GuildMaxVideoChannelUsers.Unlimited.INSTANCE : r0, guild.O(), guild.d(), guild.x(), 4, 0, null);
m.checkNotNullParameter(guild, "apiGuild");
List<GuildRole> E = guild.E();
E = E == null ? n.emptyList() : E;
List<GuildEmoji> j = guild.j();
j = j == null ? n.emptyList() : j;
String v = guild.v();
List<GuildRole> F = guild.F();
F = F == null ? n.emptyList() : F;
List<GuildEmoji> k = guild.k();
k = k == null ? n.emptyList() : k;
String w = guild.w();
String i = guild.i();
Integer h = guild.h();
int intValue = h != null ? h.intValue() : ModelNotificationSettings.FREQUENCY_ALL;
long p = guild.p();
String D = guild.D();
long x2 = guild.x();
String o = guild.o();
GuildVerificationLevel O = guild.O();
O = O == null ? GuildVerificationLevel.NONE : O;
GuildExplicitContentFilter k = guild.k();
k = k == null ? GuildExplicitContentFilter.NONE : k;
boolean M = guild.M();
int u = guild.u();
long q = guild.q();
String E = guild.E();
long y2 = guild.y();
String p = guild.p();
GuildVerificationLevel P = guild.P();
P = P == null ? GuildVerificationLevel.NONE : P;
GuildExplicitContentFilter l = guild.l();
l = l == null ? GuildExplicitContentFilter.NONE : l;
boolean N = guild.N();
int v = guild.v();
int c2 = guild.c();
Long b = guild.b();
Long K = guild.K();
Set set = u.toSet(guild.l());
int s2 = guild.s();
Long L = guild.L();
Set set = u.toSet(guild.m());
int t = guild.t();
String e = guild.e();
String G = guild.G();
String H = guild.H();
int B = guild.B();
int A = guild.A();
int z2 = guild.z();
int J = guild.J();
String q = guild.q();
Long F = guild.F();
Long C = guild.C();
String y2 = guild.y();
GuildWelcomeScreen Q = guild.Q();
GuildMaxVideoChannelUsers r = guild.r();
int K = guild.K();
String r = guild.r();
Long G = guild.G();
Long D = guild.D();
String z2 = guild.z();
GuildWelcomeScreen R = guild.R();
GuildMaxVideoChannelUsers s2 = guild.s();
}
/* JADX DEBUG: Multi-variable search result rejected for r30v0, resolved type: java.util.Set<? extends com.discord.api.guild.GuildFeature> */
@ -547,78 +547,78 @@ public final class Guild {
public final Guild merge(com.discord.api.guild.Guild guild) {
m.checkNotNullParameter(guild, "apiGuild");
List emptyList = n.emptyList();
List<GuildEmoji> j = guild.j();
if (j == null) {
j = n.emptyList();
List<GuildEmoji> k = guild.k();
if (k == null) {
k = n.emptyList();
}
String v = guild.v();
String w = guild.w();
String i = guild.i();
if (i == null) {
i = this.description;
}
Integer h = guild.h();
int intValue = h != null ? h.intValue() : this.defaultMessageNotifications;
long p = guild.p() != 0 ? guild.p() : this.f2169id;
String D = guild.D();
if (D == null) {
D = this.region;
long q = guild.q() != 0 ? guild.q() : this.f2169id;
String E = guild.E();
if (E == null) {
E = this.region;
}
long x2 = guild.x() != 0 ? guild.x() : this.ownerId;
String o = guild.o();
if (o == null) {
o = this.icon;
long y2 = guild.y() != 0 ? guild.y() : this.ownerId;
String p = guild.p();
if (p == null) {
p = this.icon;
}
GuildVerificationLevel O = guild.O();
if (O == null) {
O = this.verificationLevel;
GuildVerificationLevel P = guild.P();
if (P == null) {
P = this.verificationLevel;
}
GuildExplicitContentFilter k = guild.k();
if (k == null) {
k = this.explicitContentFilter;
GuildExplicitContentFilter l = guild.l();
if (l == null) {
l = this.explicitContentFilter;
}
boolean M = guild.M();
int u = guild.u();
boolean N = guild.N();
int v = guild.v();
int c2 = guild.c() != 0 ? guild.c() : this.afkTimeout;
Long b = guild.b();
Long K = guild.K();
Set set = u.toSet(guild.l());
Long L = guild.L();
Set set = u.toSet(guild.m());
String e = guild.e();
String G = guild.G();
if (G == null) {
G = this.splash;
String H = guild.H();
if (H == null) {
H = this.splash;
}
int B = guild.B();
int A = guild.A();
int z2 = guild.z();
int J = guild.J();
String q = guild.q();
if (q == null) {
q = this.joinedAt;
}
Long F = guild.F();
if (F == null) {
F = this.rulesChannelId;
}
Long C = guild.C();
if (C == null) {
C = this.publicUpdatesChannelId;
}
String y2 = guild.y();
if (y2 == null) {
y2 = this.preferredLocale;
}
GuildWelcomeScreen Q = guild.Q();
if (Q == null) {
Q = this.welcomeScreen;
}
GuildMaxVideoChannelUsers r = guild.r();
int K = guild.K();
String r = guild.r();
if (r == null) {
r = this.maxVideoChannelUsers;
r = this.joinedAt;
}
String N = guild.N();
if (N == null) {
N = this.vanityUrlCode;
Long G = guild.G();
if (G == null) {
G = this.rulesChannelId;
}
return new Guild(emptyList, j, null, v, i, intValue, p, D, x2, o, O, k, M, u, c2, b, K, set, 0, e, G, A, z2, J, q, F, C, y2, Q, r, N, guild.d() != 0 ? guild.d() : this.approximatePresenceCount, guild.w(), 4, 0, null);
Long D = guild.D();
if (D == null) {
D = this.publicUpdatesChannelId;
}
String z2 = guild.z();
if (z2 == null) {
z2 = this.preferredLocale;
}
GuildWelcomeScreen R = guild.R();
if (R == null) {
R = this.welcomeScreen;
}
GuildMaxVideoChannelUsers s2 = guild.s();
if (s2 == null) {
s2 = this.maxVideoChannelUsers;
}
String O = guild.O();
if (O == null) {
O = this.vanityUrlCode;
}
return new Guild(emptyList, k, null, w, i, intValue, q, E, y2, p, P, l, N, v, c2, b, L, set, 0, e, H, B, A, K, r, G, D, z2, R, s2, O, guild.d() != 0 ? guild.d() : this.approximatePresenceCount, guild.x(), 4, 0, null);
}
public String toString() {

View File

@ -838,6 +838,10 @@ public interface RestAPIInterface {
@f("channels/{channelId}/directory-entries/search")
Observable<List<DirectoryEntry>> searchServers(@s("channelId") long j, @t("query") String str);
@i0.f0.o("interactions")
@l
Observable<Void> sendApplicationCommand(@q("payload_json") PayloadJSON<RestAPIParams.ApplicationCommand> payloadJSON, @q MultipartBody.Part[] partArr);
@i0.f0.o("interactions")
Observable<Void> sendApplicationCommand(@a RestAPIParams.ApplicationCommand applicationCommand);

View File

@ -371,26 +371,26 @@ public final class ReadyPayloadUtils {
String e = guild2.e();
Integer h = guild2.h();
String i = guild2.i();
GuildExplicitContentFilter k = guild2.k();
List<GuildFeature> l = guild2.l();
String o = guild2.o();
GuildMaxVideoChannelUsers r = guild2.r();
int u = guild2.u();
String v = guild2.v();
long x2 = guild2.x();
String y2 = guild2.y();
int A = guild2.A();
Long C = guild2.C();
String D = guild2.D();
Long F = guild2.F();
guild3 = Guild.a(guild, null, null, null, v, i, h, 0, D, x2, o, guild2.O(), k, null, null, null, null, false, u, c2, b, guild2.K(), l, 0, e, guild2.G(), A, 0, guild2.J(), null, F, C, y2, null, r, guild2.N(), 0, 0, null, null, null, null, false, null, null, 339865671, 4089);
GuildExplicitContentFilter l = guild2.l();
List<GuildFeature> m = guild2.m();
String p = guild2.p();
GuildMaxVideoChannelUsers s2 = guild2.s();
int v = guild2.v();
String w = guild2.w();
long y2 = guild2.y();
String z2 = guild2.z();
int B = guild2.B();
Long D = guild2.D();
String E = guild2.E();
Long G = guild2.G();
guild3 = Guild.a(guild, null, null, null, w, i, h, 0, E, y2, p, guild2.P(), l, null, null, null, null, false, v, c2, b, guild2.L(), m, 0, e, guild2.H(), B, 0, guild2.K(), null, G, D, z2, null, s2, guild2.O(), 0, 0, null, null, null, null, false, null, null, null, 339865671, 8185);
}
if (list != null) {
guild3 = Guild.a(guild3, null, list, null, null, null, null, 0, null, 0, null, null, null, null, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, -3, 4095);
guild3 = Guild.a(guild3, null, list, null, null, null, null, 0, null, 0, null, null, null, null, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, null, -3, 8191);
}
Guild guild4 = guild3;
if (list2 != null) {
guild4 = Guild.a(guild4, null, null, list2, null, null, null, 0, null, 0, null, null, null, null, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, -5, 4095);
guild4 = Guild.a(guild4, null, null, list2, null, null, null, 0, null, 0, null, null, null, null, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, null, -5, 8191);
}
Guild guild5 = guild4;
if (list3 != null) {
@ -401,7 +401,7 @@ public final class ReadyPayloadUtils {
for (Channel channel : f) {
hashMap.put(Long.valueOf(channel.h()), channel);
}
guild5 = Guild.a(guild5, null, null, null, null, null, null, 0, null, 0, null, null, null, null, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, -1, 3967);
guild5 = Guild.a(guild5, null, null, null, null, null, null, 0, null, 0, null, null, null, null, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, null, -1, 8063);
}
ArrayList arrayList = new ArrayList();
for (Channel channel2 : list3) {
@ -412,17 +412,17 @@ public final class ReadyPayloadUtils {
arrayList.add(channel2);
}
}
guild5 = Guild.a(guild5, null, null, null, null, null, null, 0, null, 0, null, null, null, null, arrayList, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, -8193, 4095);
guild5 = Guild.a(guild5, null, null, null, null, null, null, 0, null, 0, null, null, null, null, arrayList, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, null, -8193, 8191);
}
Guild guild6 = guild5;
if (list4 != null) {
guild6 = Guild.a(guild6, list4, null, null, null, null, null, 0, null, 0, null, null, null, null, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, -2, 4095);
guild6 = Guild.a(guild6, list4, null, null, null, null, null, 0, null, 0, null, null, null, null, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, null, -2, 8191);
}
Guild guild7 = guild6;
if (list5 != null) {
guild7 = Guild.a(guild7, null, null, null, null, null, null, 0, null, 0, null, null, null, list5, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, -4097, 4095);
guild7 = Guild.a(guild7, null, null, null, null, null, null, 0, null, 0, null, null, null, list5, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, null, -4097, 8191);
}
return map != null ? Guild.a(guild7, null, null, null, null, null, null, 0, null, 0, null, null, null, null, null, u.toList(map.values()), null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, -16385, 4095) : guild7;
return map != null ? Guild.a(guild7, null, null, null, null, null, null, 0, null, 0, null, null, null, null, null, u.toList(map.values()), null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, 0, null, null, null, null, false, null, null, null, -16385, 8191) : guild7;
}
/* JADX WARNING: Removed duplicated region for block: B:37:0x00a5 */
@ -438,17 +438,17 @@ public final class ReadyPayloadUtils {
List<Channel> list4;
List<GuildRole> list5;
m.checkNotNullParameter(guild, "guild");
GuildHashes m = guild.m();
if (m == null || !GuildHashUtilsKt.isSupported(m)) {
GuildHashes n = guild.n();
if (n == null || !GuildHashUtilsKt.isSupported(n)) {
Boolean bool = Boolean.FALSE;
triple = new Triple(bool, bool, bool);
} else {
GuildHash b = m.b();
GuildHash b = n.b();
boolean z2 = false;
Boolean valueOf = Boolean.valueOf(b != null ? b.b() : false);
GuildHash a = m.a();
GuildHash a = n.a();
Boolean valueOf2 = Boolean.valueOf(a != null ? a.b() : false);
GuildHash c2 = m.c();
GuildHash c2 = n.c();
if (c2 != null) {
z2 = c2.b();
}
@ -457,10 +457,10 @@ public final class ReadyPayloadUtils {
boolean booleanValue = ((Boolean) triple.component1()).booleanValue();
boolean booleanValue2 = ((Boolean) triple.component2()).booleanValue();
boolean booleanValue3 = ((Boolean) triple.component3()).booleanValue();
if (guild.M()) {
if (guild.N()) {
return new HydrateGuildResult.Success(guild);
}
GuildCache remove = cache.remove(Long.valueOf(guild.p()));
GuildCache remove = cache.remove(Long.valueOf(guild.q()));
if ((booleanValue || booleanValue2 || booleanValue3) && remove == null) {
return HydrateGuildResult.Error.INSTANCE;
}

View File

@ -671,7 +671,7 @@ public final class StoreAnalytics extends Store {
pairArr[0] = o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str);
pairArr[1] = o.to("message_id", Long.valueOf(message.o()));
Long l = null;
pairArr[2] = o.to("invite_guild_id", (modelInvite == null || (guild = modelInvite.getGuild()) == null) ? null : Long.valueOf(guild.p()));
pairArr[2] = o.to("invite_guild_id", (modelInvite == null || (guild = modelInvite.getGuild()) == null) ? null : Long.valueOf(guild.q()));
pairArr[3] = o.to("invite_channel_id", (modelInvite == null || (channel = modelInvite.getChannel()) == null) ? null : Long.valueOf(channel.h()));
if (!(modelInvite == null || (guildScheduledEvent = modelInvite.getGuildScheduledEvent()) == null)) {
l = Long.valueOf(guildScheduledEvent.h());

View File

@ -25,7 +25,7 @@ public final class StoreApplicationInteractions$resendApplicationCommand$1 exten
/* renamed from: invoke */
public final void mo1invoke() {
StoreApplicationInteractions.access$getStoreMessages$p(this.this$0).deleteLocalMessage(this.$message.getChannelId(), this.$nonce);
StoreApplicationInteractions.handleSendApplicationCommandRequest$default(this.this$0, this.$updatedSendData, null, null, 6, null);
StoreApplicationInteractions.handleSendApplicationCommandRequest$default(this.this$0, this.$updatedSendData, null, null, null, 14, null);
StoreApplicationInteractions.access$removeApplicationCommandSendData(this.this$0, this.$nonce);
}
}

View File

@ -2,21 +2,24 @@ package com.discord.stores;
import com.discord.models.commands.ApplicationCommandLocalSendData;
import d0.z.d.o;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreApplicationInteractions.kt */
public final class StoreApplicationInteractions$sendApplicationCommand$1 extends o implements Function0<Unit> {
public final /* synthetic */ List $attachments;
public final /* synthetic */ ApplicationCommandLocalSendData $localSendData;
public final /* synthetic */ Function1 $onFail;
public final /* synthetic */ Function0 $onSuccess;
public final /* synthetic */ StoreApplicationInteractions this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreApplicationInteractions$sendApplicationCommand$1(StoreApplicationInteractions storeApplicationInteractions, ApplicationCommandLocalSendData applicationCommandLocalSendData, Function0 function0, Function1 function1) {
public StoreApplicationInteractions$sendApplicationCommand$1(StoreApplicationInteractions storeApplicationInteractions, ApplicationCommandLocalSendData applicationCommandLocalSendData, List list, Function0 function0, Function1 function1) {
super(0);
this.this$0 = storeApplicationInteractions;
this.$localSendData = applicationCommandLocalSendData;
this.$attachments = list;
this.$onSuccess = function0;
this.$onFail = function1;
}
@ -24,6 +27,6 @@ public final class StoreApplicationInteractions$sendApplicationCommand$1 extends
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreApplicationInteractions.access$handleSendApplicationCommandRequest(this.this$0, this.$localSendData, this.$onSuccess, this.$onFail);
StoreApplicationInteractions.access$handleSendApplicationCommandRequest(this.this$0, this.$localSendData, this.$attachments, this.$onSuccess, this.$onFail);
}
}

View File

@ -29,6 +29,7 @@ import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.time.Clock;
import com.discord.utilities.user.UserUtils;
import com.google.gson.Gson;
import com.lytefast.flexinput.model.Attachment;
import d0.g0.t;
import d0.o;
import d0.t.g0;
@ -359,8 +360,8 @@ public final class StoreApplicationInteractions extends StoreV2 {
storeApplicationInteractions.handleInteractionDataFetchSuccess(j, applicationCommandData);
}
public static final /* synthetic */ void access$handleSendApplicationCommandRequest(StoreApplicationInteractions storeApplicationInteractions, ApplicationCommandLocalSendData applicationCommandLocalSendData, Function0 function0, Function1 function1) {
storeApplicationInteractions.handleSendApplicationCommandRequest(applicationCommandLocalSendData, function0, function1);
public static final /* synthetic */ void access$handleSendApplicationCommandRequest(StoreApplicationInteractions storeApplicationInteractions, ApplicationCommandLocalSendData applicationCommandLocalSendData, List list, Function0 function0, Function1 function1) {
storeApplicationInteractions.handleSendApplicationCommandRequest(applicationCommandLocalSendData, list, function0, function1);
}
public static final /* synthetic */ void access$removeApplicationCommandSendData(StoreApplicationInteractions storeApplicationInteractions, String str) {
@ -483,21 +484,24 @@ public final class StoreApplicationInteractions extends StoreV2 {
}
@StoreThread
private final void handleSendApplicationCommandRequest(ApplicationCommandLocalSendData applicationCommandLocalSendData, Function0<Unit> function0, Function1<? super Error, Unit> function1) {
private final void handleSendApplicationCommandRequest(ApplicationCommandLocalSendData applicationCommandLocalSendData, List<? extends Attachment<?>> list, Function0<Unit> function0, Function1<? super Error, Unit> function1) {
upsertApplicationCommandSendData(applicationCommandLocalSendData);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(sendApplicationCommandObservable(applicationCommandLocalSendData), false, 1, null), StoreApplicationInteractions.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new StoreApplicationInteractions$handleSendApplicationCommandRequest$1(this, applicationCommandLocalSendData, function0, function1), 62, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(sendApplicationCommandObservable(applicationCommandLocalSendData, list), false, 1, null), StoreApplicationInteractions.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new StoreApplicationInteractions$handleSendApplicationCommandRequest$1(this, applicationCommandLocalSendData, function0, function1), 62, (Object) null);
}
/* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: com.discord.stores.StoreApplicationInteractions */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ void handleSendApplicationCommandRequest$default(StoreApplicationInteractions storeApplicationInteractions, ApplicationCommandLocalSendData applicationCommandLocalSendData, Function0 function0, Function1 function1, int i, Object obj) {
public static /* synthetic */ void handleSendApplicationCommandRequest$default(StoreApplicationInteractions storeApplicationInteractions, ApplicationCommandLocalSendData applicationCommandLocalSendData, List list, Function0 function0, Function1 function1, int i, Object obj) {
if ((i & 2) != 0) {
function0 = null;
list = null;
}
if ((i & 4) != 0) {
function0 = null;
}
if ((i & 8) != 0) {
function1 = null;
}
storeApplicationInteractions.handleSendApplicationCommandRequest(applicationCommandLocalSendData, function0, function1);
storeApplicationInteractions.handleSendApplicationCommandRequest(applicationCommandLocalSendData, list, function0, function1);
}
/* JADX WARNING: Removed duplicated region for block: B:10:0x001d A[Catch:{ Exception -> 0x0036 }] */
@ -548,8 +552,21 @@ public final class StoreApplicationInteractions extends StoreV2 {
}
}
private final Observable<MessageResult> sendApplicationCommandObservable(ApplicationCommandLocalSendData applicationCommandLocalSendData) {
return this.storeMessages.sendMessage(buildApplicationCommandLocalMessage$default(this, applicationCommandLocalSendData, false, false, 6, null), applicationCommandLocalSendData);
public static /* synthetic */ void sendApplicationCommand$default(StoreApplicationInteractions storeApplicationInteractions, long j, Long l, String str, com.discord.widgets.chat.input.models.ApplicationCommandData applicationCommandData, List list, Function0 function0, Function1 function1, int i, Object obj) {
storeApplicationInteractions.sendApplicationCommand(j, l, str, applicationCommandData, (i & 16) != 0 ? null : list, function0, function1);
}
private final Observable<MessageResult> sendApplicationCommandObservable(ApplicationCommandLocalSendData applicationCommandLocalSendData, List<? extends Attachment<?>> list) {
return this.storeMessages.sendMessage(buildApplicationCommandLocalMessage$default(this, applicationCommandLocalSendData, false, false, 6, null), applicationCommandLocalSendData, list);
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.stores.StoreApplicationInteractions */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ Observable sendApplicationCommandObservable$default(StoreApplicationInteractions storeApplicationInteractions, ApplicationCommandLocalSendData applicationCommandLocalSendData, List list, int i, Object obj) {
if ((i & 2) != 0) {
list = null;
}
return storeApplicationInteractions.sendApplicationCommandObservable(applicationCommandLocalSendData, list);
}
private final User toUser(Application application) {
@ -796,11 +813,11 @@ public final class StoreApplicationInteractions extends StoreV2 {
}
}
public final void sendApplicationCommand(long j, Long l, String str, com.discord.widgets.chat.input.models.ApplicationCommandData applicationCommandData, Function0<Unit> function0, Function1<? super Error, Unit> function1) {
public final void sendApplicationCommand(long j, Long l, String str, com.discord.widgets.chat.input.models.ApplicationCommandData applicationCommandData, List<? extends Attachment<?>> list, Function0<Unit> function0, Function1<? super Error, Unit> function1) {
m.checkNotNullParameter(applicationCommandData, "data");
m.checkNotNullParameter(function0, "onSuccess");
m.checkNotNullParameter(function1, "onFail");
this.dispatcher.schedule(new StoreApplicationInteractions$sendApplicationCommand$1(this, new ApplicationCommandLocalSendData(this.nonceGenerator.nonce(), j, l, applicationCommandData.getApplicationCommand().getGuildId(), applicationCommandData.getApplication(), applicationCommandData.getApplicationCommand().getName(), applicationCommandData.getApplicationCommand().getId(), applicationCommandData.getValues(), str, null, 512, null), function0, function1));
this.dispatcher.schedule(new StoreApplicationInteractions$sendApplicationCommand$1(this, new ApplicationCommandLocalSendData(this.nonceGenerator.nonce(), j, l, applicationCommandData.getApplicationCommand().getGuildId(), applicationCommandData.getApplication(), applicationCommandData.getApplicationCommand().getName(), applicationCommandData.getApplicationCommand().getId(), applicationCommandData.getValues(), str, null, 512, null), list, function0, function1));
}
public final void sendComponentInteraction(long j, Long l, long j2, long j3, int i, RestAPIParams.ComponentInteractionData componentInteractionData, Long l2) {

View File

@ -339,10 +339,10 @@ public final class StoreApplicationStreaming extends StoreV2 {
List<Guild> guilds = modelPayload.getGuilds();
m.checkNotNullExpressionValue(guilds, "payload.guilds");
for (Guild guild : guilds) {
List<VoiceState> P = guild.P();
if (P != null) {
for (VoiceState voiceState : P) {
handleVoiceStateUpdate(voiceState, guild.p());
List<VoiceState> Q = guild.Q();
if (Q != null) {
for (VoiceState voiceState : Q) {
handleVoiceStateUpdate(voiceState, guild.q());
}
}
}

View File

@ -24,6 +24,6 @@ public final class StoreChannels$handleGuildRemove$2 extends o implements Functi
public final boolean invoke(Channel channel) {
m.checkNotNullParameter(channel, "thread");
return channel.f() == this.$guild.p();
return channel.f() == this.$guild.q();
}
}

View File

@ -383,7 +383,7 @@ public final class StoreChannels extends StoreV2 {
m.checkNotNullExpressionValue(guilds, "payload.guilds");
for (Guild guild : guilds) {
Map<Long, Map<Long, Channel>> map4 = this.channelsByGuild;
Long valueOf2 = Long.valueOf(guild.p());
Long valueOf2 = Long.valueOf(guild.q());
Map<Long, Channel> map5 = map4.get(valueOf2);
if (map5 == null) {
map5 = new HashMap<>();
@ -393,14 +393,14 @@ public final class StoreChannels extends StoreV2 {
List<Channel> g = guild.g();
if (g != null) {
for (Channel channel3 : g) {
map6.put(Long.valueOf(channel3.h()), Channel.a(channel3, null, 0, channel3.f() != 0 ? channel3.f() : guild.p(), null, 0, 0, 0, null, null, 0, null, 0, 0, null, 0, 0, null, false, 0, null, 0, null, null, null, null, null, null, null, null, 536870907));
map6.put(Long.valueOf(channel3.h()), Channel.a(channel3, null, 0, channel3.f() != 0 ? channel3.f() : guild.q(), null, 0, 0, 0, null, null, 0, null, 0, 0, null, 0, 0, null, false, 0, null, 0, null, null, null, null, null, null, null, null, 536870907));
}
}
List<Channel> L = guild.L();
if (L != null) {
for (Channel channel4 : L) {
List<Channel> M = guild.M();
if (M != null) {
for (Channel channel4 : M) {
if (ChannelUtils.C(channel4)) {
storeThread$app_productionCanaryRelease$default(this, channel4, guild.p(), null, 4, null);
storeThread$app_productionCanaryRelease$default(this, channel4, guild.q(), null, 4, null);
}
}
}
@ -495,7 +495,7 @@ public final class StoreChannels extends StoreV2 {
public final void handleGuildAdd(Guild guild) {
m.checkNotNullParameter(guild, "guild");
Map<Long, Map<Long, Channel>> map = this.channelsByGuild;
Long valueOf = Long.valueOf(guild.p());
Long valueOf = Long.valueOf(guild.q());
Map<Long, Channel> map2 = map.get(valueOf);
if (map2 == null) {
map2 = new HashMap<>();
@ -505,15 +505,15 @@ public final class StoreChannels extends StoreV2 {
List<Channel> g = guild.g();
if (g != null) {
for (Channel channel : g) {
map3.put(Long.valueOf(channel.h()), Channel.a(channel, null, 0, channel.f() != 0 ? channel.f() : guild.p(), null, 0, 0, 0, null, null, 0, null, 0, 0, null, 0, 0, null, false, 0, null, 0, null, null, null, null, null, null, null, null, 536870907));
map3.put(Long.valueOf(channel.h()), Channel.a(channel, null, 0, channel.f() != 0 ? channel.f() : guild.q(), null, 0, 0, 0, null, null, 0, null, 0, 0, null, 0, 0, null, false, 0, null, 0, null, null, null, null, null, null, null, null, 536870907));
this.channelNames.put(Long.valueOf(channel.h()), ChannelUtils.c(channel));
}
}
List<Channel> L = guild.L();
if (L != null) {
for (Channel channel2 : L) {
List<Channel> M = guild.M();
if (M != null) {
for (Channel channel2 : M) {
if (ChannelUtils.C(channel2)) {
storeThread$app_productionCanaryRelease$default(this, channel2, guild.p(), null, 4, null);
storeThread$app_productionCanaryRelease$default(this, channel2, guild.q(), null, 4, null);
}
}
}
@ -524,15 +524,15 @@ public final class StoreChannels extends StoreV2 {
public final void handleGuildRemove(Guild guild) {
Set<Long> keySet;
m.checkNotNullParameter(guild, "guild");
long p = guild.p();
if (this.channelsByGuild.containsKey(Long.valueOf(p))) {
Map<Long, Channel> map = this.channelsByGuild.get(Long.valueOf(p));
long q = guild.q();
if (this.channelsByGuild.containsKey(Long.valueOf(q))) {
Map<Long, Channel> map = this.channelsByGuild.get(Long.valueOf(q));
if (!(map == null || (keySet = map.keySet()) == null)) {
for (Number number : keySet) {
this.channelNames.remove(Long.valueOf(number.longValue()));
}
}
this.channelsByGuild.remove(Long.valueOf(guild.p()));
this.channelsByGuild.remove(Long.valueOf(guild.q()));
r.removeAll(this.threadsById.values(), new StoreChannels$handleGuildRemove$2(guild));
}
markChanged();

View File

@ -683,7 +683,9 @@ public final class StoreChannelsSelected extends StoreV2 {
@StoreThread
private final void onSelectedChannelResolved(ResolvedSelectedChannel resolvedSelectedChannel) {
this.previouslySelectedChannel = this.selectedChannel;
if (this.selectedChannel.getId() != resolvedSelectedChannel.getId()) {
this.previouslySelectedChannel = this.selectedChannel;
}
this.selectedChannel = resolvedSelectedChannel;
boolean z2 = resolvedSelectedChannel instanceof ResolvedSelectedChannel.Channel;
if (z2) {
@ -796,7 +798,7 @@ public final class StoreChannelsSelected extends StoreV2 {
m.checkNotNullExpressionValue(guilds, "payload.guilds");
HashSet hashSetOf = n0.hashSetOf(0L);
for (Guild guild : guilds) {
hashSetOf.add(Long.valueOf(guild.p()));
hashSetOf.add(Long.valueOf(guild.q()));
}
Map<Long, UserChannelSelection> map = this.userChannelSelections;
LinkedHashMap linkedHashMap = new LinkedHashMap();
@ -818,7 +820,7 @@ public final class StoreChannelsSelected extends StoreV2 {
@StoreThread
public final void handleGuildAdd(Guild guild) {
m.checkNotNullParameter(guild, "guild");
if (this.storeGuildSelected.getSelectedGuildIdInternal$app_productionCanaryRelease() == guild.p()) {
if (this.storeGuildSelected.getSelectedGuildIdInternal$app_productionCanaryRelease() == guild.q()) {
validateSelectedChannel();
}
}
@ -827,7 +829,7 @@ public final class StoreChannelsSelected extends StoreV2 {
public final void handleGuildRemove(Guild guild) {
m.checkNotNullParameter(guild, "guild");
Channel maybeChannel = this.selectedChannel.getMaybeChannel();
if (maybeChannel != null && maybeChannel.f() == guild.p()) {
if (maybeChannel != null && maybeChannel.f() == guild.q()) {
validateSelectedChannel();
}
}

View File

@ -206,16 +206,16 @@ public final class StoreClientDataState extends StoreV2 {
@StoreThread
private final void updateGuildHash(Guild guild) {
GuildHashes m;
if (guild.M() || (m = guild.m()) == null || !GuildHashUtilsKt.isSupported(m)) {
this.guildHashes.remove(Long.valueOf(guild.p()));
GuildHashes n;
if (guild.N() || (n = guild.n()) == null || !GuildHashUtilsKt.isSupported(n)) {
this.guildHashes.remove(Long.valueOf(guild.q()));
return;
}
Map<Long, GuildHashes> map = this.guildHashes;
Long valueOf = Long.valueOf(guild.p());
GuildHashes m2 = guild.m();
m.checkNotNull(m2);
map.put(valueOf, m2);
Long valueOf = Long.valueOf(guild.q());
GuildHashes n2 = guild.n();
m.checkNotNull(n2);
map.put(valueOf, n2);
}
@StoreThread
@ -293,7 +293,7 @@ public final class StoreClientDataState extends StoreV2 {
@StoreThread
public final void handleGuildRemove(Guild guild) {
m.checkNotNullParameter(guild, "guild");
this.guildHashes.remove(Long.valueOf(guild.p()));
this.guildHashes.remove(Long.valueOf(guild.q()));
markChanged();
}

View File

@ -96,7 +96,7 @@ public final class StoreCollapsedChannelCategories extends StoreV2 {
List<Guild> guilds = modelPayload.getGuilds();
m.checkNotNullExpressionValue(guilds, "payload.guilds");
for (Guild guild : guilds) {
Set<Long> set = this.collapsedCategories.get(Long.valueOf(guild.p()));
Set<Long> set = this.collapsedCategories.get(Long.valueOf(guild.q()));
if (set != null) {
HashSet<Long> hashSet2 = new HashSet(set);
List<Channel> g = guild.g();
@ -106,11 +106,11 @@ public final class StoreCollapsedChannelCategories extends StoreV2 {
}
}
for (Long l : hashSet2) {
long p = guild.p();
long q = guild.q();
m.checkNotNullExpressionValue(l, "channelId");
setCollapsedState(p, l.longValue(), false);
setCollapsedState(q, l.longValue(), false);
}
hashSet.remove(Long.valueOf(guild.p()));
hashSet.remove(Long.valueOf(guild.q()));
}
}
for (Long l2 : hashSet) {

View File

@ -0,0 +1,23 @@
package com.discord.stores;
import com.discord.models.embeddedactivities.EmbeddedActivity;
import d0.z.d.o;
import java.util.Map;
import kotlin.jvm.functions.Function0;
/* compiled from: StoreEmbeddedActivities.kt */
public final class StoreEmbeddedActivities$observeEmbeddedActivities$1 extends o implements Function0<Map<Long, ? extends Map<Long, ? extends EmbeddedActivity>>> {
public final /* synthetic */ StoreEmbeddedActivities this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreEmbeddedActivities$observeEmbeddedActivities$1(StoreEmbeddedActivities storeEmbeddedActivities) {
super(0);
this.this$0 = storeEmbeddedActivities;
}
/* Return type fixed from 'java.util.Map<java.lang.Long, java.util.Map<java.lang.Long, com.discord.models.embeddedactivities.EmbeddedActivity>>' to match base method */
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final Map<Long, ? extends Map<Long, ? extends EmbeddedActivity>> mo1invoke() {
return this.this$0.getEmbeddedActivities();
}
}

View File

@ -0,0 +1,26 @@
package com.discord.stores;
import com.discord.models.embeddedactivities.EmbeddedActivity;
import d0.t.h0;
import j0.k.b;
import java.util.Map;
/* compiled from: StoreEmbeddedActivities.kt */
public final class StoreEmbeddedActivities$observeEmbeddedActivitiesForChannel$1<T, R> implements b<Map<Long, ? extends Map<Long, ? extends EmbeddedActivity>>, Map<Long, ? extends EmbeddedActivity>> {
public final /* synthetic */ long $channelId;
public StoreEmbeddedActivities$observeEmbeddedActivitiesForChannel$1(long j) {
this.$channelId = j;
}
/* 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 // j0.k.b
public /* bridge */ /* synthetic */ Map<Long, ? extends EmbeddedActivity> call(Map<Long, ? extends Map<Long, ? extends EmbeddedActivity>> map) {
return call((Map<Long, ? extends Map<Long, EmbeddedActivity>>) map);
}
public final Map<Long, EmbeddedActivity> call(Map<Long, ? extends Map<Long, EmbeddedActivity>> map) {
Map<Long, EmbeddedActivity> map2 = (Map) map.get(Long.valueOf(this.$channelId));
return map2 != null ? map2 : h0.emptyMap();
}
}

View File

@ -0,0 +1,125 @@
package com.discord.stores;
import com.discord.BuildConfig;
import com.discord.api.embeddedactivities.EmbeddedActivityInGuild;
import com.discord.api.embeddedactivities.EmbeddedActivityInboundUpdate;
import com.discord.api.guild.Guild;
import com.discord.models.domain.ModelPayload;
import com.discord.models.embeddedactivities.EmbeddedActivity;
import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider;
import d0.t.h0;
import d0.z.d.m;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import kotlin.jvm.internal.DefaultConstructorMarker;
import rx.Observable;
/* compiled from: StoreEmbeddedActivities.kt */
public final class StoreEmbeddedActivities extends StoreV2 {
private final Map<Long, Map<Long, EmbeddedActivity>> embeddedActivitiesByChannel;
private Map<Long, ? extends Map<Long, EmbeddedActivity>> embeddedActivitiesByChannelSnapshot;
private final ObservationDeck observationDeck;
public StoreEmbeddedActivities() {
this(null, 1, null);
}
public StoreEmbeddedActivities(ObservationDeck observationDeck) {
m.checkNotNullParameter(observationDeck, "observationDeck");
this.observationDeck = observationDeck;
this.embeddedActivitiesByChannelSnapshot = h0.emptyMap();
this.embeddedActivitiesByChannel = new LinkedHashMap();
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ StoreEmbeddedActivities(ObservationDeck observationDeck, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? ObservationDeckProvider.get() : observationDeck);
}
private final String getUrlForApplication(long j) {
if (BuildConfig.EMBEDDED_ACTIVITY_APPLICATION_HOST.length() == 0) {
return null;
}
return "https://" + j + '.' + BuildConfig.EMBEDDED_ACTIVITY_APPLICATION_HOST;
}
@StoreThread
private final void handleEmbeddedActivitiesForGuild(Guild guild) {
for (EmbeddedActivityInGuild embeddedActivityInGuild : guild.j()) {
handleEmbeddedActivityForChannel(embeddedActivityInGuild.a(), embeddedActivityInGuild.c(), embeddedActivityInGuild.b(), guild.q());
}
}
@StoreThread
private final void handleEmbeddedActivityForChannel(long j, List<Long> list, com.discord.api.embeddedactivities.EmbeddedActivity embeddedActivity, long j2) {
String urlForApplication = getUrlForApplication(embeddedActivity.a());
if (urlForApplication != null) {
EmbeddedActivity fromApiEmbeddedActivity = EmbeddedActivity.Companion.fromApiEmbeddedActivity(embeddedActivity, list, urlForApplication, j2);
Map<Long, EmbeddedActivity> map = this.embeddedActivitiesByChannel.get(Long.valueOf(j));
if (map == null) {
map = new LinkedHashMap<>();
}
long applicationId = fromApiEmbeddedActivity.getApplicationId();
if (!list.isEmpty()) {
map.put(Long.valueOf(applicationId), fromApiEmbeddedActivity);
} else {
map.remove(Long.valueOf(applicationId));
}
this.embeddedActivitiesByChannel.put(Long.valueOf(j), map);
markChanged();
}
}
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: java.util.Map<java.lang.Long, ? extends java.util.Map<java.lang.Long, com.discord.models.embeddedactivities.EmbeddedActivity>>, java.util.Map<java.lang.Long, java.util.Map<java.lang.Long, com.discord.models.embeddedactivities.EmbeddedActivity>> */
public final Map<Long, Map<Long, EmbeddedActivity>> getEmbeddedActivities() {
return this.embeddedActivitiesByChannelSnapshot;
}
@StoreThread
public final void handleConnectionOpen(ModelPayload modelPayload) {
m.checkNotNullParameter(modelPayload, "payload");
this.embeddedActivitiesByChannel.clear();
List<Guild> guilds = modelPayload.getGuilds();
m.checkNotNullExpressionValue(guilds, "payload.guilds");
for (Guild guild : guilds) {
m.checkNotNullExpressionValue(guild, "guild");
handleEmbeddedActivitiesForGuild(guild);
}
markChanged();
}
@StoreThread
public final void handleEmbeddedActivityInboundUpdate(EmbeddedActivityInboundUpdate embeddedActivityInboundUpdate) {
m.checkNotNullParameter(embeddedActivityInboundUpdate, "embeddedActivityInboundUpdate");
handleEmbeddedActivityForChannel(embeddedActivityInboundUpdate.a(), embeddedActivityInboundUpdate.d(), embeddedActivityInboundUpdate.b(), embeddedActivityInboundUpdate.c());
}
@StoreThread
public final void handleGuildCreate(Guild guild) {
m.checkNotNullParameter(guild, "guild");
handleEmbeddedActivitiesForGuild(guild);
}
public final Observable<Map<Long, Map<Long, EmbeddedActivity>>> observeEmbeddedActivities() {
return ObservationDeck.connectRx$default(this.observationDeck, new ObservationDeck.UpdateSource[]{this}, false, null, null, new StoreEmbeddedActivities$observeEmbeddedActivities$1(this), 14, null);
}
public final Observable<Map<Long, EmbeddedActivity>> observeEmbeddedActivitiesForChannel(long j) {
Observable<R> F = observeEmbeddedActivities().F(new StoreEmbeddedActivities$observeEmbeddedActivitiesForChannel$1(j));
m.checkNotNullExpressionValue(F, "observeEmbeddedActivitie…] ?: emptyMap()\n }");
return F;
}
@Override // com.discord.stores.StoreV2
@StoreThread
public void snapshotData() {
super.snapshotData();
HashMap hashMap = new HashMap();
for (Map.Entry<Long, Map<Long, EmbeddedActivity>> entry : this.embeddedActivitiesByChannel.entrySet()) {
hashMap.put(entry.getKey(), new HashMap(entry.getValue()));
}
this.embeddedActivitiesByChannelSnapshot = hashMap;
}
}

View File

@ -0,0 +1,4 @@
package com.discord.stores;
/* compiled from: StoreEmbeddedActivities.kt */
public final class StoreEmbeddedActivitiesKt {
}

View File

@ -155,11 +155,11 @@ public final class StoreEmojiCustom extends StoreV2 {
Collection<? extends ModelEmojiCustom> collection;
boolean z2;
m.checkNotNullParameter(guild, "guild");
List<com.discord.api.guildmember.GuildMember> t = guild.t();
if (t == null) {
List<com.discord.api.guildmember.GuildMember> u = guild.u();
if (u == null) {
return null;
}
Iterator<T> it = t.iterator();
Iterator<T> it = u.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
@ -181,18 +181,18 @@ public final class StoreEmojiCustom extends StoreV2 {
if (guildMember == null) {
return null;
}
long p = guild.p();
List<GuildEmoji> j = guild.j();
if (j != null) {
collection = new ArrayList<>(o.collectionSizeOrDefault(j, 10));
for (GuildEmoji guildEmoji : j) {
collection.add(new ModelEmojiCustom(guildEmoji, p));
long q = guild.q();
List<GuildEmoji> k = guild.k();
if (k != null) {
collection = new ArrayList<>(o.collectionSizeOrDefault(k, 10));
for (GuildEmoji guildEmoji : k) {
collection.add(new ModelEmojiCustom(guildEmoji, q));
}
} else {
collection = n.emptyList();
}
updateGlobalEmojis(p, collection);
updateAllowedGuildEmojis(p, guildMember.k(), collection);
updateGlobalEmojis(q, collection);
updateAllowedGuildEmojis(q, guildMember.k(), collection);
return Unit.a;
}
@ -212,13 +212,13 @@ public final class StoreEmojiCustom extends StoreV2 {
@StoreThread
public final void handleGuildRemove(Guild guild) {
m.checkNotNullParameter(guild, "guild");
long p = guild.p();
if (this.allowedGuildEmojis.containsKey(Long.valueOf(p))) {
this.allowedGuildEmojis.remove(Long.valueOf(p));
long q = guild.q();
if (this.allowedGuildEmojis.containsKey(Long.valueOf(q))) {
this.allowedGuildEmojis.remove(Long.valueOf(q));
markChanged();
}
if (this.allGuildEmoji.containsKey(Long.valueOf(p))) {
this.allGuildEmoji.remove(Long.valueOf(p));
if (this.allGuildEmoji.containsKey(Long.valueOf(q))) {
this.allGuildEmoji.remove(Long.valueOf(q));
markChanged();
}
}

View File

@ -190,9 +190,9 @@ public final class StoreGameParty extends StoreV2 {
@StoreThread
public final void handleGuildCreateOrSync(Guild guild) {
m.checkNotNullParameter(guild, "guild");
List<Presence> B = guild.B();
if (B != null) {
handlePresences(B);
List<Presence> C = guild.C();
if (C != null) {
handlePresences(C);
}
}

View File

@ -11,6 +11,7 @@ import com.discord.api.channel.Channel;
import com.discord.api.channel.ChannelRecipient;
import com.discord.api.commands.ApplicationCommandAutocompleteResult;
import com.discord.api.commands.GuildApplicationCommands;
import com.discord.api.embeddedactivities.EmbeddedActivityInboundUpdate;
import com.discord.api.emoji.GuildEmojisUpdate;
import com.discord.api.friendsuggestions.FriendSuggestion;
import com.discord.api.friendsuggestions.FriendSuggestionDelete;
@ -114,6 +115,7 @@ public final class StoreGatewayConnection implements GatewayEventHandler {
private final SerializedSubject<Boolean, Boolean> connected;
private final SerializedSubject<Boolean, Boolean> connectionReady;
private final ExecutorCoroutineDispatcher coroutineDispatcher;
private final SerializedSubject<EmbeddedActivityInboundUpdate, EmbeddedActivityInboundUpdate> embeddedActivityInboundUpdate;
private final ExecutorService executor;
private final SerializedSubject<FriendSuggestion, FriendSuggestion> friendSuggestionCreate;
private final SerializedSubject<FriendSuggestionDelete, FriendSuggestionDelete> friendSuggestionDelete;
@ -363,6 +365,7 @@ public final class StoreGatewayConnection implements GatewayEventHandler {
this.channelRecipientAdd = new SerializedSubject<>(BehaviorSubject.k0());
this.channelRecipientRemove = new SerializedSubject<>(BehaviorSubject.k0());
this.channelUnreadUpdate = new SerializedSubject<>(BehaviorSubject.k0());
this.embeddedActivityInboundUpdate = new SerializedSubject<>(BehaviorSubject.k0());
this.guildApplicationCommands = new SerializedSubject<>(BehaviorSubject.k0());
this.guildBanAdd = new SerializedSubject<>(PublishSubject.k0());
this.guildBanRemove = new SerializedSubject<>(PublishSubject.k0());
@ -599,6 +602,10 @@ public final class StoreGatewayConnection implements GatewayEventHandler {
return this.coroutineDispatcher;
}
public final SerializedSubject<EmbeddedActivityInboundUpdate, EmbeddedActivityInboundUpdate> getEmbeddedActivityInboundUpdate() {
return this.embeddedActivityInboundUpdate;
}
public final SerializedSubject<FriendSuggestion, FriendSuggestion> getFriendSuggestionCreate() {
return this.friendSuggestionCreate;
}
@ -938,6 +945,12 @@ public final class StoreGatewayConnection implements GatewayEventHandler {
return;
}
return;
case -1580624828:
if (str.equals("EMBEDDED_ACTIVITY_UPDATE")) {
this.embeddedActivityInboundUpdate.j.onNext(obj);
return;
}
return;
case -1553569310:
if (!str.equals("GUILD_JOIN_REQUEST_UPDATE")) {
return;

View File

@ -40,7 +40,7 @@ public final class StoreGuildJoinRequest$fetchPendingGuilds$1 extends o implemen
/* renamed from: invoke */
public final void mo1invoke() {
for (Guild guild : this.$results) {
StoreGuildJoinRequest.access$getPendingGuilds$p(this.this$0.this$0.this$0).put(Long.valueOf(guild.p()), new com.discord.models.guild.Guild(guild));
StoreGuildJoinRequest.access$getPendingGuilds$p(this.this$0.this$0.this$0).put(Long.valueOf(guild.q()), new com.discord.models.guild.Guild(guild));
}
this.this$0.this$0.this$0.markChanged();
}

View File

@ -40,7 +40,7 @@ public final class StoreGuildMemberCounts extends StoreV2 {
List<Guild> guilds = modelPayload.getGuilds();
if (guilds != null) {
for (Guild guild : guilds) {
this.guildMemberCounts.put(Long.valueOf(guild.p()), Integer.valueOf(guild.s()));
this.guildMemberCounts.put(Long.valueOf(guild.q()), Integer.valueOf(guild.t()));
}
}
markChanged();
@ -49,7 +49,7 @@ public final class StoreGuildMemberCounts extends StoreV2 {
@StoreThread
public final void handleGuildCreate(Guild guild) {
m.checkNotNullParameter(guild, "guild");
this.guildMemberCounts.put(Long.valueOf(guild.p()), Integer.valueOf(guild.s()));
this.guildMemberCounts.put(Long.valueOf(guild.q()), Integer.valueOf(guild.t()));
markChanged();
}

View File

@ -564,9 +564,9 @@ public final class StoreGuildScheduledEvents extends StoreV2 {
List<Guild> guilds = modelPayload.getGuilds();
m.checkNotNullExpressionValue(guilds, "payload.guilds");
for (Guild guild : guilds) {
List<GuildScheduledEvent> n = guild.n();
if (n != null) {
for (GuildScheduledEvent guildScheduledEvent : n) {
List<GuildScheduledEvent> o = guild.o();
if (o != null) {
for (GuildScheduledEvent guildScheduledEvent : o) {
processGuildScheduledEventCreateOrUpdate(guildScheduledEvent);
}
}
@ -577,9 +577,9 @@ public final class StoreGuildScheduledEvents extends StoreV2 {
@StoreThread
public final void handleGuildCreate(Guild guild) {
m.checkNotNullParameter(guild, "guild");
List<GuildScheduledEvent> n = guild.n();
if (n != null) {
for (GuildScheduledEvent guildScheduledEvent : n) {
List<GuildScheduledEvent> o = guild.o();
if (o != null) {
for (GuildScheduledEvent guildScheduledEvent : o) {
processGuildScheduledEventCreateOrUpdate(guildScheduledEvent);
}
}

View File

@ -38,7 +38,7 @@ public final class StoreGuildSelected$handleConnectionOpen$1 extends o implement
if (!it.hasNext()) {
break;
}
if (j == ((Guild) it.next()).p()) {
if (j == ((Guild) it.next()).q()) {
z3 = true;
continue;
} else {

View File

@ -104,7 +104,7 @@ public final class StoreGuildSelected extends StoreV2 {
@StoreThread
public final void handleGuildRemove(Guild guild) {
m.checkNotNullParameter(guild, "guild");
if (this.selectedGuildIds.remove(Long.valueOf(guild.p()))) {
if (this.selectedGuildIds.remove(Long.valueOf(guild.q()))) {
markChanged();
}
}

View File

@ -150,11 +150,11 @@ public final class StoreGuildStickers extends StoreV2 {
Object obj;
boolean z2;
m.checkNotNullParameter(guild, "guild");
List<GuildMember> t = guild.t();
if (t == null) {
List<GuildMember> u = guild.u();
if (u == null) {
return null;
}
Iterator<T> it = t.iterator();
Iterator<T> it = u.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
@ -175,12 +175,12 @@ public final class StoreGuildStickers extends StoreV2 {
if (((GuildMember) obj) == null) {
return null;
}
long p = guild.p();
List<Sticker> I = guild.I();
if (I == null) {
I = n.emptyList();
long q = guild.q();
List<Sticker> J = guild.J();
if (J == null) {
J = n.emptyList();
}
updateStickers(p, I);
updateStickers(q, J);
return Unit.a;
}

View File

@ -135,19 +135,19 @@ public final class StoreGuilds extends StoreV2 {
@StoreThread
private final void handleGuild(com.discord.api.guild.Guild guild, boolean z2) {
long p = guild.p();
long q = guild.q();
if (!z2) {
Guild guild2 = this.guilds.get(Long.valueOf(p));
Guild guild2 = this.guilds.get(Long.valueOf(q));
if (guild2 == null) {
guild2 = new Guild(null, null, null, null, null, 0, 0, null, 0, null, null, null, false, 0, 0, null, null, null, 0, null, null, 0, 0, 0, null, null, null, null, null, null, null, 0, false, -1, 1, null);
}
Guild merge = guild2.merge(guild);
if (!m.areEqual(merge, this.guilds.get(Long.valueOf(p)))) {
this.guilds.put(Long.valueOf(p), merge);
if (!m.areEqual(merge, this.guilds.get(Long.valueOf(q)))) {
this.guilds.put(Long.valueOf(q), merge);
markChanged(GuildsUpdate);
}
} else if (this.guilds.containsKey(Long.valueOf(p))) {
this.guilds.remove(Long.valueOf(p));
} else if (this.guilds.containsKey(Long.valueOf(q))) {
this.guilds.remove(Long.valueOf(q));
markChanged(GuildsUpdate);
}
}
@ -323,19 +323,19 @@ public final class StoreGuilds extends StoreV2 {
this.guildRoles.clear();
this.guildsUnavailable.clear();
for (com.discord.api.guild.Guild guild : modelPayload.getGuilds()) {
long p = guild.p();
if (guild.M()) {
this.guildsUnavailable.add(Long.valueOf(p));
long q = guild.q();
if (guild.N()) {
this.guildsUnavailable.add(Long.valueOf(q));
} else {
handleGuildRoles(p, 0, guild.E(), false);
handleGuildRoles(q, 0, guild.F(), false);
m.checkNotNullExpressionValue(guild, "guild");
handleGuild(guild, false);
List<com.discord.api.guildmember.GuildMember> t = guild.t();
if (t == null || (map = GuildUtilsKt.asMap(t)) == null) {
List<com.discord.api.guildmember.GuildMember> u = guild.u();
if (u == null || (map = GuildUtilsKt.asMap(u)) == null) {
map = h0.emptyMap();
}
handleGuildMembersMap(p, map);
handleHasRoleAndJoinedAt(p, map);
handleGuildMembersMap(q, map);
handleHasRoleAndJoinedAt(q, map);
}
}
markChanged(GuildsUpdate, ComputedMembersUpdate);
@ -345,16 +345,16 @@ public final class StoreGuilds extends StoreV2 {
public final void handleGuildAdd(com.discord.api.guild.Guild guild) {
Map<Long, com.discord.api.guildmember.GuildMember> map;
m.checkNotNullParameter(guild, "guild");
handleGuildUnavailable(guild.p(), guild.M(), false);
if (!guild.M()) {
handleGuildRoles(guild.p(), 0, guild.E(), false);
handleGuildUnavailable(guild.q(), guild.N(), false);
if (!guild.N()) {
handleGuildRoles(guild.q(), 0, guild.F(), false);
handleGuild(guild, false);
List<com.discord.api.guildmember.GuildMember> t = guild.t();
if (t == null || (map = GuildUtilsKt.asMap(t)) == null) {
List<com.discord.api.guildmember.GuildMember> u = guild.u();
if (u == null || (map = GuildUtilsKt.asMap(u)) == null) {
map = h0.emptyMap();
}
handleGuildMembersMap(guild.p(), map);
handleHasRoleAndJoinedAt(guild.p(), map);
handleGuildMembersMap(guild.q(), map);
handleHasRoleAndJoinedAt(guild.q(), map);
}
}
@ -411,10 +411,10 @@ public final class StoreGuilds extends StoreV2 {
@StoreThread
public final void handleGuildRemove(com.discord.api.guild.Guild guild) {
m.checkNotNullParameter(guild, "guild");
handleGuildUnavailable(guild.p(), guild.M(), true);
handleGuildUnavailable(guild.q(), guild.N(), true);
handleGuild(guild, true);
handleGuildRoles(guild.p(), 0, null, true);
handleGuildMembers(guild.p(), 0, null, true);
handleGuildRoles(guild.q(), 0, null, true);
handleGuildMembers(guild.q(), 0, null, true);
}
@StoreThread

View File

@ -45,7 +45,7 @@ public final class StoreInstantInvites$fetchInviteIfNotLoaded$1 extends o implem
Channel channel2;
Guild guild;
StoreInstantInvites$fetchInviteIfNotLoaded$1 storeInstantInvites$fetchInviteIfNotLoaded$1 = this.this$0;
return new TrackNetworkActionInviteResolve(storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteResolved, storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteCode, Boolean.valueOf(StoreStream.Companion.getAuthentication().isAuthed()), (modelInvite == null || (guild = modelInvite.getGuild()) == null) ? null : Long.valueOf(guild.p()), (modelInvite == null || (channel2 = modelInvite.getChannel()) == null) ? null : Long.valueOf(channel2.h()), (modelInvite == null || (channel = modelInvite.getChannel()) == null) ? null : Long.valueOf((long) channel.A()), (modelInvite == null || (inviter = modelInvite.getInviter()) == null) ? null : Long.valueOf(inviter.i()), modelInvite != null ? Long.valueOf((long) modelInvite.getApproximateMemberCount()) : null, modelInvite != null ? Long.valueOf((long) modelInvite.getApproximatePresenceCount()) : null, modelInvite != null ? modelInvite.getInviteType() : null, null, modelInvite != null ? Boolean.valueOf(m.areEqual(modelInvite.code, String.valueOf((int) RestAPIAbortCodes.USER_BANNED))) : null, null);
return new TrackNetworkActionInviteResolve(storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteResolved, storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteCode, Boolean.valueOf(StoreStream.Companion.getAuthentication().isAuthed()), (modelInvite == null || (guild = modelInvite.getGuild()) == null) ? null : Long.valueOf(guild.q()), (modelInvite == null || (channel2 = modelInvite.getChannel()) == null) ? null : Long.valueOf(channel2.h()), (modelInvite == null || (channel = modelInvite.getChannel()) == null) ? null : Long.valueOf((long) channel.A()), (modelInvite == null || (inviter = modelInvite.getInviter()) == null) ? null : Long.valueOf(inviter.i()), modelInvite != null ? Long.valueOf((long) modelInvite.getApproximateMemberCount()) : null, modelInvite != null ? Long.valueOf((long) modelInvite.getApproximatePresenceCount()) : null, modelInvite != null ? modelInvite.getInviteType() : null, null, modelInvite != null ? Boolean.valueOf(m.areEqual(modelInvite.code, String.valueOf((int) RestAPIAbortCodes.USER_BANNED))) : null, null);
}
}

View File

@ -23,7 +23,7 @@ public final class StoreInstantInvites$onInviteRemoved$1 extends o implements Fu
public final void mo1invoke() {
Map map;
Guild guild = this.$invite.getGuild();
Long valueOf = guild != null ? Long.valueOf(guild.p()) : null;
Long valueOf = guild != null ? Long.valueOf(guild.q()) : null;
String str = this.$invite.code;
if (valueOf != null && (map = (Map) StoreInstantInvites.access$getInvites$p(this.this$0).get(valueOf)) != null && ((ModelInvite) map.remove(str)) != null) {
this.this$0.markChanged();

View File

@ -208,7 +208,7 @@ public final class StoreInstantInvites extends StoreV2 {
this.invites.clear();
for (ModelInvite modelInvite : list) {
Guild guild = modelInvite.getGuild();
Long valueOf = guild != null ? Long.valueOf(guild.p()) : null;
Long valueOf = guild != null ? Long.valueOf(guild.q()) : null;
if (valueOf != null) {
Map<String, ModelInvite> map = this.invites.get(valueOf);
if (map == null) {

View File

@ -332,20 +332,20 @@ public final class StoreLurking {
public final void handleGuildAdd$app_productionCanaryRelease(com.discord.api.guild.Guild guild) {
LurkContext lurkContext;
m.checkNotNullParameter(guild, "guild");
if (!this.lurkedGuilds.keySet().contains(Long.valueOf(guild.p()))) {
if (!this.lurkedGuilds.keySet().contains(Long.valueOf(guild.q()))) {
return;
}
if (guild.q() == null && (lurkContext = this.lurkedGuilds.get(Long.valueOf(guild.p()))) != null && lurkContext.getShouldNavigate()) {
this.stream.getGuildSelected$app_productionCanaryRelease().handleGuildSelected(guild.p());
} else if (guild.q() != null) {
stopLurkingInternal(guild.p());
if (guild.r() == null && (lurkContext = this.lurkedGuilds.get(Long.valueOf(guild.q()))) != null && lurkContext.getShouldNavigate()) {
this.stream.getGuildSelected$app_productionCanaryRelease().handleGuildSelected(guild.q());
} else if (guild.r() != null) {
stopLurkingInternal(guild.q());
}
}
@StoreThread
public final void handleGuildRemove$app_productionCanaryRelease(com.discord.api.guild.Guild guild) {
m.checkNotNullParameter(guild, "guild");
stopLurkingInternal(guild.p());
stopLurkingInternal(guild.q());
}
@StoreThread
@ -383,7 +383,7 @@ public final class StoreLurking {
@StoreThread
public final boolean isLurking$app_productionCanaryRelease(com.discord.api.guild.Guild guild) {
m.checkNotNullParameter(guild, "guild");
return Companion.access$isLurking(Companion, guild.q() != null, guild.p(), this.lurkedGuilds.keySet());
return Companion.access$isLurking(Companion, guild.r() != null, guild.q(), this.lurkedGuilds.keySet());
}
@StoreThread

View File

@ -322,9 +322,9 @@ public final class StoreMentions extends StoreV2 {
Object obj;
boolean z2;
m.checkNotNullParameter(guild, "guild");
List<GuildMember> t = guild.t();
if (t != null) {
Iterator<T> it = t.iterator();
List<GuildMember> u = guild.u();
if (u != null) {
Iterator<T> it = u.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
@ -344,19 +344,19 @@ public final class StoreMentions extends StoreV2 {
}
GuildMember guildMember = (GuildMember) obj;
if (guildMember != null) {
this.myRoleIds.put(Long.valueOf(guild.p()), guildMember.k());
this.myRoleIds.put(Long.valueOf(guild.q()), guildMember.k());
}
}
List<Channel> g = guild.g();
if (g != null) {
for (Channel channel : g) {
this.channelGuildIds.put(Long.valueOf(channel.h()), Long.valueOf(guild.p()));
this.channelGuildIds.put(Long.valueOf(channel.h()), Long.valueOf(guild.q()));
}
}
List<Channel> L = guild.L();
if (L != null) {
for (Channel channel2 : L) {
this.channelGuildIds.put(Long.valueOf(channel2.h()), Long.valueOf(guild.p()));
List<Channel> M = guild.M();
if (M != null) {
for (Channel channel2 : M) {
this.channelGuildIds.put(Long.valueOf(channel2.h()), Long.valueOf(guild.q()));
}
}
}

View File

@ -544,9 +544,9 @@ public final class StoreMessageAck extends StoreV2 {
List<Guild> guilds = modelPayload.getGuilds();
m.checkNotNullExpressionValue(guilds, "payload.guilds");
for (Guild guild : guilds) {
List<GuildMember> t = guild.t();
if (t != null) {
Iterator<T> it = t.iterator();
List<GuildMember> u = guild.u();
if (u != null) {
Iterator<T> it = u.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;

View File

@ -0,0 +1,55 @@
package com.discord.stores;
import com.discord.utilities.rest.SendUtils;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreMessages.kt */
public final class StoreMessages$sendMessage$7$request$2 extends o implements Function1<SendUtils.SendPayload.Preprocessing, Unit> {
public final /* synthetic */ StoreMessages$sendMessage$7 this$0;
/* compiled from: StoreMessages.kt */
/* renamed from: com.discord.stores.StoreMessages$sendMessage$7$request$2$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ String $displayName;
public final /* synthetic */ String $mimeType;
public final /* synthetic */ int $numFiles;
public final /* synthetic */ StoreMessages$sendMessage$7$request$2 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreMessages$sendMessage$7$request$2 storeMessages$sendMessage$7$request$2, int i, String str, String str2) {
super(0);
this.this$0 = storeMessages$sendMessage$7$request$2;
this.$numFiles = i;
this.$displayName = str;
this.$mimeType = str2;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreMessages.access$getStream$p(this.this$0.this$0.this$0).getMessageUploads$app_productionCanaryRelease().onPreprocessing(this.this$0.this$0.$applicationCommandLocalSendData.getNonceString(), this.$numFiles, this.$displayName, this.$mimeType);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreMessages$sendMessage$7$request$2(StoreMessages$sendMessage$7 storeMessages$sendMessage$7) {
super(1);
this.this$0 = storeMessages$sendMessage$7;
}
/* 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(SendUtils.SendPayload.Preprocessing preprocessing) {
invoke(preprocessing);
return Unit.a;
}
public final void invoke(SendUtils.SendPayload.Preprocessing preprocessing) {
m.checkNotNullParameter(preprocessing, "<name for destructuring parameter 0>");
StoreMessages.access$getDispatcher$p(this.this$0.this$0).schedule(new AnonymousClass1(this, preprocessing.component1(), preprocessing.component2(), preprocessing.component3()));
}
}

View File

@ -0,0 +1,52 @@
package com.discord.stores;
import com.discord.utilities.rest.SendUtils;
import d0.z.d.m;
import d0.z.d.o;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreMessages.kt */
public final class StoreMessages$sendMessage$7$request$3 extends o implements Function1<List<? extends SendUtils.FileUpload>, Unit> {
public final /* synthetic */ StoreMessages$sendMessage$7 this$0;
/* compiled from: StoreMessages.kt */
/* renamed from: com.discord.stores.StoreMessages$sendMessage$7$request$3$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ List $uploads;
public final /* synthetic */ StoreMessages$sendMessage$7$request$3 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreMessages$sendMessage$7$request$3 storeMessages$sendMessage$7$request$3, List list) {
super(0);
this.this$0 = storeMessages$sendMessage$7$request$3;
this.$uploads = list;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreMessages.access$getStream$p(this.this$0.this$0.this$0).getMessageUploads$app_productionCanaryRelease().bindUpload(this.this$0.this$0.$applicationCommandLocalSendData.getNonceString(), this.$uploads);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreMessages$sendMessage$7$request$3(StoreMessages$sendMessage$7 storeMessages$sendMessage$7) {
super(1);
this.this$0 = storeMessages$sendMessage$7;
}
/* 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(List<? extends SendUtils.FileUpload> list) {
invoke((List<SendUtils.FileUpload>) list);
return Unit.a;
}
public final void invoke(List<SendUtils.FileUpload> list) {
m.checkNotNullParameter(list, "uploads");
StoreMessages.access$getDispatcher$p(this.this$0.this$0).schedule(new AnonymousClass1(this, list));
}
}

View File

@ -5,24 +5,27 @@ import com.discord.models.commands.ApplicationCommandLocalSendData;
import com.discord.models.message.Message;
import com.discord.utilities.messagesend.MessageRequest;
import com.discord.utilities.messagesend.MessageResult;
import java.util.List;
import rx.Emitter;
import rx.functions.Action1;
/* compiled from: StoreMessages.kt */
public final class StoreMessages$sendMessage$7<T> implements Action1<Emitter<MessageResult>> {
public final /* synthetic */ ApplicationCommandLocalSendData $applicationCommandLocalSendData;
public final /* synthetic */ List $attachments;
public final /* synthetic */ Message $message;
public final /* synthetic */ StoreMessages this$0;
public StoreMessages$sendMessage$7(StoreMessages storeMessages, Message message, ApplicationCommandLocalSendData applicationCommandLocalSendData) {
public StoreMessages$sendMessage$7(StoreMessages storeMessages, Message message, ApplicationCommandLocalSendData applicationCommandLocalSendData, List list) {
this.this$0 = storeMessages;
this.$message = message;
this.$applicationCommandLocalSendData = applicationCommandLocalSendData;
this.$attachments = list;
}
public final void call(Emitter<MessageResult> emitter) {
com.discord.api.message.Message synthesizeApiMessage = this.$message.synthesizeApiMessage();
ApplicationCommandLocalSendData applicationCommandLocalSendData = this.$applicationCommandLocalSendData;
UtcDateTime timestamp = this.$message.getTimestamp();
StoreMessages.access$getMessageQueue(this.this$0, this.$message.getChannelId()).enqueue(new MessageRequest.SendApplicationCommand(synthesizeApiMessage, applicationCommandLocalSendData, new StoreMessages$sendMessage$7$request$1(this, emitter), timestamp != null ? timestamp.g() : 0));
StoreMessages.access$getMessageQueue(this.this$0, this.$message.getChannelId()).enqueue(new MessageRequest.SendApplicationCommand(synthesizeApiMessage, applicationCommandLocalSendData, this.$attachments, new StoreMessages$sendMessage$7$request$2(this), new StoreMessages$sendMessage$7$request$3(this), new StoreMessages$sendMessage$7$request$1(this, emitter), timestamp != null ? timestamp.g() : 0));
}
}

View File

@ -279,6 +279,15 @@ public final class StoreMessages extends Store {
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);
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.stores.StoreMessages */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ Observable sendMessage$default(StoreMessages storeMessages, Message message, ApplicationCommandLocalSendData applicationCommandLocalSendData, List list, int i, Object obj) {
if ((i & 4) != 0) {
list = null;
}
return storeMessages.sendMessage(message, applicationCommandLocalSendData, list);
}
/* JADX WARNING: Removed duplicated region for block: B:19:0x0046 */
/* JADX WARNING: Removed duplicated region for block: B:36:0x007e */
/* JADX WARNING: Removed duplicated region for block: B:43:0x00c0 */
@ -700,11 +709,11 @@ public final class StoreMessages extends Store {
return n2;
}
public final Observable<MessageResult> sendMessage(Message message, ApplicationCommandLocalSendData applicationCommandLocalSendData) {
public final Observable<MessageResult> sendMessage(Message message, ApplicationCommandLocalSendData applicationCommandLocalSendData, List<? extends Attachment<?>> list) {
m.checkNotNullParameter(message, "message");
m.checkNotNullParameter(applicationCommandLocalSendData, "applicationCommandLocalSendData");
this.dispatcher.schedule(new StoreMessages$sendMessage$6(this, message));
Observable<MessageResult> n = Observable.n(new StoreMessages$sendMessage$7(this, message, applicationCommandLocalSendData), Emitter.BackpressureMode.NONE);
Observable<MessageResult> n = Observable.n(new StoreMessages$sendMessage$7(this, message, applicationCommandLocalSendData, list), Emitter.BackpressureMode.NONE);
m.checkNotNullExpressionValue(n, "Observable.create({ emit…er.BackpressureMode.NONE)");
return n;
}

View File

@ -110,10 +110,10 @@ public final class StoreMessagesMostRecent extends StoreV2 {
if (g != null) {
mostRecentIdsUpdateFromChannels(g);
}
List<Channel> L = guild.L();
if (L != null) {
List<Channel> M = guild.M();
if (M != null) {
Collection<Channel> arrayList = new ArrayList<>();
for (Channel channel : L) {
for (Channel channel : M) {
if (ChannelUtils.C(channel)) {
arrayList.add(channel);
}
@ -131,10 +131,10 @@ public final class StoreMessagesMostRecent extends StoreV2 {
if (g != null) {
mostRecentIdsUpdateFromChannels(g);
}
List<Channel> L = guild.L();
if (L != null) {
List<Channel> M = guild.M();
if (M != null) {
Collection<Channel> arrayList = new ArrayList<>();
for (Channel channel : L) {
for (Channel channel : M) {
if (ChannelUtils.C(channel)) {
arrayList.add(channel);
}

View File

@ -219,7 +219,7 @@ public final class StorePermissions extends StoreV2 {
@StoreThread
public final void handleGuildAdd(com.discord.api.guild.Guild guild) {
m.checkNotNullParameter(guild, "guild");
updateGuildPermissions(guild.p(), this.storeChannels.getThreadsForGuildInternal$app_productionCanaryRelease(guild.p()));
updateGuildPermissions(guild.q(), this.storeChannels.getThreadsForGuildInternal$app_productionCanaryRelease(guild.q()));
}
@StoreThread
@ -233,9 +233,9 @@ public final class StorePermissions extends StoreV2 {
@StoreThread
public final void handleGuildRemove(com.discord.api.guild.Guild guild) {
m.checkNotNullParameter(guild, "guild");
long p = guild.p();
this.permissionsForChannels.remove(Long.valueOf(p));
this.permissionsForGuilds.remove(Long.valueOf(p));
long q = guild.q();
this.permissionsForChannels.remove(Long.valueOf(q));
this.permissionsForGuilds.remove(Long.valueOf(q));
markChanged();
}

View File

@ -57,7 +57,7 @@ public final class StoreReviewRequest extends Store {
if (!it.hasNext()) {
break;
}
if (((Guild) it.next()).s() >= 5) {
if (((Guild) it.next()).t() >= 5) {
z3 = true;
continue;
} else {

View File

@ -543,11 +543,11 @@ public final class StoreStageChannels extends StoreV2 {
@StoreThread
public final void handleGuildRemove(com.discord.api.guild.Guild guild) {
m.checkNotNullParameter(guild, "guild");
if (this.stageEventStates.remove(Long.valueOf(guild.p())) != null) {
if (this.stageEventStates.remove(Long.valueOf(guild.q())) != null) {
markStageEventDirty();
}
LinkedHashSet linkedHashSet = new LinkedHashSet();
for (Number number : this.channelsStore.getChannelsForGuild(guild.p()).keySet()) {
for (Number number : this.channelsStore.getChannelsForGuild(guild.q()).keySet()) {
long longValue = number.longValue();
if (this.stageRolesByChannel.remove(Long.valueOf(longValue)) != null) {
linkedHashSet.add(Long.valueOf(longValue));

View File

@ -114,9 +114,9 @@ public final class StoreStageInstances extends StoreV2 {
@StoreThread
public final void handleGuildAdd(Guild guild) {
m.checkNotNullParameter(guild, "guild");
List<StageInstance> H = guild.H();
if (H != null) {
for (StageInstance stageInstance : H) {
List<StageInstance> I = guild.I();
if (I != null) {
for (StageInstance stageInstance : I) {
handleStageInstanceCreateOrUpdate(stageInstance);
}
}
@ -126,7 +126,7 @@ public final class StoreStageInstances extends StoreV2 {
public final void handleGuildRemove(Guild guild) {
Set<Long> set;
m.checkNotNullParameter(guild, "guild");
Map<Long, StageInstance> remove = this.stageInstancesByGuild.remove(Long.valueOf(guild.p()));
Map<Long, StageInstance> remove = this.stageInstancesByGuild.remove(Long.valueOf(guild.q()));
if (remove == null || (set = remove.keySet()) == null) {
set = n0.emptySet();
}

View File

@ -0,0 +1,26 @@
package com.discord.stores;
import com.discord.api.embeddedactivities.EmbeddedActivityInboundUpdate;
import d0.z.d.k;
import d0.z.d.m;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreStream.kt */
public final /* synthetic */ class StoreStream$initGatewaySocketListeners$75 extends k implements Function1<EmbeddedActivityInboundUpdate, Unit> {
public StoreStream$initGatewaySocketListeners$75(StoreStream storeStream) {
super(1, storeStream, StoreStream.class, "handleEmbeddedActivityInboundUpdate", "handleEmbeddedActivityInboundUpdate(Lcom/discord/api/embeddedactivities/EmbeddedActivityInboundUpdate;)V", 0);
}
/* 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(EmbeddedActivityInboundUpdate embeddedActivityInboundUpdate) {
invoke(embeddedActivityInboundUpdate);
return Unit.a;
}
public final void invoke(EmbeddedActivityInboundUpdate embeddedActivityInboundUpdate) {
m.checkNotNullParameter(embeddedActivityInboundUpdate, "p1");
StoreStream.access$handleEmbeddedActivityInboundUpdate((StoreStream) this.receiver, embeddedActivityInboundUpdate);
}
}

View File

@ -9,6 +9,7 @@ import com.discord.api.channel.ChannelRecipient;
import com.discord.api.commands.ApplicationCommandAutocompleteResult;
import com.discord.api.commands.GuildApplicationCommands;
import com.discord.api.connectedaccounts.ConnectedAccount;
import com.discord.api.embeddedactivities.EmbeddedActivityInboundUpdate;
import com.discord.api.emoji.GuildEmojisUpdate;
import com.discord.api.friendsuggestions.FriendSuggestion;
import com.discord.api.friendsuggestions.FriendSuggestionDelete;
@ -148,6 +149,7 @@ public final class StoreStream {
private final StoreEmojiCustom customEmojis;
private final StoreDirectories directories;
private final Dispatcher dispatcher;
private final StoreEmbeddedActivities embeddedActivities;
private final StoreEmoji emojis;
private final StoreEntitlements entitlements;
private final StoreExpandedGuildFolders expandedGuildFolders;
@ -388,6 +390,10 @@ public final class StoreStream {
return getCollector().getStoreDynamicLink$app_productionCanaryRelease();
}
public final StoreEmbeddedActivities getEmbeddedActivities() {
return getCollector().getEmbeddedActivities$app_productionCanaryRelease();
}
public final StoreEmoji getEmojis() {
return getCollector().getEmojis$app_productionCanaryRelease();
}
@ -953,8 +959,7 @@ public final class StoreStream {
StoreStreamRtcConnection storeStreamRtcConnection = new StoreStreamRtcConnection(storeMediaEngine, this.users, this, this.dispatcher, this.clock, this.analytics, storeRtcConnection, null, null, null, 896, null);
this.streamRtcConnection = storeStreamRtcConnection;
this.audioManagerV2 = new StoreAudioManagerV2(ObservationDeckProvider.get(), this.dispatcher, storeVoiceChannelSelected, this.channels, storeStreamRtcConnection, videoUseDetector, this.experiments);
StoreApplicationStreamPreviews storeApplicationStreamPreviews = new StoreApplicationStreamPreviews(this.dispatcher, this.clock, null, null, 12, null);
this.applicationStreamPreviews = storeApplicationStreamPreviews;
this.applicationStreamPreviews = new StoreApplicationStreamPreviews(this.dispatcher, this.clock, null, null, 12, null);
StoreGuildsSorted storeGuildsSorted = new StoreGuildsSorted(ObservationDeckProvider.get(), this.dispatcher, this.guilds, this.lurking);
this.guildsSorted = storeGuildsSorted;
StoreExpandedGuildFolders storeExpandedGuildFolders = new StoreExpandedGuildFolders(this.dispatcher, null, 2, null);
@ -1039,7 +1044,9 @@ public final class StoreStream {
this.notificationUpsells = storeNotificationUpsells;
ConnectionTimeStats connectionTimeStats = new ConnectionTimeStats(this.clock);
this.connectionTimeStats = connectionTimeStats;
List<StoreV2> listOf = n.listOf((Object[]) new StoreV2[]{this.bans, this.users, this.guilds, this.channels, this.channelConversions, this.presences, this.permissions, this.voiceChannelSelected, this.voiceSpeaking, this.accessibility, this.callsIncoming, this.connectivity, this.connectionOpen, storeGuildWelcomeScreens, storeGuildVoiceRegions, this.videoStreams, storeClientDataState, storeGifPicker, storeStickers, this.guildMemberCounts, this.guildJoinRequests, this.experiments, this.messageReplies, storeChannelFollowerStats, storePendingReplies, storeGuildProfiles, this.application, storeApplicationCommands, this.guildSelected, this.channelsSelected, this.pinnedMessages, storeGuildMemberVerificationForm, this.userRequiredAction, this.userSurvey, storePhone, storeThreadsActive, this.threadsJoined, storeThreadsActiveJoined, storeThreadMessages, archivedThreadsStore, storeThreadDraft, storeExpressionPickerNavigation, storePremiumGuildSubscription, this.collapsedChannelCategories, this.messageUploads, storeExpressionSuggestions, this.applicationStreaming, storeApplicationInteractions, storeApplicationCommandFrecency, storeLocalActionComponentState, this.stageInstances, this.requestedStageChannels, storeStageChannels, storeStageChannelSelfPresence, storeAutocomplete, this.messageReactions, this.library, this.userRelationships, this.userSettingsSystem, this.tabsNavigation, this.voiceStates, this.mentions, storeUserAffinities, this.userProfile, this.userConnections, this.messagesMostRecent, this.usersTyping, this.instantInvites, this.guildSettings, this.customEmojis, storeEntitlements, storeMediaFavorites, this.subscriptions, storeGooglePlayPurchases, storeGooglePlaySkuDetails, this.guildTemplates, this.userNotes, this.mfa, this.messageAck, this.guildSubscriptions, this.lazyChannelMembersStore, this.lazyThreadMembersStore, this.guildEmojis, storeGuildsSorted, this.auditLog, storeExpandedGuildFolders, this.maskedLinks, this.streamRtcConnection, this.paymentSources, storeContactSync, storeApplicationStreamPreviews, this.guildsNsfw, this.gameParty, storeFriendSuggestions, this.chat, this.audioManagerV2, storeGuildStickers, storeOutboundPromotions, storeDirectories, storeGuildScheduledEvents, storeGuildRoleSubscriptions, storeNotificationUpsells});
StoreEmbeddedActivities storeEmbeddedActivities = new StoreEmbeddedActivities(null, 1, null);
this.embeddedActivities = storeEmbeddedActivities;
List<StoreV2> listOf = n.listOf((Object[]) new StoreV2[]{this.bans, this.users, this.guilds, this.channels, this.channelConversions, this.presences, this.permissions, this.voiceChannelSelected, this.voiceSpeaking, this.accessibility, this.callsIncoming, this.connectivity, this.connectionOpen, storeGuildWelcomeScreens, storeGuildVoiceRegions, this.videoStreams, storeClientDataState, storeGifPicker, storeStickers, this.guildMemberCounts, this.guildJoinRequests, this.experiments, this.messageReplies, storeChannelFollowerStats, storePendingReplies, storeGuildProfiles, this.application, storeApplicationCommands, this.guildSelected, this.channelsSelected, this.pinnedMessages, storeGuildMemberVerificationForm, this.userRequiredAction, this.userSurvey, storePhone, storeThreadsActive, this.threadsJoined, storeThreadsActiveJoined, storeThreadMessages, archivedThreadsStore, storeThreadDraft, storeExpressionPickerNavigation, storePremiumGuildSubscription, this.collapsedChannelCategories, this.messageUploads, storeExpressionSuggestions, this.applicationStreaming, storeApplicationInteractions, storeApplicationCommandFrecency, storeLocalActionComponentState, this.stageInstances, this.requestedStageChannels, storeStageChannels, storeStageChannelSelfPresence, storeAutocomplete, this.messageReactions, this.library, this.userRelationships, this.userSettingsSystem, this.tabsNavigation, this.voiceStates, this.mentions, storeUserAffinities, this.userProfile, this.userConnections, this.messagesMostRecent, this.usersTyping, this.instantInvites, this.guildSettings, this.customEmojis, storeEntitlements, storeMediaFavorites, this.subscriptions, storeGooglePlayPurchases, storeGooglePlaySkuDetails, this.guildTemplates, this.userNotes, this.mfa, this.messageAck, this.guildSubscriptions, this.lazyChannelMembersStore, this.lazyThreadMembersStore, this.guildEmojis, storeGuildsSorted, this.auditLog, storeExpandedGuildFolders, this.maskedLinks, this.streamRtcConnection, this.paymentSources, storeContactSync, this.applicationStreamPreviews, this.guildsNsfw, this.gameParty, storeFriendSuggestions, this.chat, this.audioManagerV2, storeGuildStickers, storeOutboundPromotions, storeDirectories, storeGuildScheduledEvents, storeGuildRoleSubscriptions, storeNotificationUpsells, storeEmbeddedActivities});
this.storesV2 = listOf;
StoreV2DispatchHandler storeV2DispatchHandler = new StoreV2DispatchHandler(listOf, null, 2, null);
this.storeV2DispatchHandler = storeV2DispatchHandler;
@ -1153,6 +1160,10 @@ public final class StoreStream {
storeStream.handleConnectionReady(z2);
}
public static final /* synthetic */ void access$handleEmbeddedActivityInboundUpdate(StoreStream storeStream, EmbeddedActivityInboundUpdate embeddedActivityInboundUpdate) {
storeStream.handleEmbeddedActivityInboundUpdate(embeddedActivityInboundUpdate);
}
public static final /* synthetic */ void access$handleEmojiUpdate(StoreStream storeStream, GuildEmojisUpdate guildEmojisUpdate) {
storeStream.handleEmojiUpdate(guildEmojisUpdate);
}
@ -2004,6 +2015,7 @@ public final class StoreStream {
this.lazyThreadMembersStore.handleConnectionOpen();
this.connectionTimeStats.handleConnectionOpen(payload);
this.guildScheduledEvents.handleConnectionOpen(payload);
this.embeddedActivities.handleConnectionOpen(payload);
AppLog.i("[StoreStream] Processed ready payload in " + timeElapsed.getSeconds() + " seconds");
return;
}
@ -2022,6 +2034,11 @@ public final class StoreStream {
this.applicationInteractions.handleConnectionReady(z2);
}
@StoreThread
private final void handleEmbeddedActivityInboundUpdate(EmbeddedActivityInboundUpdate embeddedActivityInboundUpdate) {
this.embeddedActivities.handleEmbeddedActivityInboundUpdate(embeddedActivityInboundUpdate);
}
@StoreThread
private final void handleEmojiUpdate(GuildEmojisUpdate guildEmojisUpdate) {
this.customEmojis.handleEmojiUpdate(guildEmojisUpdate);
@ -2068,6 +2085,7 @@ public final class StoreStream {
this.threadsActiveJoined.handleGuildCreate(guild);
this.messageAck.handleGuildCreate();
this.threadMessages.handleGuildCreate(guild);
this.embeddedActivities.handleGuildCreate(guild);
}
@StoreThread
@ -2093,6 +2111,7 @@ public final class StoreStream {
this.clientDataState.handleGuildAdd(guild2);
this.guildStickers.handleGuildCreateOrUpdate(guild2);
this.guildScheduledEvents.handleGuildCreate(guild2);
this.embeddedActivities.handleGuildCreate(guild2);
return;
}
handleHydrateError();
@ -2157,9 +2176,9 @@ public final class StoreStream {
private final void handleGuildRemove(Guild guild) {
if (guild != null) {
this.guilds.handleGuildRemove(guild);
this.guildMemberCounts.handleGuildDelete(guild.p());
this.guildSubscriptions.handleGuildRemove(guild.p());
this.lazyChannelMembersStore.handleGuildRemove(guild.p());
this.guildMemberCounts.handleGuildDelete(guild.q());
this.guildSubscriptions.handleGuildRemove(guild.q());
this.lazyChannelMembersStore.handleGuildRemove(guild.q());
this.presences.handleGuildRemove(guild);
this.guildSelected.handleGuildRemove(guild);
this.channels.handleGuildRemove(guild);
@ -2172,13 +2191,13 @@ public final class StoreStream {
this.voiceStates.handleGuildRemove(guild);
this.lurking.handleGuildRemove$app_productionCanaryRelease(guild);
this.clientDataState.handleGuildRemove(guild);
this.threadsActive.handleGuildDelete(guild.p());
this.threadsJoined.handleGuildDelete(guild.p());
this.threadsActiveJoined.handleGuildDelete(guild.p());
this.threadMessages.handleGuildDelete(guild.p());
this.guildJoinRequests.handleGuildRemove(guild.p());
this.guildStickers.handleGuildRemove(guild.p());
this.guildScheduledEvents.handleGuildRemove(guild.p());
this.threadsActive.handleGuildDelete(guild.q());
this.threadsJoined.handleGuildDelete(guild.q());
this.threadsActiveJoined.handleGuildDelete(guild.q());
this.threadMessages.handleGuildDelete(guild.q());
this.guildJoinRequests.handleGuildRemove(guild.q());
this.guildStickers.handleGuildRemove(guild.q());
this.guildScheduledEvents.handleGuildRemove(guild.q());
}
}
@ -2649,6 +2668,7 @@ public final class StoreStream {
dispatchSubscribe(this.gatewaySocket.getGuildScheduledEventDelete(), "guildScheduledEventDelete", new StoreStream$initGatewaySocketListeners$72(this));
dispatchSubscribe(this.gatewaySocket.getGuildScheduledEventUserAdd(), "guildScheduledEventUserAdd", new StoreStream$initGatewaySocketListeners$73(this));
dispatchSubscribe(this.gatewaySocket.getGuildScheduledEventUserRemove(), "guildScheduledEventUserRemove", new StoreStream$initGatewaySocketListeners$74(this));
dispatchSubscribe(this.gatewaySocket.getEmbeddedActivityInboundUpdate(), "embeddedActivityInboundUpdate", new StoreStream$initGatewaySocketListeners$75(this));
}
private final void maybeLogNotificationPermissionStatus(Application application, Clock clock) {
@ -2822,6 +2842,10 @@ public final class StoreStream {
return this.directories;
}
public final StoreEmbeddedActivities getEmbeddedActivities$app_productionCanaryRelease() {
return this.embeddedActivities;
}
public final StoreEmoji getEmojis$app_productionCanaryRelease() {
return this.emojis;
}

View File

@ -203,9 +203,9 @@ public final class StoreThreadMessages extends StoreV2 {
@StoreThread
private final void updateFromGuild(Guild guild) {
List<Channel> L = guild.L();
if (L != null) {
for (Channel channel : L) {
List<Channel> M = guild.M();
if (M != null) {
for (Channel channel : M) {
updateFromThread(channel);
}
}

View File

@ -109,10 +109,10 @@ public final class StoreThreadsActive extends StoreV2 {
private final void saveThreads(Guild guild) {
ThreadMetadata y2;
List<Channel> threadsForGuildInternal$app_productionCanaryRelease = this.storeChannels.getThreadsForGuildInternal$app_productionCanaryRelease(guild.p());
List<Channel> threadsForGuildInternal$app_productionCanaryRelease = this.storeChannels.getThreadsForGuildInternal$app_productionCanaryRelease(guild.q());
if (!threadsForGuildInternal$app_productionCanaryRelease.isEmpty()) {
Map<Long, Map<Long, Channel>> map = this.threadsByGuild;
Long valueOf = Long.valueOf(guild.p());
Long valueOf = Long.valueOf(guild.q());
ArrayList arrayList = new ArrayList();
for (Object obj : threadsForGuildInternal$app_productionCanaryRelease) {
Channel channel = (Channel) obj;
@ -172,7 +172,7 @@ public final class StoreThreadsActive extends StoreV2 {
@StoreThread
public final void handleGuildCreate(Guild guild) {
m.checkNotNullParameter(guild, "guild");
deleteThreads(guild.p());
deleteThreads(guild.q());
saveThreads(guild);
}

View File

@ -216,7 +216,7 @@ public final class StoreThreadsActiveJoined extends StoreV2 {
@StoreThread
public final void handleGuildCreate(Guild guild) {
m.checkNotNullParameter(guild, "guild");
saveThreads(Long.valueOf(guild.p()));
saveThreads(Long.valueOf(guild.q()));
}
@StoreThread

View File

@ -202,11 +202,11 @@ public final class StoreThreadsJoined extends StoreV2 {
private final void saveThreads(Guild guild) {
ThreadMember j;
List<Channel> L = guild.L();
if (L != null) {
for (Channel channel : L) {
List<Channel> M = guild.M();
if (M != null) {
for (Channel channel : M) {
if (ChannelUtils.C(channel) && (j = channel.j()) != null) {
this.joinedThreads.put(Long.valueOf(channel.h()), new JoinedThread(channel.h(), guild.p(), j.a(), j.e(), new ModelMuteConfig(j.d()), j.c()));
this.joinedThreads.put(Long.valueOf(channel.h()), new JoinedThread(channel.h(), guild.q(), j.a(), j.e(), new ModelMuteConfig(j.d()), j.c()));
markChanged();
}
}
@ -238,7 +238,7 @@ public final class StoreThreadsJoined extends StoreV2 {
@StoreThread
public final void handleGuildCreate(Guild guild) {
m.checkNotNullParameter(guild, "guild");
deleteThreads(guild.p());
deleteThreads(guild.q());
saveThreads(guild);
}

View File

@ -254,9 +254,9 @@ public final class StoreUser extends StoreV2 {
}
}
for (Guild guild : modelPayload.getGuilds()) {
List<GuildMember> t = guild.t();
if (t != null) {
for (GuildMember guildMember : t) {
List<GuildMember> u = guild.u();
if (u != null) {
for (GuildMember guildMember : u) {
this.users.put(Long.valueOf(guildMember.l().i()), new CoreUser(guildMember.l()));
}
}
@ -288,9 +288,9 @@ public final class StoreUser extends StoreV2 {
@StoreThread
public final void handleGuildAddOrSync(Guild guild) {
m.checkNotNullParameter(guild, "guild");
List<GuildMember> t = guild.t();
if (t != null) {
for (GuildMember guildMember : t) {
List<GuildMember> u = guild.u();
if (u != null) {
for (GuildMember guildMember : u) {
updateUser(guildMember.l());
}
}

View File

@ -467,12 +467,12 @@ public final class StoreUserPresence extends StoreV2 {
@StoreThread
public final void handleGuildAdd(Guild guild) {
m.checkNotNullParameter(guild, "guild");
List<com.discord.api.presence.Presence> B = guild.B();
if (B != null) {
for (com.discord.api.presence.Presence presence : B) {
List<com.discord.api.presence.Presence> C = guild.C();
if (C != null) {
for (com.discord.api.presence.Presence presence : C) {
User f = presence.f();
if (f != null) {
handlePresenceUpdate(guild.p(), f.i(), presence.e(), presence.c(), presence.b());
handlePresenceUpdate(guild.q(), f.i(), presence.e(), presence.c(), presence.b());
}
}
}
@ -489,7 +489,7 @@ public final class StoreUserPresence extends StoreV2 {
@StoreThread
public final void handleGuildRemove(Guild guild) {
m.checkNotNullParameter(guild, "guild");
clearPresences(guild.p());
clearPresences(guild.q());
}
@StoreThread

View File

@ -156,10 +156,10 @@ public final class StoreVoiceStates extends StoreV2 {
List<Guild> guilds = modelPayload.getGuilds();
m.checkNotNullExpressionValue(guilds, "payload.guilds");
for (Guild guild : guilds) {
List<VoiceState> P = guild.P();
if (P != null) {
for (VoiceState voiceState : P) {
updateVoiceState(voiceState, Long.valueOf(guild.p()));
List<VoiceState> Q = guild.Q();
if (Q != null) {
for (VoiceState voiceState : Q) {
updateVoiceState(voiceState, Long.valueOf(guild.q()));
}
}
}
@ -168,10 +168,10 @@ public final class StoreVoiceStates extends StoreV2 {
@StoreThread
public final void handleGuildAdd(Guild guild) {
m.checkNotNullParameter(guild, "guild");
List<VoiceState> P = guild.P();
if (P != null) {
for (VoiceState voiceState : P) {
updateVoiceState(voiceState, Long.valueOf(guild.p()));
List<VoiceState> Q = guild.Q();
if (Q != null) {
for (VoiceState voiceState : Q) {
updateVoiceState(voiceState, Long.valueOf(guild.q()));
}
}
}
@ -179,8 +179,8 @@ public final class StoreVoiceStates extends StoreV2 {
@StoreThread
public final void handleGuildRemove(Guild guild) {
m.checkNotNullParameter(guild, "guild");
this.voiceStates.remove(Long.valueOf(guild.p()));
this.dirtyGuildIds.add(Long.valueOf(guild.p()));
this.voiceStates.remove(Long.valueOf(guild.q()));
this.dirtyGuildIds.add(Long.valueOf(guild.q()));
markChanged();
}

View File

@ -609,7 +609,7 @@ public final class AnalyticsTracker {
String str2 = modelInvite.code;
m.checkNotNullExpressionValue(str2, "invite.code");
com.discord.api.guild.Guild guild = modelInvite.getGuild();
Long valueOf = guild != null ? Long.valueOf(guild.p()) : null;
Long valueOf = guild != null ? Long.valueOf(guild.q()) : null;
Channel channel = modelInvite.getChannel();
Long valueOf2 = channel != null ? Long.valueOf(channel.h()) : null;
Channel channel2 = modelInvite.getChannel();
@ -651,7 +651,7 @@ public final class AnalyticsTracker {
String str = modelInvite.code;
m.checkNotNullExpressionValue(str, "invite.code");
com.discord.api.guild.Guild guild = modelInvite.getGuild();
Long valueOf = guild != null ? Long.valueOf(guild.p()) : null;
Long valueOf = guild != null ? Long.valueOf(guild.q()) : null;
Channel channel = modelInvite.getChannel();
Long valueOf2 = channel != null ? Long.valueOf(channel.h()) : null;
Channel channel2 = modelInvite.getChannel();
@ -1454,7 +1454,7 @@ public final class AnalyticsTracker {
}
com.discord.api.guild.Guild guild = modelInvite.getGuild();
if (guild != null) {
mutableMapOf.put(ModelAuditLogEntry.CHANGE_KEY_GUILD_ID, Long.valueOf(guild.p()));
mutableMapOf.put(ModelAuditLogEntry.CHANGE_KEY_GUILD_ID, Long.valueOf(guild.q()));
}
User inviter = modelInvite.getInviter();
if (inviter != null) {
@ -1578,7 +1578,7 @@ public final class AnalyticsTracker {
}
com.discord.api.guild.Guild guild = modelInvite.getGuild();
if (guild != null) {
map.put("invite_guild_id", Long.valueOf(guild.p()));
map.put("invite_guild_id", Long.valueOf(guild.q()));
}
User inviter = modelInvite.getInviter();
if (inviter != null) {

View File

@ -14,6 +14,7 @@ import com.discord.utilities.premium.PremiumUtils;
import com.discord.utilities.voice.Bitrate;
import d0.d0.f;
import d0.t.g0;
import d0.t.n;
import d0.t.o;
import d0.t.u;
import d0.z.d.m;
@ -39,7 +40,7 @@ public final class GuildUtilsKt {
public static final Guild createApiGuild(com.discord.models.guild.Guild guild) {
m.checkNotNullParameter(guild, "guild");
return new Guild(guild.getRoles(), guild.getEmojis(), guild.getStickers(), guild.getName(), guild.getDescription(), Integer.valueOf(guild.getDefaultMessageNotifications()), guild.getId(), guild.getRegion(), guild.getOwnerId(), guild.getIcon(), guild.getVerificationLevel(), guild.getExplicitContentFilter(), null, null, null, null, guild.getUnavailable(), guild.getMfaLevel(), guild.getAfkTimeout(), guild.getAfkChannelId(), guild.getSystemChannelId(), u.toList(guild.getFeatures()), guild.getMemberCount(), guild.getBanner(), guild.getSplash(), guild.getPremiumTier(), guild.getPremiumSubscriptionCount(), guild.getSystemChannelFlags(), guild.getJoinedAt(), guild.getRulesChannelId(), guild.getPublicUpdatesChannelId(), guild.getPreferredLocale(), guild.getWelcomeScreen(), guild.getMaxVideoChannelUsers(), guild.getVanityUrlCode(), 0, guild.getApproximatePresenceCount(), null, null, null, null, guild.getNsfw(), null, null);
return new Guild(guild.getRoles(), guild.getEmojis(), guild.getStickers(), guild.getName(), guild.getDescription(), Integer.valueOf(guild.getDefaultMessageNotifications()), guild.getId(), guild.getRegion(), guild.getOwnerId(), guild.getIcon(), guild.getVerificationLevel(), guild.getExplicitContentFilter(), null, null, null, null, guild.getUnavailable(), guild.getMfaLevel(), guild.getAfkTimeout(), guild.getAfkChannelId(), guild.getSystemChannelId(), u.toList(guild.getFeatures()), guild.getMemberCount(), guild.getBanner(), guild.getSplash(), guild.getPremiumTier(), guild.getPremiumSubscriptionCount(), guild.getSystemChannelFlags(), guild.getJoinedAt(), guild.getRulesChannelId(), guild.getPublicUpdatesChannelId(), guild.getPreferredLocale(), guild.getWelcomeScreen(), guild.getMaxVideoChannelUsers(), guild.getVanityUrlCode(), 0, guild.getApproximatePresenceCount(), null, null, null, null, guild.getNsfw(), null, null, n.emptyList());
}
public static final GuildRole getGuildRole(Long l) {

View File

@ -64,7 +64,7 @@ public final class MemberVerificationUtils {
String str;
com.discord.api.guild.Guild guild2;
if (guild == null || (str = guild.getName()) == null) {
str = (modelInvite == null || (guild2 = modelInvite.getGuild()) == null) ? null : guild2.v();
str = (modelInvite == null || (guild2 = modelInvite.getGuild()) == null) ? null : guild2.w();
}
if (str != null) {
MemberVerificationSuccessDialog.Companion.enqueue(str);
@ -93,7 +93,7 @@ public final class MemberVerificationUtils {
Collection collection;
com.discord.api.guild.Guild guild2;
if (guild == null || (collection = guild.getFeatures()) == null) {
collection = (modelInvite == null || (guild2 = modelInvite.getGuild()) == null) ? null : guild2.l();
collection = (modelInvite == null || (guild2 = modelInvite.getGuild()) == null) ? null : guild2.m();
}
if (collection == null) {
collection = n0.emptySet();

View File

@ -5,6 +5,7 @@ import android.text.format.DateUtils;
import c.a.k.b;
import com.discord.R;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType;
import com.discord.api.guildscheduledevent.GuildScheduledEventStatus;
import com.discord.models.guild.UserGuildMember;
import com.discord.models.user.User;
@ -16,24 +17,49 @@ import com.discord.utilities.time.TimeUtils;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventModel;
import d0.z.d.m;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Collection;
import java.util.Iterator;
import java.util.Locale;
import java.util.Objects;
/* compiled from: GuildScheduledEventUtilities.kt */
public final class GuildScheduledEventUtilitiesKt {
public final /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
public static final /* synthetic */ int[] $EnumSwitchMapping$1;
public static final /* synthetic */ int[] $EnumSwitchMapping$2;
public static final /* synthetic */ int[] $EnumSwitchMapping$3;
static {
GuildScheduledEventTiming.values();
int[] iArr = new int[7];
GuildScheduledEventEntityType.values();
int[] iArr = new int[5];
$EnumSwitchMapping$0 = iArr;
iArr[GuildScheduledEventTiming.EXPIRED.ordinal()] = 1;
iArr[GuildScheduledEventTiming.NOW.ordinal()] = 2;
iArr[GuildScheduledEventTiming.SOON.ordinal()] = 3;
iArr[GuildScheduledEventTiming.TODAY.ordinal()] = 4;
iArr[GuildScheduledEventTiming.TOMORROW.ordinal()] = 5;
iArr[GuildScheduledEventEntityType.EXTERNAL.ordinal()] = 1;
GuildScheduledEventTiming.values();
int[] iArr2 = new int[7];
$EnumSwitchMapping$1 = iArr2;
GuildScheduledEventTiming guildScheduledEventTiming = GuildScheduledEventTiming.LIVE;
iArr2[guildScheduledEventTiming.ordinal()] = 1;
iArr2[GuildScheduledEventTiming.EXPIRED.ordinal()] = 2;
iArr2[GuildScheduledEventTiming.NOW.ordinal()] = 3;
GuildScheduledEventTiming guildScheduledEventTiming2 = GuildScheduledEventTiming.SOON;
iArr2[guildScheduledEventTiming2.ordinal()] = 4;
GuildScheduledEventTiming guildScheduledEventTiming3 = GuildScheduledEventTiming.TODAY;
iArr2[guildScheduledEventTiming3.ordinal()] = 5;
GuildScheduledEventTiming guildScheduledEventTiming4 = GuildScheduledEventTiming.TOMORROW;
iArr2[guildScheduledEventTiming4.ordinal()] = 6;
GuildScheduledEventTiming.values();
int[] iArr3 = new int[7];
$EnumSwitchMapping$2 = iArr3;
iArr3[guildScheduledEventTiming.ordinal()] = 1;
iArr3[guildScheduledEventTiming2.ordinal()] = 2;
iArr3[guildScheduledEventTiming3.ordinal()] = 3;
GuildScheduledEventTiming.values();
int[] iArr4 = new int[7];
$EnumSwitchMapping$3 = iArr4;
iArr4[guildScheduledEventTiming4.ordinal()] = 1;
iArr4[GuildScheduledEventTiming.LATER.ordinal()] = 2;
}
}
@ -89,47 +115,69 @@ public final class GuildScheduledEventUtilitiesKt {
return getCreatorUserGuildMember(guildScheduledEventModel, storeGuilds, storeUser);
}
public static final CharSequence getEventStartingTimeString(long j, Context context) {
public static final CharSequence getEventEndingTimeString(Context context, long j, long j2, GuildScheduledEventStatus guildScheduledEventStatus) {
m.checkNotNullParameter(context, "context");
int ordinal = getEventTiming(j).ordinal();
if (ordinal == 1 || ordinal == 2) {
return b.h(context, R.string.guild_event_date_at_time, new Object[]{DateUtils.getRelativeTimeSpanString(j, ClockFactory.get().currentTimeMillis(), 86400000), new SimpleDateFormat("h:mm a", Locale.getDefault()).format(Long.valueOf(j))}, null, 4);
m.checkNotNullParameter(guildScheduledEventStatus, "status");
if (!isSameDay(j, j2)) {
return null;
}
if (ordinal == 3) {
return b.h(context, R.string.starting_in_minutes, new Object[]{Integer.valueOf(minutesRelativeToTime(j))}, null, 4);
if (DateUtils.isToday(j2)) {
int ordinal = getEventTiming(j, guildScheduledEventStatus).ordinal();
if (ordinal == 2 || ordinal == 3 || ordinal == 5) {
return b.h(context, R.string.ending_on_date, new Object[]{new SimpleDateFormat("h:mm a", Locale.getDefault()).format(Long.valueOf(j2))}, null, 4);
}
return null;
}
if (ordinal == 4 || ordinal == 6) {
return b.h(context, R.string.starting_soon, new Object[0], null, 4);
int ordinal2 = getEventTiming(j, guildScheduledEventStatus).ordinal();
if (ordinal2 == 0 || ordinal2 == 1) {
return new SimpleDateFormat("h:mm a", Locale.getDefault()).format(Long.valueOf(j2));
}
return null;
}
public static final CharSequence getEventStartingTimeString(Context context, long j, GuildScheduledEventEntityType guildScheduledEventEntityType, GuildScheduledEventStatus guildScheduledEventStatus) {
m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(guildScheduledEventEntityType, "entityType");
m.checkNotNullParameter(guildScheduledEventStatus, "status");
GuildScheduledEventTiming eventTiming = getEventTiming(j, guildScheduledEventStatus);
Objects.requireNonNull(GuildScheduledEventStatus.Companion);
if (GuildScheduledEventStatus.access$getDONE$cp().contains(guildScheduledEventStatus)) {
return getNonRelativeTimeString(j);
}
switch (eventTiming.ordinal()) {
case 1:
case 2:
return b.h(context, R.string.guild_event_date_at_time, new Object[]{DateUtils.getRelativeTimeSpanString(j, ClockFactory.get().currentTimeMillis(), 86400000), new SimpleDateFormat("h:mm a", Locale.getDefault()).format(Long.valueOf(j))}, null, 4);
case 3:
return b.h(context, R.string.starting_in_minutes, new Object[]{Integer.valueOf(minutesRelativeToTime(j))}, null, 4);
case 4:
case 6:
return b.h(context, R.string.starting_soon, new Object[0], null, 4);
case 5:
return guildScheduledEventEntityType.ordinal() != 3 ? b.h(context, R.string.stage_channel_live_now, new Object[0], null, 4) : b.h(context, R.string.active_now, new Object[0], null, 4);
default:
return getNonRelativeTimeString(j);
}
String nonRelativeTimeString = getNonRelativeTimeString(j);
m.checkNotNullExpressionValue(nonRelativeTimeString, "getNonRelativeTimeString()");
return nonRelativeTimeString;
}
public static final CharSequence getEventStartingTimeString(GuildScheduledEvent guildScheduledEvent, Context context) {
m.checkNotNullParameter(guildScheduledEvent, "$this$getEventStartingTimeString");
m.checkNotNullParameter(context, "context");
GuildScheduledEventTiming eventTiming = getEventTiming(guildScheduledEvent);
long g = guildScheduledEvent.k().g();
if (eventTiming == GuildScheduledEventTiming.LIVE) {
return b.h(context, R.string.stage_channel_live_now, new Object[0], null, 4);
}
if (guildScheduledEvent.l() != GuildScheduledEventStatus.COMPLETED && guildScheduledEvent.l() != GuildScheduledEventStatus.CANCELED) {
return getEventStartingTimeString(g, context);
}
String nonRelativeTimeString = getNonRelativeTimeString(g);
m.checkNotNullExpressionValue(nonRelativeTimeString, "startTimeMillis.getNonRelativeTimeString()");
return nonRelativeTimeString;
return getEventStartingTimeString(context, guildScheduledEvent.k().g(), guildScheduledEvent.f(), guildScheduledEvent.l());
}
public static final GuildScheduledEventTiming getEventTiming(long j) {
public static final GuildScheduledEventTiming getEventTiming(long j, GuildScheduledEventStatus guildScheduledEventStatus) {
m.checkNotNullParameter(guildScheduledEventStatus, "status");
if (guildScheduledEventStatus == GuildScheduledEventStatus.ACTIVE) {
return GuildScheduledEventTiming.LIVE;
}
int minutesRelativeToTime = minutesRelativeToTime(j);
return minutesRelativeToTime <= -60 ? GuildScheduledEventTiming.EXPIRED : minutesRelativeToTime <= 0 ? GuildScheduledEventTiming.NOW : minutesRelativeToTime <= 15 ? GuildScheduledEventTiming.SOON : DateUtils.isToday(j) ? GuildScheduledEventTiming.TODAY : DateUtils.isToday(j - 86400000) ? GuildScheduledEventTiming.TOMORROW : GuildScheduledEventTiming.LATER;
}
public static final GuildScheduledEventTiming getEventTiming(GuildScheduledEvent guildScheduledEvent) {
m.checkNotNullParameter(guildScheduledEvent, "$this$getEventTiming");
return guildScheduledEvent.l() == GuildScheduledEventStatus.ACTIVE ? GuildScheduledEventTiming.LIVE : getEventTiming(guildScheduledEvent.k().g());
return getEventTiming(guildScheduledEvent.k().g(), guildScheduledEvent.l());
}
public static final GuildScheduledEvent getLiveEvent(Collection<GuildScheduledEvent> collection) {
@ -157,8 +205,10 @@ public final class GuildScheduledEventUtilitiesKt {
return (GuildScheduledEvent) obj;
}
private static final String getNonRelativeTimeString(long j) {
return new SimpleDateFormat("EEE, MMM d · h:mm a", Locale.getDefault()).format(Long.valueOf(j));
private static final CharSequence getNonRelativeTimeString(long j) {
String format = (isCurrentYear(j) ? new SimpleDateFormat("EEE, MMM d · h:mm a", Locale.getDefault()) : new SimpleDateFormat("EEE, MMM d, yyyy · h:mm a", Locale.getDefault())).format(Long.valueOf(j));
m.checkNotNullExpressionValue(format, "dateFormat.format(this)");
return format;
}
public static final boolean hasLiveEvent(Collection<GuildScheduledEvent> collection) {
@ -166,6 +216,26 @@ public final class GuildScheduledEventUtilitiesKt {
return getLiveEvent(collection) != null;
}
private static final boolean isCurrentYear(long j) {
Calendar instance = Calendar.getInstance();
Calendar instance2 = Calendar.getInstance();
m.checkNotNullExpressionValue(instance, "eventCalendar");
instance.setTimeInMillis(j);
m.checkNotNullExpressionValue(instance2, "nowCalendar");
instance2.setTimeInMillis(ClockFactory.get().currentTimeMillis());
return instance.get(1) == instance2.get(1);
}
private static final boolean isSameDay(long j, long j2) {
Calendar instance = Calendar.getInstance();
Calendar instance2 = Calendar.getInstance();
m.checkNotNullExpressionValue(instance, "eventCalendar");
instance.setTimeInMillis(j);
m.checkNotNullExpressionValue(instance2, "nowCalendar");
instance2.setTimeInMillis(j2);
return instance.get(1) == instance2.get(1) && instance.get(2) == instance2.get(2) && instance.get(5) == instance2.get(5);
}
public static final int minutesRelativeToTime(long j) {
TimeUtils timeUtils = TimeUtils.INSTANCE;
int minutesFromMillis = timeUtils.getMinutesFromMillis(j - ClockFactory.get().currentTimeMillis());

View File

@ -0,0 +1,13 @@
package com.discord.utilities.messagesend;
import com.discord.utilities.rest.SendUtils;
import j0.k.b;
/* compiled from: ObservableExtensions.kt */
public final class MessageQueue$doSendApplicationCommand$$inlined$filterIs$1<T, R> implements b<Object, Boolean> {
public static final MessageQueue$doSendApplicationCommand$$inlined$filterIs$1 INSTANCE = new MessageQueue$doSendApplicationCommand$$inlined$filterIs$1();
@Override // j0.k.b
public final Boolean call(Object obj) {
return Boolean.valueOf(obj instanceof SendUtils.SendPayload.ReadyToSendCommand);
}
}

View File

@ -0,0 +1,15 @@
package com.discord.utilities.messagesend;
import com.discord.utilities.rest.SendUtils;
import j0.k.b;
import java.util.Objects;
/* compiled from: ObservableExtensions.kt */
public final class MessageQueue$doSendApplicationCommand$$inlined$filterIs$2<T, R> implements b<Object, T> {
public static final MessageQueue$doSendApplicationCommand$$inlined$filterIs$2 INSTANCE = new MessageQueue$doSendApplicationCommand$$inlined$filterIs$2();
@Override // j0.k.b
public final T call(Object obj) {
Objects.requireNonNull(obj, "null cannot be cast to non-null type com.discord.utilities.rest.SendUtils.SendPayload.ReadyToSendCommand");
return (T) ((SendUtils.SendPayload.ReadyToSendCommand) obj);
}
}

View File

@ -1,33 +1,24 @@
package com.discord.utilities.messagesend;
import com.discord.utilities.messagesend.MessageQueue;
import com.discord.utilities.messagesend.MessageRequest;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import com.discord.utilities.rest.SendUtils;
import rx.functions.Action1;
/* compiled from: MessageQueue.kt */
public final class MessageQueue$doSendApplicationCommand$1 extends o implements Function1<Void, Unit> {
public final /* synthetic */ MessageQueue.DrainListener $drainListener;
public final class MessageQueue$doSendApplicationCommand$1<T> implements Action1<SendUtils.SendPayload> {
public final /* synthetic */ MessageRequest.SendApplicationCommand $sendApplicationCommandRequest;
public final /* synthetic */ MessageQueue this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public MessageQueue$doSendApplicationCommand$1(MessageQueue messageQueue, MessageRequest.SendApplicationCommand sendApplicationCommand, MessageQueue.DrainListener drainListener) {
super(1);
this.this$0 = messageQueue;
public MessageQueue$doSendApplicationCommand$1(MessageRequest.SendApplicationCommand sendApplicationCommand) {
this.$sendApplicationCommandRequest = sendApplicationCommand;
this.$drainListener = drainListener;
}
/* 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) {
MessageQueue.access$handleSuccess(this.this$0, this.$sendApplicationCommandRequest.getMessage(), this.$drainListener);
public final void call(SendUtils.SendPayload sendPayload) {
if (sendPayload instanceof SendUtils.SendPayload.Preprocessing) {
this.$sendApplicationCommandRequest.getOnPreprocessing().invoke(sendPayload);
} else if (sendPayload instanceof SendUtils.SendPayload.ReadyToSendCommand) {
SendUtils.SendPayload.ReadyToSendCommand readyToSendCommand = (SendUtils.SendPayload.ReadyToSendCommand) sendPayload;
if (!readyToSendCommand.getUploads().isEmpty()) {
this.$sendApplicationCommandRequest.getOnProgress().invoke(readyToSendCommand.getUploads());
}
}
}
}

View File

@ -1,33 +1,37 @@
package com.discord.utilities.messagesend;
import com.discord.utilities.error.Error;
import com.discord.utilities.messagesend.MessageQueue;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import com.discord.restapi.PayloadJSON;
import com.discord.restapi.RestAPIParams;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rest.SendUtils;
import d0.t.o;
import j0.k.b;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import okhttp3.MultipartBody;
import rx.Observable;
/* compiled from: MessageQueue.kt */
public final class MessageQueue$doSendApplicationCommand$2 extends o implements Function1<Error, Unit> {
public final /* synthetic */ MessageQueue.DrainListener $drainListener;
public final /* synthetic */ MessageQueue this$0;
public final class MessageQueue$doSendApplicationCommand$2<T, R> implements b<SendUtils.SendPayload.ReadyToSendCommand, Observable<? extends Void>> {
public static final MessageQueue$doSendApplicationCommand$2 INSTANCE = new MessageQueue$doSendApplicationCommand$2();
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public MessageQueue$doSendApplicationCommand$2(MessageQueue messageQueue, MessageQueue.DrainListener drainListener) {
super(1);
this.this$0 = messageQueue;
this.$drainListener = drainListener;
}
/* 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(Error error) {
invoke(error);
return Unit.a;
}
public final void invoke(Error error) {
m.checkNotNullParameter(error, "it");
MessageQueue.access$handleError(this.this$0, error, this.$drainListener);
/* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: java.util.ArrayList */
/* JADX WARN: Multi-variable type inference failed */
public final Observable<? extends Void> call(SendUtils.SendPayload.ReadyToSendCommand readyToSendCommand) {
List<SendUtils.FileUpload> uploads = readyToSendCommand.getUploads();
ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(uploads, 10));
Iterator<T> it = uploads.iterator();
while (it.hasNext()) {
arrayList.add(it.next().getPart());
}
if (!(!arrayList.isEmpty())) {
return RestAPI.Companion.getApi().sendApplicationCommand(readyToSendCommand.getCommand().toRestApiParam());
}
RestAPI api = RestAPI.Companion.getApi();
PayloadJSON<RestAPIParams.ApplicationCommand> payloadJSON = new PayloadJSON<>(readyToSendCommand.getCommand().toRestApiParam());
Object[] array = arrayList.toArray(new MultipartBody.Part[0]);
Objects.requireNonNull(array, "null cannot be cast to non-null type kotlin.Array<T>");
return api.sendApplicationCommand(payloadJSON, (MultipartBody.Part[]) array);
}
}

View File

@ -1,15 +1,12 @@
package com.discord.utilities.messagesend;
import com.discord.utilities.analytics.Traits;
import com.discord.utilities.messagesend.MessageQueue;
import com.discord.utilities.messagesend.MessageRequest;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import rx.Subscription;
/* compiled from: MessageQueue.kt */
public final class MessageQueue$doSendApplicationCommand$3 extends o implements Function1<Subscription, Unit> {
public final class MessageQueue$doSendApplicationCommand$3 extends o implements Function1<Void, Unit> {
public final /* synthetic */ MessageQueue.DrainListener $drainListener;
public final /* synthetic */ MessageRequest.SendApplicationCommand $sendApplicationCommandRequest;
public final /* synthetic */ MessageQueue this$0;
@ -25,13 +22,12 @@ public final class MessageQueue$doSendApplicationCommand$3 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(Subscription subscription) {
invoke(subscription);
public /* bridge */ /* synthetic */ Unit invoke(Void r1) {
invoke(r1);
return Unit.a;
}
public final void invoke(Subscription subscription) {
m.checkNotNullParameter(subscription, Traits.Payment.Type.SUBSCRIPTION);
MessageQueue.access$setInFlightRequest$p(this.this$0, new MessageQueue.InflightRequest(this.$sendApplicationCommandRequest, subscription, this.$drainListener));
public final void invoke(Void r3) {
MessageQueue.access$handleSuccess(this.this$0, this.$sendApplicationCommandRequest.getMessage(), this.$drainListener);
}
}

View File

@ -0,0 +1,33 @@
package com.discord.utilities.messagesend;
import com.discord.utilities.error.Error;
import com.discord.utilities.messagesend.MessageQueue;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: MessageQueue.kt */
public final class MessageQueue$doSendApplicationCommand$4 extends o implements Function1<Error, Unit> {
public final /* synthetic */ MessageQueue.DrainListener $drainListener;
public final /* synthetic */ MessageQueue this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public MessageQueue$doSendApplicationCommand$4(MessageQueue messageQueue, MessageQueue.DrainListener drainListener) {
super(1);
this.this$0 = messageQueue;
this.$drainListener = drainListener;
}
/* 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(Error error) {
invoke(error);
return Unit.a;
}
public final void invoke(Error error) {
m.checkNotNullParameter(error, "it");
MessageQueue.access$handleError(this.this$0, error, this.$drainListener);
}
}

View File

@ -0,0 +1,37 @@
package com.discord.utilities.messagesend;
import com.discord.utilities.analytics.Traits;
import com.discord.utilities.messagesend.MessageQueue;
import com.discord.utilities.messagesend.MessageRequest;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import rx.Subscription;
/* compiled from: MessageQueue.kt */
public final class MessageQueue$doSendApplicationCommand$5 extends o implements Function1<Subscription, Unit> {
public final /* synthetic */ MessageQueue.DrainListener $drainListener;
public final /* synthetic */ MessageRequest.SendApplicationCommand $sendApplicationCommandRequest;
public final /* synthetic */ MessageQueue this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public MessageQueue$doSendApplicationCommand$5(MessageQueue messageQueue, MessageRequest.SendApplicationCommand sendApplicationCommand, MessageQueue.DrainListener drainListener) {
super(1);
this.this$0 = messageQueue;
this.$sendApplicationCommandRequest = sendApplicationCommand;
this.$drainListener = drainListener;
}
/* 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(Subscription subscription) {
invoke(subscription);
return Unit.a;
}
public final void invoke(Subscription subscription) {
m.checkNotNullParameter(subscription, Traits.Payment.Type.SUBSCRIPTION);
MessageQueue.access$setInFlightRequest$p(this.this$0, new MessageQueue.InflightRequest(this.$sendApplicationCommandRequest, subscription, this.$drainListener));
}
}

View File

@ -229,9 +229,15 @@ public final class MessageQueue {
}
private final void doSendApplicationCommand(MessageRequest.SendApplicationCommand sendApplicationCommand, DrainListener drainListener) {
Observable restSubscribeOn = ObservableExtensionsKt.restSubscribeOn(RestAPI.Companion.getApi().sendApplicationCommand(sendApplicationCommand.getApplicationCommandSendData().toRestApiParam()), false);
MessageQueue$doSendApplicationCommand$1 messageQueue$doSendApplicationCommand$1 = new MessageQueue$doSendApplicationCommand$1(this, sendApplicationCommand, drainListener);
ObservableExtensionsKt.appSubscribe$default(restSubscribeOn, MessageQueue.class, (Context) null, new MessageQueue$doSendApplicationCommand$3(this, sendApplicationCommand, drainListener), new MessageQueue$doSendApplicationCommand$2(this, drainListener), (Function0) null, (Function0) null, messageQueue$doSendApplicationCommand$1, 50, (Object) null);
Observable<SendUtils.SendPayload> t = SendUtils.INSTANCE.getSendCommandPayload(this.contentResolver, sendApplicationCommand.getApplicationCommandSendData(), sendApplicationCommand.getAttachments()).t(new MessageQueue$doSendApplicationCommand$1(sendApplicationCommand));
m.checkNotNullExpressionValue(t, "SendUtils\n .getSe… }\n }\n }");
Observable<R> F = t.x(MessageQueue$doSendApplicationCommand$$inlined$filterIs$1.INSTANCE).F(MessageQueue$doSendApplicationCommand$$inlined$filterIs$2.INSTANCE);
m.checkNotNullExpressionValue(F, "filter { it is T }.map { it as T }");
Observable z2 = F.y().z(MessageQueue$doSendApplicationCommand$2.INSTANCE);
m.checkNotNullExpressionValue(z2, "SendUtils\n .getSe…())\n }\n }");
Observable restSubscribeOn = ObservableExtensionsKt.restSubscribeOn(z2, false);
MessageQueue$doSendApplicationCommand$3 messageQueue$doSendApplicationCommand$3 = new MessageQueue$doSendApplicationCommand$3(this, sendApplicationCommand, drainListener);
ObservableExtensionsKt.appSubscribe$default(restSubscribeOn, MessageQueue.class, (Context) null, new MessageQueue$doSendApplicationCommand$5(this, sendApplicationCommand, drainListener), new MessageQueue$doSendApplicationCommand$4(this, drainListener), (Function0) null, (Function0) null, messageQueue$doSendApplicationCommand$3, 50, (Object) null);
}
private final void handleError(Error error, DrainListener drainListener) {

View File

@ -138,26 +138,50 @@ public abstract class MessageRequest {
/* compiled from: MessageQueue.kt */
public static final class SendApplicationCommand extends MessageRequest {
private final ApplicationCommandLocalSendData applicationCommandSendData;
private final List<Attachment<?>> attachments;
private final com.discord.api.message.Message message;
private final Function1<SendUtils.SendPayload.Preprocessing, Unit> onPreprocessing;
private final Function1<List<SendUtils.FileUpload>, Unit> onProgress;
/* JADX DEBUG: Multi-variable search result rejected for r10v0, resolved type: java.util.List<? extends com.lytefast.flexinput.model.Attachment<?>> */
/* JADX DEBUG: Multi-variable search result rejected for r11v0, resolved type: kotlin.jvm.functions.Function1<? super com.discord.utilities.rest.SendUtils$SendPayload$Preprocessing, kotlin.Unit> */
/* JADX DEBUG: Multi-variable search result rejected for r12v0, resolved type: kotlin.jvm.functions.Function1<? super java.util.List<com.discord.utilities.rest.SendUtils$FileUpload>, kotlin.Unit> */
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARNING: Illegal instructions before constructor call */
public SendApplicationCommand(com.discord.api.message.Message message, ApplicationCommandLocalSendData applicationCommandLocalSendData, Function2<? super MessageResult, ? super Boolean, Unit> function2, long j) {
public SendApplicationCommand(com.discord.api.message.Message message, ApplicationCommandLocalSendData applicationCommandLocalSendData, List<? extends Attachment<?>> list, Function1<? super SendUtils.SendPayload.Preprocessing, Unit> function1, Function1<? super List<SendUtils.FileUpload>, Unit> function12, Function2<? super MessageResult, ? super Boolean, Unit> function2, long j) {
super(r0 == null ? String.valueOf(applicationCommandLocalSendData.getNonce()) : r0, function2, j, null);
m.checkNotNullParameter(message, "message");
m.checkNotNullParameter(applicationCommandLocalSendData, "applicationCommandSendData");
m.checkNotNullParameter(function1, "onPreprocessing");
m.checkNotNullParameter(function12, "onProgress");
m.checkNotNullParameter(function2, "onCompleted");
String v = message.v();
this.message = message;
this.applicationCommandSendData = applicationCommandLocalSendData;
this.attachments = list;
this.onPreprocessing = function1;
this.onProgress = function12;
}
public final ApplicationCommandLocalSendData getApplicationCommandSendData() {
return this.applicationCommandSendData;
}
public final List<Attachment<?>> getAttachments() {
return this.attachments;
}
public final com.discord.api.message.Message getMessage() {
return this.message;
}
public final Function1<SendUtils.SendPayload.Preprocessing, Unit> getOnPreprocessing() {
return this.onPreprocessing;
}
public final Function1<List<SendUtils.FileUpload>, Unit> getOnProgress() {
return this.onProgress;
}
}
/* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kotlin.jvm.functions.Function2<? super com.discord.utilities.messagesend.MessageResult, ? super java.lang.Boolean, kotlin.Unit> */

View File

@ -1768,7 +1768,7 @@ public final class RestAPI implements RestAPIInterface {
Pair<String, ? extends Object>[] pairArr = new Pair[5];
pairArr[0] = d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str);
Guild guild = modelInvite.getGuild();
pairArr[1] = d0.o.to("location_guild_id", guild != null ? Long.valueOf(guild.p()) : null);
pairArr[1] = d0.o.to("location_guild_id", guild != null ? Long.valueOf(guild.q()) : null);
Channel channel = modelInvite.getChannel();
pairArr[2] = d0.o.to("location_channel_id", channel != null ? Long.valueOf(channel.h()) : null);
Channel channel2 = modelInvite.getChannel();
@ -1987,6 +1987,15 @@ public final class RestAPI implements RestAPIInterface {
return this._api.searchServers(j, str);
}
@Override // com.discord.restapi.RestAPIInterface
@o("interactions")
@l
public Observable<Void> sendApplicationCommand(@q("payload_json") PayloadJSON<RestAPIParams.ApplicationCommand> payloadJSON, @q MultipartBody.Part[] partArr) {
m.checkNotNullParameter(payloadJSON, "payloadJson");
m.checkNotNullParameter(partArr, ChatInputComponentTypes.FILES);
return this._api.sendApplicationCommand(payloadJSON, partArr);
}
@Override // com.discord.restapi.RestAPIInterface
@o("interactions")
public Observable<Void> sendApplicationCommand(@i0.f0.a RestAPIParams.ApplicationCommand applicationCommand) {

View File

@ -26,7 +26,7 @@ import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import s.a.j0;
/* compiled from: SendUtils.kt */
@e(c = "com.discord.utilities.rest.SendUtils$compressImageAttachments$1", f = "SendUtils.kt", l = {249}, m = "invokeSuspend")
@e(c = "com.discord.utilities.rest.SendUtils$compressImageAttachments$1", f = "SendUtils.kt", l = {300}, 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

@ -0,0 +1,21 @@
package com.discord.utilities.rest;
import com.discord.models.commands.ApplicationCommandLocalSendData;
import com.discord.utilities.rest.SendUtils;
import d0.z.d.m;
import j0.k.b;
import java.util.List;
/* compiled from: SendUtils.kt */
public final class SendUtils$getSendCommandPayload$2<T, R> implements b<List<SendUtils.FileUpload>, SendUtils.SendPayload.ReadyToSendCommand> {
public final /* synthetic */ ApplicationCommandLocalSendData $attachmentCorrectedMessage;
public SendUtils$getSendCommandPayload$2(ApplicationCommandLocalSendData applicationCommandLocalSendData) {
this.$attachmentCorrectedMessage = applicationCommandLocalSendData;
}
public final SendUtils.SendPayload.ReadyToSendCommand call(List<SendUtils.FileUpload> list) {
ApplicationCommandLocalSendData applicationCommandLocalSendData = this.$attachmentCorrectedMessage;
m.checkNotNullExpressionValue(list, "attachmentParts");
return new SendUtils.SendPayload.ReadyToSendCommand(applicationCommandLocalSendData, list);
}
}

View File

@ -16,7 +16,7 @@ import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
/* compiled from: SendUtils.kt */
@e(c = "com.discord.utilities.rest.SendUtils$uniqueifyNames$1", f = "SendUtils.kt", l = {147, 149}, m = "invokeSuspend")
@e(c = "com.discord.utilities.rest.SendUtils$uniqueifyNames$1", f = "SendUtils.kt", l = {198, 200}, m = "invokeSuspend")
public final class SendUtils$uniqueifyNames$1 extends j implements Function2<k<? super Attachment<? extends Object>>, Continuation<? super Unit>, Object> {
public final /* synthetic */ List $attachmentParts;
private /* synthetic */ Object L$0;

View File

@ -9,10 +9,13 @@ import androidx.annotation.VisibleForTesting;
import c.d.b.a.a;
import c.i.a.f.e.o.f;
import com.discord.R;
import com.discord.api.commands.ApplicationCommandType;
import com.discord.models.commands.ApplicationCommandLocalSendData;
import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.restapi.RestAPIParams;
import com.discord.utilities.attachments.AttachmentUtilsKt;
import com.discord.utilities.error.Error;
import com.discord.widgets.chat.input.models.ApplicationCommandValue;
import com.lytefast.flexinput.model.Attachment;
import d0.f0.l;
import d0.g0.w;
@ -22,7 +25,9 @@ import d0.z.d.m;
import j0.l.a.q;
import j0.l.e.j;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Objects;
import kotlin.Pair;
import kotlin.Unit;
@ -353,6 +358,84 @@ public final class SendUtils {
}
}
/* compiled from: SendUtils.kt */
public static final class ReadyToSendCommand extends SendPayload {
private final ApplicationCommandLocalSendData command;
private final List<FileUpload> uploads;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ReadyToSendCommand(ApplicationCommandLocalSendData applicationCommandLocalSendData, List<FileUpload> list) {
super(null);
m.checkNotNullParameter(applicationCommandLocalSendData, "command");
m.checkNotNullParameter(list, "uploads");
this.command = applicationCommandLocalSendData;
this.uploads = list;
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.utilities.rest.SendUtils$SendPayload$ReadyToSendCommand */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ ReadyToSendCommand copy$default(ReadyToSendCommand readyToSendCommand, ApplicationCommandLocalSendData applicationCommandLocalSendData, List list, int i, Object obj) {
if ((i & 1) != 0) {
applicationCommandLocalSendData = readyToSendCommand.command;
}
if ((i & 2) != 0) {
list = readyToSendCommand.uploads;
}
return readyToSendCommand.copy(applicationCommandLocalSendData, list);
}
public final ApplicationCommandLocalSendData component1() {
return this.command;
}
public final List<FileUpload> component2() {
return this.uploads;
}
public final ReadyToSendCommand copy(ApplicationCommandLocalSendData applicationCommandLocalSendData, List<FileUpload> list) {
m.checkNotNullParameter(applicationCommandLocalSendData, "command");
m.checkNotNullParameter(list, "uploads");
return new ReadyToSendCommand(applicationCommandLocalSendData, list);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ReadyToSendCommand)) {
return false;
}
ReadyToSendCommand readyToSendCommand = (ReadyToSendCommand) obj;
return m.areEqual(this.command, readyToSendCommand.command) && m.areEqual(this.uploads, readyToSendCommand.uploads);
}
public final ApplicationCommandLocalSendData getCommand() {
return this.command;
}
public final List<FileUpload> getUploads() {
return this.uploads;
}
public int hashCode() {
ApplicationCommandLocalSendData applicationCommandLocalSendData = this.command;
int i = 0;
int hashCode = (applicationCommandLocalSendData != null ? applicationCommandLocalSendData.hashCode() : 0) * 31;
List<FileUpload> list = this.uploads;
if (list != null) {
i = list.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder R = a.R("ReadyToSendCommand(command=");
R.append(this.command);
R.append(", uploads=");
return a.J(R, this.uploads, ")");
}
}
private SendPayload() {
}
@ -368,6 +451,14 @@ public final class SendUtils {
return Observable.n(new SendUtils$getPart$1(attachment, str, contentResolver), Emitter.BackpressureMode.BUFFER);
}
private final SendPayload.Preprocessing getPreprocessingFromAttachments(ContentResolver contentResolver, List<? extends Attachment<?>> list) {
if (list.size() != 1) {
return new SendPayload.Preprocessing(list.size(), null, null);
}
Attachment<?> attachment = (Attachment) u.first((List<? extends Object>) list);
return new SendPayload.Preprocessing(1, Attachment.Companion.a(attachment), AttachmentUtilsKt.getMimeType(contentResolver, attachment.getUri(), attachment.getDisplayName()));
}
/* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: com.discord.utilities.rest.SendUtils */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ void handleSendError$default(SendUtils sendUtils, Error error, Context context, Function0 function0, Function0 function02, int i, Object obj) {
@ -402,8 +493,53 @@ public final class SendUtils {
f.x0(w0Var, n.b, null, new SendUtils$compressImageAttachments$1(list, context, function1, null), 2, null);
}
public final Observable<SendPayload> getSendCommandPayload(ContentResolver contentResolver, ApplicationCommandLocalSendData applicationCommandLocalSendData, List<? extends Attachment<?>> list) {
m.checkNotNullParameter(contentResolver, "contentResolver");
m.checkNotNullParameter(applicationCommandLocalSendData, "apiParamMessage");
if (list != null) {
List<Attachment<?>> uniqueifyNames = uniqueifyNames(list);
List<ApplicationCommandValue> applicationCommandsValues = applicationCommandLocalSendData.getApplicationCommandsValues();
ArrayList arrayList = new ArrayList(d0.t.o.collectionSizeOrDefault(applicationCommandsValues, 10));
for (ApplicationCommandValue applicationCommandValue : applicationCommandsValues) {
if (applicationCommandValue.getType() == ApplicationCommandType.ATTACHMENT.getType()) {
Iterator<T> it = uniqueifyNames.iterator();
while (it.hasNext()) {
Attachment attachment = (Attachment) it.next();
if (m.areEqual(attachment.getUri().toString(), applicationCommandValue.getValue())) {
applicationCommandValue = ApplicationCommandValue.copy$default(applicationCommandValue, null, attachment.getDisplayName(), 0, null, null, 29, null);
}
}
throw new NoSuchElementException("Collection contains no element matching the predicate.");
}
arrayList.add(applicationCommandValue);
}
ApplicationCommandLocalSendData copy$default = ApplicationCommandLocalSendData.copy$default(applicationCommandLocalSendData, 0, 0, null, null, null, null, null, arrayList, null, null, 895, null);
if (!uniqueifyNames.isEmpty()) {
j jVar = new j(getPreprocessingFromAttachments(contentResolver, uniqueifyNames));
ArrayList arrayList2 = new ArrayList(d0.t.o.collectionSizeOrDefault(uniqueifyNames, 10));
int i = 0;
for (Object obj : uniqueifyNames) {
int i2 = i + 1;
if (i < 0) {
d0.t.n.throwIndexOverflow();
}
arrayList2.add(INSTANCE.getPart((Attachment) obj, contentResolver, a.p("file", i)));
i = i2;
}
Observable<SendPayload> m = Observable.m(jVar, Observable.l(Observable.h0(new q(arrayList2))).f0().F(new SendUtils$getSendCommandPayload$2(copy$default)));
m.checkNotNullExpressionValue(m, "Observable.concat(\n …)\n }\n )");
return m;
}
j jVar2 = new j(new SendPayload.ReadyToSendCommand(copy$default, d0.t.n.emptyList()));
m.checkNotNullExpressionValue(jVar2, "Observable.just(SendPayl…tedMessage, emptyList()))");
return jVar2;
}
j jVar3 = new j(new SendPayload.ReadyToSendCommand(applicationCommandLocalSendData, d0.t.n.emptyList()));
m.checkNotNullExpressionValue(jVar3, "Observable.just(SendPayl…ramMessage, emptyList()))");
return jVar3;
}
public final Observable<SendPayload> getSendPayload(ContentResolver contentResolver, RestAPIParams.Message message, List<? extends Attachment<?>> list) {
SendPayload.Preprocessing preprocessing;
RestAPIParams.Message message2 = message;
m.checkNotNullParameter(contentResolver, "contentResolver");
m.checkNotNullParameter(message2, "apiParamMessage");
@ -423,14 +559,7 @@ public final class SendUtils {
}
List<Attachment<?>> uniqueifyNames = uniqueifyNames(u.minus((Iterable) list, (Iterable) extractLinks));
if (!uniqueifyNames.isEmpty()) {
if (uniqueifyNames.size() != 1) {
preprocessing = new SendPayload.Preprocessing(uniqueifyNames.size(), null, null);
} else {
Attachment<?> attachment = (Attachment) u.first((List<? extends Object>) uniqueifyNames);
String a = Attachment.Companion.a(attachment);
preprocessing = new SendPayload.Preprocessing(1, a, AttachmentUtilsKt.getMimeType(contentResolver, attachment.getUri(), a));
}
j jVar2 = new j(preprocessing);
j jVar2 = new j(getPreprocessingFromAttachments(contentResolver, uniqueifyNames));
ArrayList arrayList = new ArrayList(d0.t.o.collectionSizeOrDefault(uniqueifyNames, 10));
int i = 0;
for (Object obj : uniqueifyNames) {

View File

@ -162,7 +162,7 @@ public final class AuthInviteInfoView extends RelativeLayout {
textView.setText(b.l(getIntroText(modelInvite), new Object[0], null, 2));
TextView textView2 = this.binding.f1706c;
m.checkNotNullExpressionValue(textView2, "binding.authInviteInfoGuildName");
textView2.setText(guild.v());
textView2.setText(guild.w());
return;
}
return;

View File

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

View File

@ -0,0 +1,27 @@
package com.discord.widgets.chat;
import com.discord.utilities.error.Error;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: MessageManager.kt */
public final class MessageManager$sendCommand$2 extends o implements Function1<Error, Unit> {
public static final MessageManager$sendCommand$2 INSTANCE = new MessageManager$sendCommand$2();
public MessageManager$sendCommand$2() {
super(1);
}
/* 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(Error error) {
invoke(error);
return Unit.a;
}
public final void invoke(Error error) {
m.checkNotNullParameter(error, "it");
}
}

View File

@ -14,6 +14,7 @@ import com.discord.api.user.User;
import com.discord.models.guild.Guild;
import com.discord.models.message.Message;
import com.discord.models.user.MeUser;
import com.discord.stores.StoreApplicationInteractions;
import com.discord.stores.StoreChannelsSelected;
import com.discord.stores.StoreGuilds;
import com.discord.stores.StoreMessageReplies;
@ -22,10 +23,12 @@ import com.discord.stores.StorePendingReplies;
import com.discord.stores.StoreSlowMode;
import com.discord.stores.StoreStream;
import com.discord.stores.StoreUser;
import com.discord.utilities.error.Error;
import com.discord.utilities.messagesend.MessageResult;
import com.discord.utilities.rest.SendUtils;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.user.UserUtils;
import com.discord.widgets.chat.input.models.ApplicationCommandData;
import com.lytefast.flexinput.model.Attachment;
import d0.t.k;
import d0.t.n;
@ -45,6 +48,7 @@ import rx.Observable;
public final class MessageManager {
private final Context context;
private final Function1<MessageSendResult, Unit> defaultMessageResultHandler;
private final StoreApplicationInteractions storeApplicationInteractions;
private final StoreChannelsSelected storeChannelsSelected;
private final StoreGuilds storeGuilds;
private final StoreMessageReplies storeMessageReplies;
@ -315,9 +319,10 @@ public final class MessageManager {
}
}
public MessageManager(Context context, StoreMessages storeMessages, StoreUser storeUser, StoreChannelsSelected storeChannelsSelected, StoreSlowMode storeSlowMode, StoreGuilds storeGuilds, StorePendingReplies storePendingReplies, StoreMessageReplies storeMessageReplies) {
public MessageManager(Context context, StoreMessages storeMessages, StoreApplicationInteractions storeApplicationInteractions, StoreUser storeUser, StoreChannelsSelected storeChannelsSelected, StoreSlowMode storeSlowMode, StoreGuilds storeGuilds, StorePendingReplies storePendingReplies, StoreMessageReplies storeMessageReplies) {
m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(storeMessages, "storeMessages");
m.checkNotNullParameter(storeApplicationInteractions, "storeApplicationInteractions");
m.checkNotNullParameter(storeUser, "storeUser");
m.checkNotNullParameter(storeChannelsSelected, "storeChannelsSelected");
m.checkNotNullParameter(storeSlowMode, "storeSlowMode");
@ -326,6 +331,7 @@ public final class MessageManager {
m.checkNotNullParameter(storeMessageReplies, "storeMessageReplies");
this.context = context;
this.storeMessages = storeMessages;
this.storeApplicationInteractions = storeApplicationInteractions;
this.storeUser = storeUser;
this.storeChannelsSelected = storeChannelsSelected;
this.storeSlowMode = storeSlowMode;
@ -336,8 +342,8 @@ public final class MessageManager {
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ MessageManager(Context context, StoreMessages storeMessages, StoreUser storeUser, StoreChannelsSelected storeChannelsSelected, StoreSlowMode storeSlowMode, StoreGuilds storeGuilds, StorePendingReplies storePendingReplies, StoreMessageReplies storeMessageReplies, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(context, (i & 2) != 0 ? StoreStream.Companion.getMessages() : storeMessages, (i & 4) != 0 ? StoreStream.Companion.getUsers() : storeUser, (i & 8) != 0 ? StoreStream.Companion.getChannelsSelected() : storeChannelsSelected, (i & 16) != 0 ? StoreStream.Companion.getSlowMode() : storeSlowMode, (i & 32) != 0 ? StoreStream.Companion.getGuilds() : storeGuilds, (i & 64) != 0 ? StoreStream.Companion.getPendingReplies() : storePendingReplies, (i & 128) != 0 ? StoreStream.Companion.getRepliedMessages() : storeMessageReplies);
public /* synthetic */ MessageManager(Context context, StoreMessages storeMessages, StoreApplicationInteractions storeApplicationInteractions, StoreUser storeUser, StoreChannelsSelected storeChannelsSelected, StoreSlowMode storeSlowMode, StoreGuilds storeGuilds, StorePendingReplies storePendingReplies, StoreMessageReplies storeMessageReplies, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(context, (i & 2) != 0 ? StoreStream.Companion.getMessages() : storeMessages, (i & 4) != 0 ? StoreStream.Companion.getInteractions() : storeApplicationInteractions, (i & 8) != 0 ? StoreStream.Companion.getUsers() : storeUser, (i & 16) != 0 ? StoreStream.Companion.getChannelsSelected() : storeChannelsSelected, (i & 32) != 0 ? StoreStream.Companion.getSlowMode() : storeSlowMode, (i & 64) != 0 ? StoreStream.Companion.getGuilds() : storeGuilds, (i & 128) != 0 ? StoreStream.Companion.getPendingReplies() : storePendingReplies, (i & 256) != 0 ? StoreStream.Companion.getRepliedMessages() : storeMessageReplies);
}
public static final /* synthetic */ Context access$getContext$p(MessageManager messageManager) {
@ -400,6 +406,10 @@ public final class MessageManager {
return null;
}
public static /* synthetic */ boolean sendCommand$default(MessageManager messageManager, long j, Long l, String str, ApplicationCommandData applicationCommandData, AttachmentsRequest attachmentsRequest, Function0 function0, Function1 function1, Function2 function2, int i, Object obj) {
return messageManager.sendCommand(j, l, str, applicationCommandData, (i & 16) != 0 ? null : attachmentsRequest, function0, function1, (i & 128) != 0 ? null : function2);
}
public static /* synthetic */ boolean sendMessage$default(MessageManager messageManager, String str, List list, AttachmentsRequest attachmentsRequest, Long l, List list2, boolean z2, Function2 function2, Function2 function22, Function1 function1, int i, Object obj) {
String str2 = (i & 1) != 0 ? "" : str;
Function2 function23 = null;
@ -465,6 +475,24 @@ public final class MessageManager {
}
}
public final boolean sendCommand(long j, Long l, String str, ApplicationCommandData applicationCommandData, AttachmentsRequest attachmentsRequest, Function0<Unit> function0, Function1<? super Error, Unit> function1, Function2<? super Integer, ? super Boolean, Unit> function2) {
m.checkNotNullParameter(applicationCommandData, "data");
m.checkNotNullParameter(function0, "onSuccess");
m.checkNotNullParameter(function1, "onFail");
MeUser me2 = this.storeUser.getMe();
AttachmentValidationResult validateAttachments = validateAttachments(attachmentsRequest);
if (validateAttachments instanceof AttachmentValidationResult.FilesTooLarge) {
AttachmentsRequest attachmentsRequest2 = ((AttachmentValidationResult.FilesTooLarge) validateAttachments).getAttachmentsRequest();
if (function2 == null) {
return false;
}
function2.invoke(Integer.valueOf(attachmentsRequest2.getMaxFileSizeMB()), Boolean.valueOf(UserUtils.INSTANCE.isPremium(me2)));
return false;
}
this.storeApplicationInteractions.sendApplicationCommand(j, l, str, applicationCommandData, attachmentsRequest != null ? attachmentsRequest.getAttachments() : null, MessageManager$sendCommand$1.INSTANCE, MessageManager$sendCommand$2.INSTANCE);
return true;
}
public final boolean sendMessage(String str, List<? extends com.discord.models.user.User> list, AttachmentsRequest attachmentsRequest, Long l, List<? extends BaseSticker> list2, boolean z2, Function2<? super Integer, ? super Integer, Unit> function2, Function2<? super Integer, ? super Boolean, Unit> function22, Function1<? super MessageSendResult, Unit> function1) {
ShortcutManager shortcutManager;
m.checkNotNullParameter(str, "content");

View File

@ -0,0 +1,23 @@
package com.discord.widgets.chat.input;
import com.discord.api.channel.Channel;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.rx.ObservableExtensionsKt$filterNull$1;
import com.discord.utilities.rx.ObservableExtensionsKt$filterNull$2;
import d0.z.d.m;
import j0.k.b;
import rx.Observable;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$createAndGotoThread$1<T, R> implements b<Channel, Observable<? extends Channel>> {
public final /* synthetic */ ChatInputViewModel this$0;
public ChatInputViewModel$createAndGotoThread$1(ChatInputViewModel chatInputViewModel) {
this.this$0 = chatInputViewModel;
}
public final Observable<? extends Channel> call(Channel channel) {
Observable<R> F = ChatInputViewModel.access$getStoreChannels$p(this.this$0).observeChannel(channel.h()).x(ObservableExtensionsKt$filterNull$1.INSTANCE).F(ObservableExtensionsKt$filterNull$2.INSTANCE);
m.checkNotNullExpressionValue(F, "filter { it != null }.map { it!! }");
return ObservableExtensionsKt.computationLatest(ObservableExtensionsKt.takeSingleUntilTimeout$default(F, 0, false, 3, null));
}
}

View File

@ -0,0 +1,40 @@
package com.discord.widgets.chat.input;
import com.discord.api.channel.Channel;
import com.discord.stores.StoreStream;
import com.discord.utilities.channel.ChannelSelector;
import com.discord.widgets.chat.input.ChatInputViewModel;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$createAndGotoThread$2 extends o implements Function1<Channel, Unit> {
public final /* synthetic */ ChatInputViewModel.ViewState.Loaded $loadedViewState;
public final /* synthetic */ Function1 $onThreadCreated;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ChatInputViewModel$createAndGotoThread$2(ChatInputViewModel.ViewState.Loaded loaded, Function1 function1) {
super(1);
this.$loadedViewState = loaded;
this.$onThreadCreated = function1;
}
/* 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(Channel channel) {
invoke(channel);
return Unit.a;
}
public final void invoke(Channel channel) {
if (channel != null) {
StoreStream.Companion.getSlowMode().onThreadCreated(this.$loadedViewState.getChannelId());
Function1 function1 = this.$onThreadCreated;
if (function1 != null) {
function1.invoke(channel);
}
ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), channel, null, null, 6, null);
}
}
}

View File

@ -0,0 +1,53 @@
package com.discord.widgets.chat.input;
import android.content.Context;
import com.discord.R;
import com.discord.stores.StoreSlowMode;
import com.discord.stores.StoreStream;
import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPIAbortMessages;
import com.discord.widgets.chat.input.ChatInputViewModel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$createAndGotoThread$3 extends o implements Function1<Error, Unit> {
public final /* synthetic */ Context $context;
public final /* synthetic */ ChatInputViewModel.ViewState.Loaded $loadedViewState;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ChatInputViewModel$createAndGotoThread$3(ChatInputViewModel.ViewState.Loaded loaded, Context context) {
super(1);
this.$loadedViewState = loaded;
this.$context = context;
}
/* 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(Error error) {
invoke(error);
return Unit.a;
}
public final void invoke(Error error) {
m.checkNotNullParameter(error, "error");
Error.Response response = error.getResponse();
m.checkNotNullExpressionValue(response, "error.response");
Integer abortCodeMessageResId = RestAPIAbortMessages.getAbortCodeMessageResId(response.getCode());
Error.Response response2 = error.getResponse();
m.checkNotNullExpressionValue(response2, "error.response");
if (response2.getCode() == 20016) {
Error.Response response3 = error.getResponse();
m.checkNotNullExpressionValue(response3, "error.response");
Long retryAfterMs = response3.getRetryAfterMs();
if (retryAfterMs == null) {
retryAfterMs = 0L;
}
m.checkNotNullExpressionValue(retryAfterMs, "error.response.retryAfterMs ?: 0");
StoreStream.Companion.getSlowMode().onCooldown(this.$loadedViewState.getChannelId(), retryAfterMs.longValue(), StoreSlowMode.Type.ThreadCreate.INSTANCE);
}
c.a.d.m.g(this.$context, abortCodeMessageResId != null ? abortCodeMessageResId.intValue() : R.string.network_error_bad_request, 0, null, 12);
}
}

View File

@ -2,17 +2,23 @@ package com.discord.widgets.chat.input;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$sendCommand$1 extends o implements Function0<Unit> {
public final class ChatInputViewModel$sendCommand$1 extends o implements Function1<Boolean, Unit> {
public static final ChatInputViewModel$sendCommand$1 INSTANCE = new ChatInputViewModel$sendCommand$1();
public ChatInputViewModel$sendCommand$1() {
super(0);
super(1);
}
@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(Boolean bool) {
invoke(bool.booleanValue());
return Unit.a;
}
public final void invoke(boolean z2) {
}
}

View File

@ -0,0 +1,66 @@
package com.discord.widgets.chat.input;
import android.content.Context;
import com.discord.utilities.rest.SendUtils;
import com.discord.widgets.chat.MessageManager;
import com.discord.widgets.chat.input.ChatInputViewModel;
import com.discord.widgets.chat.input.models.ApplicationCommandData;
import com.lytefast.flexinput.model.Attachment;
import d0.z.d.m;
import d0.z.d.o;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$sendCommand$commandResendCompressedHandler$1 extends o implements Function0<Unit> {
public final /* synthetic */ ApplicationCommandData $applicationCommandData;
public final /* synthetic */ ChatInputViewModel.AttachmentContext $attachmentsContext;
public final /* synthetic */ boolean $autocomplete;
public final /* synthetic */ Context $context;
public final /* synthetic */ MessageManager $messageManager;
public final /* synthetic */ ChatInputViewModel this$0;
/* compiled from: ChatInputViewModel.kt */
/* renamed from: com.discord.widgets.chat.input.ChatInputViewModel$sendCommand$commandResendCompressedHandler$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<List<? extends Attachment<?>>, Unit> {
public final /* synthetic */ ChatInputViewModel$sendCommand$commandResendCompressedHandler$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(ChatInputViewModel$sendCommand$commandResendCompressedHandler$1 chatInputViewModel$sendCommand$commandResendCompressedHandler$1) {
super(1);
this.this$0 = chatInputViewModel$sendCommand$commandResendCompressedHandler$1;
}
/* 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(List<? extends Attachment<?>> list) {
invoke(list);
return Unit.a;
}
public final void invoke(List<? extends Attachment<?>> list) {
m.checkNotNullParameter(list, "compressedAttachments");
ChatInputViewModel$sendCommand$commandResendCompressedHandler$1 chatInputViewModel$sendCommand$commandResendCompressedHandler$1 = this.this$0;
ChatInputViewModel.sendCommand$default(chatInputViewModel$sendCommand$commandResendCompressedHandler$1.this$0, chatInputViewModel$sendCommand$commandResendCompressedHandler$1.$context, chatInputViewModel$sendCommand$commandResendCompressedHandler$1.$messageManager, chatInputViewModel$sendCommand$commandResendCompressedHandler$1.$applicationCommandData, list, chatInputViewModel$sendCommand$commandResendCompressedHandler$1.$autocomplete, true, null, 64, null);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ChatInputViewModel$sendCommand$commandResendCompressedHandler$1(ChatInputViewModel chatInputViewModel, Context context, ChatInputViewModel.AttachmentContext attachmentContext, MessageManager messageManager, ApplicationCommandData applicationCommandData, boolean z2) {
super(0);
this.this$0 = chatInputViewModel;
this.$context = context;
this.$attachmentsContext = attachmentContext;
this.$messageManager = messageManager;
this.$applicationCommandData = applicationCommandData;
this.$autocomplete = z2;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
SendUtils.INSTANCE.compressImageAttachments(this.$context, this.$attachmentsContext.getAttachments(), new AnonymousClass1(this));
}
}

View File

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

View File

@ -6,10 +6,10 @@ import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$sendCommand$2 extends o implements Function1<Error, Unit> {
public static final ChatInputViewModel$sendCommand$2 INSTANCE = new ChatInputViewModel$sendCommand$2();
public final class ChatInputViewModel$sendCommand$validated$2 extends o implements Function1<Error, Unit> {
public static final ChatInputViewModel$sendCommand$validated$2 INSTANCE = new ChatInputViewModel$sendCommand$validated$2();
public ChatInputViewModel$sendCommand$2() {
public ChatInputViewModel$sendCommand$validated$2() {
super(1);
}

View File

@ -0,0 +1,35 @@
package com.discord.widgets.chat.input;
import com.discord.widgets.chat.input.ChatInputViewModel;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import rx.subjects.PublishSubject;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$sendCommand$validated$3 extends o implements Function2<Integer, Boolean, Unit> {
public final /* synthetic */ ChatInputViewModel.AttachmentContext $attachmentsContext;
public final /* synthetic */ Function0 $commandResendCompressedHandler;
public final /* synthetic */ ChatInputViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ChatInputViewModel$sendCommand$validated$3(ChatInputViewModel chatInputViewModel, ChatInputViewModel.AttachmentContext attachmentContext, Function0 function0) {
super(2);
this.this$0 = chatInputViewModel;
this.$attachmentsContext = attachmentContext;
this.$commandResendCompressedHandler = 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, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(Integer num, Boolean bool) {
invoke(num.intValue(), bool.booleanValue());
return Unit.a;
}
public final void invoke(int i, boolean z2) {
PublishSubject access$getEventSubject$p = ChatInputViewModel.access$getEventSubject$p(this.this$0);
access$getEventSubject$p.j.onNext(new ChatInputViewModel.Event.FilesTooLarge(i, this.$attachmentsContext.getCurrentFileSizeMB(), this.$attachmentsContext.getMaxAttachmentSizeMB(), z2, this.$attachmentsContext.getAttachments(), this.$attachmentsContext.getHasImage(), this.$attachmentsContext.getHasVideo(), this.$attachmentsContext.getHasGif(), this.$commandResendCompressedHandler));
}
}

View File

@ -1,161 +1,30 @@
package com.discord.widgets.chat.input;
import android.content.Context;
import com.discord.R;
import com.discord.api.channel.Channel;
import com.discord.api.channel.ChannelUtils;
import com.discord.stores.StoreSlowMode;
import com.discord.stores.StoreStream;
import com.discord.utilities.channel.ChannelSelector;
import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPIAbortMessages;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.rx.ObservableExtensionsKt$filterNull$1;
import com.discord.utilities.rx.ObservableExtensionsKt$filterNull$2;
import com.discord.utilities.threads.ThreadUtils;
import com.discord.widgets.chat.input.ChatInputViewModel;
import d0.z.d.m;
import d0.z.d.o;
import j0.k.b;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function3;
import rx.Observable;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$sendMessage$1 extends o implements Function3<Long, String, Function1<? super Channel, ? extends Unit>, Unit> {
public final /* synthetic */ Context $context;
public final /* synthetic */ ChatInputViewModel.ViewState.Loaded $loadedViewState;
public final /* synthetic */ ChatInputViewModel this$0;
/* compiled from: ChatInputViewModel.kt */
/* renamed from: com.discord.widgets.chat.input.ChatInputViewModel$sendMessage$1$1 reason: invalid class name */
public static final class AnonymousClass1<T, R> implements b<Channel, Observable<? extends Channel>> {
public final /* synthetic */ ChatInputViewModel$sendMessage$1 this$0;
public AnonymousClass1(ChatInputViewModel$sendMessage$1 chatInputViewModel$sendMessage$1) {
this.this$0 = chatInputViewModel$sendMessage$1;
}
public final Observable<? extends Channel> call(Channel channel) {
Observable<R> F = ChatInputViewModel.access$getStoreChannels$p(this.this$0.this$0).observeChannel(channel.h()).x(ObservableExtensionsKt$filterNull$1.INSTANCE).F(ObservableExtensionsKt$filterNull$2.INSTANCE);
m.checkNotNullExpressionValue(F, "filter { it != null }.map { it!! }");
return ObservableExtensionsKt.computationLatest(ObservableExtensionsKt.takeSingleUntilTimeout$default(F, 0, false, 3, null));
}
}
/* compiled from: ChatInputViewModel.kt */
/* renamed from: com.discord.widgets.chat.input.ChatInputViewModel$sendMessage$1$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function1<Channel, Unit> {
public final /* synthetic */ Function1 $onThreadCreated;
public final /* synthetic */ ChatInputViewModel$sendMessage$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(ChatInputViewModel$sendMessage$1 chatInputViewModel$sendMessage$1, Function1 function1) {
super(1);
this.this$0 = chatInputViewModel$sendMessage$1;
this.$onThreadCreated = function1;
}
/* 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(Channel channel) {
invoke(channel);
return Unit.a;
}
public final void invoke(Channel channel) {
if (channel != null) {
StoreStream.Companion.getSlowMode().onThreadCreated(this.this$0.$loadedViewState.getChannelId());
Function1 function1 = this.$onThreadCreated;
if (function1 != null) {
function1.invoke(channel);
}
ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), channel, null, null, 6, null);
}
}
}
/* compiled from: ChatInputViewModel.kt */
/* renamed from: com.discord.widgets.chat.input.ChatInputViewModel$sendMessage$1$3 reason: invalid class name */
public static final class AnonymousClass3 extends o implements Function1<Error, Unit> {
public final /* synthetic */ ChatInputViewModel$sendMessage$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass3(ChatInputViewModel$sendMessage$1 chatInputViewModel$sendMessage$1) {
super(1);
this.this$0 = chatInputViewModel$sendMessage$1;
}
/* 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(Error error) {
invoke(error);
return Unit.a;
}
public final void invoke(Error error) {
m.checkNotNullParameter(error, "error");
Error.Response response = error.getResponse();
m.checkNotNullExpressionValue(response, "error.response");
Integer abortCodeMessageResId = RestAPIAbortMessages.getAbortCodeMessageResId(response.getCode());
Error.Response response2 = error.getResponse();
m.checkNotNullExpressionValue(response2, "error.response");
if (response2.getCode() == 20016) {
Error.Response response3 = error.getResponse();
m.checkNotNullExpressionValue(response3, "error.response");
Long retryAfterMs = response3.getRetryAfterMs();
if (retryAfterMs == null) {
retryAfterMs = 0L;
}
m.checkNotNullExpressionValue(retryAfterMs, "error.response.retryAfterMs ?: 0");
StoreStream.Companion.getSlowMode().onCooldown(this.this$0.$loadedViewState.getChannelId(), retryAfterMs.longValue(), StoreSlowMode.Type.ThreadCreate.INSTANCE);
}
c.a.d.m.g(this.this$0.$context, abortCodeMessageResId != null ? abortCodeMessageResId.intValue() : R.string.network_error_bad_request, 0, null, 12);
}
}
public final class ChatInputViewModel$sendMessage$1 extends o implements Function1<Channel, Unit> {
public final /* synthetic */ Function1 $sendMessage;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ChatInputViewModel$sendMessage$1(ChatInputViewModel chatInputViewModel, ChatInputViewModel.ViewState.Loaded loaded, Context context) {
super(3);
this.this$0 = chatInputViewModel;
this.$loadedViewState = loaded;
this.$context = context;
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.chat.input.ChatInputViewModel$sendMessage$1 */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ void invoke$default(ChatInputViewModel$sendMessage$1 chatInputViewModel$sendMessage$1, Long l, String str, Function1 function1, int i, Object obj) {
if ((i & 4) != 0) {
function1 = null;
}
chatInputViewModel$sendMessage$1.invoke(l, str, (Function1<? super Channel, Unit>) function1);
public ChatInputViewModel$sendMessage$1(Function1 function1) {
super(1);
this.$sendMessage = function1;
}
/* 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] */
@Override // kotlin.jvm.functions.Function3
public /* bridge */ /* synthetic */ Unit invoke(Long l, String str, Function1<? super Channel, ? extends Unit> function1) {
invoke(l, str, (Function1<? super Channel, Unit>) function1);
/* 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(Channel channel) {
invoke(channel);
return Unit.a;
}
public final void invoke(Long l, String str, Function1<? super Channel, Unit> function1) {
ThreadUtils threadUtils = ThreadUtils.INSTANCE;
long channelId = this.$loadedViewState.getChannelId();
int i = ChannelUtils.i(this.$loadedViewState.getChannel()) ? 10 : this.$loadedViewState.getThreadDraftState().isPrivate() ? 12 : 11;
String threadName = this.$loadedViewState.getThreadDraftState().getThreadName();
if (threadName == null) {
threadName = "";
}
Integer autoArchiveDuration = this.$loadedViewState.getThreadDraftState().getAutoArchiveDuration();
if (autoArchiveDuration == null) {
autoArchiveDuration = this.$loadedViewState.getChannel().d();
}
Observable z2 = ObservableExtensionsKt.restSubscribeOn$default(threadUtils.createThread(channelId, l, i, threadName, Integer.valueOf(autoArchiveDuration != null ? autoArchiveDuration.intValue() : 1440), str), false, 1, null).z(new AnonymousClass1(this));
m.checkNotNullExpressionValue(z2, "ThreadUtils.createThread…ationLatest()\n }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(z2, this.this$0, null, 2, null), this.this$0.getClass(), (Context) null, (Function1) null, new AnonymousClass3(this), (Function0) null, (Function0) null, new AnonymousClass2(this, function1), 54, (Object) null);
public final void invoke(Channel channel) {
m.checkNotNullParameter(channel, "thread");
this.$sendMessage.invoke(Long.valueOf(channel.h()));
}
}

View File

@ -1,30 +0,0 @@
package com.discord.widgets.chat.input;
import com.discord.api.channel.Channel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$sendMessage$2 extends o implements Function1<Channel, Unit> {
public final /* synthetic */ Function1 $sendMessage;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ChatInputViewModel$sendMessage$2(Function1 function1) {
super(1);
this.$sendMessage = function1;
}
/* 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(Channel channel) {
invoke(channel);
return Unit.a;
}
public final void invoke(Channel channel) {
m.checkNotNullParameter(channel, "thread");
this.$sendMessage.invoke(Long.valueOf(channel.h()));
}
}

View File

@ -4,17 +4,17 @@ import android.content.Context;
import com.discord.utilities.rest.SendUtils;
import com.discord.widgets.chat.MessageContent;
import com.discord.widgets.chat.MessageManager;
import com.discord.widgets.chat.input.ChatInputViewModel;
import com.lytefast.flexinput.model.Attachment;
import d0.z.d.m;
import d0.z.d.o;
import java.util.ArrayList;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$sendMessage$messageResendCompressedHandler$1 extends o implements Function0<Unit> {
public final /* synthetic */ ArrayList $attachments;
public final /* synthetic */ ChatInputViewModel.AttachmentContext $attachmentsContext;
public final /* synthetic */ Context $context;
public final /* synthetic */ MessageContent $messageContent;
public final /* synthetic */ MessageManager $messageManager;
@ -48,11 +48,11 @@ public final class ChatInputViewModel$sendMessage$messageResendCompressedHandler
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ChatInputViewModel$sendMessage$messageResendCompressedHandler$1(ChatInputViewModel chatInputViewModel, Context context, ArrayList arrayList, MessageManager messageManager, MessageContent messageContent, Function1 function1) {
public ChatInputViewModel$sendMessage$messageResendCompressedHandler$1(ChatInputViewModel chatInputViewModel, Context context, ChatInputViewModel.AttachmentContext attachmentContext, MessageManager messageManager, MessageContent messageContent, Function1 function1) {
super(0);
this.this$0 = chatInputViewModel;
this.$context = context;
this.$attachments = arrayList;
this.$attachmentsContext = attachmentContext;
this.$messageManager = messageManager;
this.$messageContent = messageContent;
this.$onValidationResult = function1;
@ -61,6 +61,6 @@ public final class ChatInputViewModel$sendMessage$messageResendCompressedHandler
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
SendUtils.INSTANCE.compressImageAttachments(this.$context, this.$attachments, new AnonymousClass1(this));
SendUtils.INSTANCE.compressImageAttachments(this.$context, this.$attachmentsContext.getAttachments(), new AnonymousClass1(this));
}
}

View File

@ -10,18 +10,14 @@ import com.discord.utilities.user.UserUtils;
import com.discord.widgets.chat.input.ChatInputViewModel;
import d0.z.d.m;
import d0.z.d.o;
import java.util.ArrayList;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import rx.subjects.PublishSubject;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$sendMessage$messageSendResultHandler$1 extends o implements Function2<MessageResult, Guild, Unit> {
public final /* synthetic */ ArrayList $attachments;
public final /* synthetic */ ChatInputViewModel.AttachmentContext $attachmentsContext;
public final /* synthetic */ Context $context;
public final /* synthetic */ boolean $hasGif;
public final /* synthetic */ boolean $hasImage;
public final /* synthetic */ boolean $hasVideo;
public final /* synthetic */ boolean $isThreadDraft;
public final /* synthetic */ ChatInputViewModel.ViewState.Loaded $loadedViewState;
public final /* synthetic */ Function0 $messageResendCompressedHandler;
@ -48,9 +44,7 @@ public final class ChatInputViewModel$sendMessage$messageSendResultHandler$1 ext
int max = Math.max(premiumUtils.getGuildMaxFileSizeMB(guild != null ? guild.getPremiumTier() : 0), premiumUtils.getMaxFileSizeMB(this.this$0.$loadedViewState.getMe()));
PublishSubject access$getEventSubject$p = ChatInputViewModel.access$getEventSubject$p(this.this$0.this$0);
MeUser me2 = this.this$0.$loadedViewState.getMe();
boolean isPremium = me2 != null ? UserUtils.INSTANCE.isPremium(me2) : false;
ChatInputViewModel$sendMessage$messageSendResultHandler$1 chatInputViewModel$sendMessage$messageSendResultHandler$1 = this.this$0;
access$getEventSubject$p.j.onNext(new ChatInputViewModel.Event.FilesTooLarge(max, Float.MAX_VALUE, Float.MAX_VALUE, isPremium, chatInputViewModel$sendMessage$messageSendResultHandler$1.$attachments, chatInputViewModel$sendMessage$messageSendResultHandler$1.$hasImage, chatInputViewModel$sendMessage$messageSendResultHandler$1.$hasVideo, chatInputViewModel$sendMessage$messageSendResultHandler$1.$hasGif, chatInputViewModel$sendMessage$messageSendResultHandler$1.$messageResendCompressedHandler));
access$getEventSubject$p.j.onNext(new ChatInputViewModel.Event.FilesTooLarge(max, Float.MAX_VALUE, Float.MAX_VALUE, me2 != null ? UserUtils.INSTANCE.isPremium(me2) : false, this.this$0.$attachmentsContext.getAttachments(), this.this$0.$attachmentsContext.getHasImage(), this.this$0.$attachmentsContext.getHasVideo(), this.this$0.$attachmentsContext.getHasGif(), this.this$0.$messageResendCompressedHandler));
}
}
@ -74,17 +68,14 @@ public final class ChatInputViewModel$sendMessage$messageSendResultHandler$1 ext
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ChatInputViewModel$sendMessage$messageSendResultHandler$1(ChatInputViewModel chatInputViewModel, Context context, ChatInputViewModel.ViewState.Loaded loaded, ArrayList arrayList, boolean z2, boolean z3, boolean z4, Function0 function0, boolean z5) {
public ChatInputViewModel$sendMessage$messageSendResultHandler$1(ChatInputViewModel chatInputViewModel, Context context, ChatInputViewModel.ViewState.Loaded loaded, ChatInputViewModel.AttachmentContext attachmentContext, Function0 function0, boolean z2) {
super(2);
this.this$0 = chatInputViewModel;
this.$context = context;
this.$loadedViewState = loaded;
this.$attachments = arrayList;
this.$hasImage = z2;
this.$hasVideo = z3;
this.$hasGif = z4;
this.$attachmentsContext = attachmentContext;
this.$messageResendCompressedHandler = function0;
this.$isThreadDraft = z5;
this.$isThreadDraft = z2;
}
/* Return type fixed from 'java.lang.Object' to match base method */

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