88.5 - Alpha (88205)

This commit is contained in:
Juby210 2021-08-14 08:40:53 +02:00
parent f958af8ced
commit 149bb0ac24
142 changed files with 8249 additions and 7096 deletions

View File

@ -10,8 +10,8 @@ android {
applicationId 'com.discord' applicationId 'com.discord'
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode 88204 versionCode 88205
versionName "88.4 - Alpha" versionName "88.5 - Alpha"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="88204" android:versionName="88.4 - 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="88205" android:versionName="88.5 - Alpha" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/> <uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
@ -174,7 +174,7 @@
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="true"/> <meta-data android:name="firebase_crashlytics_collection_enabled" android:value="true"/>
<meta-data android:name="com.google.android.nearby.messages.API_KEY" android:value="AIzaSyD-4L6bgKMixqBRtrG2UktVXK6IexXlsog"/> <meta-data android:name="com.google.android.nearby.messages.API_KEY" android:value="AIzaSyD-4L6bgKMixqBRtrG2UktVXK6IexXlsog"/>
<meta-data android:name="com.google.android.actions" android:resource="@xml/actions"/> <meta-data android:name="com.google.android.actions" android:resource="@xml/actions"/>
<meta-data android:name="libdiscord_version" android:value="89.0.9-aarch64-opus-optimization"/> <meta-data android:name="libdiscord_version" android:value="89.0.11-remove-gameaudio-param"/>
<activity android:theme="@style/res_2131952264_theme_appcompat_light_noactionbar" android:name="com.yalantis.ucrop.UCropActivity"/> <activity android:theme="@style/res_2131952264_theme_appcompat_light_noactionbar" android:name="com.yalantis.ucrop.UCropActivity"/>
<service android:name="androidx.sharetarget.ChooserTargetServiceCompat" android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"> <service android:name="androidx.sharetarget.ChooserTargetServiceCompat" android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE">
<intent-filter> <intent-filter>

View File

@ -22,7 +22,7 @@ public final class a extends BroadcastReceiver {
public final Context b; public final Context b;
/* renamed from: c reason: collision with root package name */ /* renamed from: c reason: collision with root package name */
public final f f210c; public final g f210c;
/* compiled from: AudioManagerBroadcastReceiver.kt */ /* compiled from: AudioManagerBroadcastReceiver.kt */
/* renamed from: c.a.q.k0.a$a reason: collision with other inner class name */ /* renamed from: c.a.q.k0.a$a reason: collision with other inner class name */
@ -31,11 +31,11 @@ public final class a extends BroadcastReceiver {
} }
} }
public a(Context context, f fVar) { public a(Context context, g gVar) {
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(fVar, "listener"); m.checkNotNullParameter(gVar, "listener");
this.b = context; this.b = context;
this.f210c = fVar; this.f210c = gVar;
} }
@Override // android.content.BroadcastReceiver @Override // android.content.BroadcastReceiver
@ -74,10 +74,10 @@ public final class a extends BroadcastReceiver {
} }
AnimatableValueParser.G1("AudioManagerBroadcastReceiver", "onReceive: action = " + audioManagerBroadcastAction); AnimatableValueParser.G1("AudioManagerBroadcastReceiver", "onReceive: action = " + audioManagerBroadcastAction);
try { try {
f fVar = this.f210c; g gVar = this.f210c;
int ordinal = audioManagerBroadcastAction.ordinal(); int ordinal = audioManagerBroadcastAction.ordinal();
if (ordinal == 0) { if (ordinal == 0) {
fVar.c(context); gVar.c(context);
} else if (ordinal == 1) { } else if (ordinal == 1) {
m.checkNotNullParameter(intent, "intent"); m.checkNotNullParameter(intent, "intent");
if (m.areEqual(intent.getAction(), "android.intent.action.HEADSET_PLUG")) { if (m.areEqual(intent.getAction(), "android.intent.action.HEADSET_PLUG")) {
@ -94,24 +94,24 @@ public final class a extends BroadcastReceiver {
} }
aVar = new a.C0036a(stringExtra, z2); aVar = new a.C0036a(stringExtra, z2);
} }
fVar.e(context, aVar); gVar.e(context, aVar);
return; return;
} }
throw new IllegalArgumentException("Failed requirement.".toString()); throw new IllegalArgumentException("Failed requirement.".toString());
} else if (ordinal == 2) { } else if (ordinal == 2) {
fVar.b(context, ScoAudioState.Companion.b(intent)); gVar.b(context, ScoAudioState.Companion.b(intent));
} else if (ordinal == 3) { } else if (ordinal == 3) {
m.checkNotNullParameter(context, "$this$isMicrophoneMute"); m.checkNotNullParameter(context, "$this$isMicrophoneMute");
m.checkNotNullParameter(context, "$this$getAudioManager"); m.checkNotNullParameter(context, "$this$getAudioManager");
Object systemService = context.getSystemService(MediaStreamTrack.AUDIO_TRACK_KIND); Object systemService = context.getSystemService(MediaStreamTrack.AUDIO_TRACK_KIND);
Objects.requireNonNull(systemService, "null cannot be cast to non-null type android.media.AudioManager"); Objects.requireNonNull(systemService, "null cannot be cast to non-null type android.media.AudioManager");
fVar.a(context, ((AudioManager) systemService).isMicrophoneMute()); gVar.a(context, ((AudioManager) systemService).isMicrophoneMute());
} else if (ordinal == 4) { } else if (ordinal == 4) {
m.checkNotNullParameter(context, "$this$isSpeakerphoneOn"); m.checkNotNullParameter(context, "$this$isSpeakerphoneOn");
m.checkNotNullParameter(context, "$this$getAudioManager"); m.checkNotNullParameter(context, "$this$getAudioManager");
Object systemService2 = context.getSystemService(MediaStreamTrack.AUDIO_TRACK_KIND); Object systemService2 = context.getSystemService(MediaStreamTrack.AUDIO_TRACK_KIND);
Objects.requireNonNull(systemService2, "null cannot be cast to non-null type android.media.AudioManager"); Objects.requireNonNull(systemService2, "null cannot be cast to non-null type android.media.AudioManager");
fVar.d(context, ((AudioManager) systemService2).isSpeakerphoneOn()); gVar.d(context, ((AudioManager) systemService2).isSpeakerphoneOn());
} }
} catch (Throwable th) { } catch (Throwable th) {
AnimatableValueParser.E1("AudioManagerBroadcastReceiver", "error handling " + audioManagerBroadcastAction, th); AnimatableValueParser.E1("AudioManagerBroadcastReceiver", "error handling " + audioManagerBroadcastAction, th);

View File

@ -24,7 +24,7 @@ public final class c extends BroadcastReceiver implements BluetoothProfile.Servi
public boolean k; public boolean k;
public BluetoothHeadset l; public BluetoothHeadset l;
public final Context m; public final Context m;
public final g n; public final h n;
/* compiled from: BluetoothBroadcastReceiver.kt */ /* compiled from: BluetoothBroadcastReceiver.kt */
public static final class a { public static final class a {
@ -32,11 +32,11 @@ public final class c extends BroadcastReceiver implements BluetoothProfile.Servi
} }
} }
public c(Context context, g gVar) { public c(Context context, h hVar) {
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(gVar, "listener"); m.checkNotNullParameter(hVar, "listener");
this.m = context; this.m = context;
this.n = gVar; this.n = hVar;
} }
@Override // android.content.BroadcastReceiver @Override // android.content.BroadcastReceiver
@ -73,17 +73,17 @@ public final class c extends BroadcastReceiver implements BluetoothProfile.Servi
} }
AnimatableValueParser.G1("BluetoothBroadcastReceiver", "onReceive: action = " + bluetoothBroadcastAction); AnimatableValueParser.G1("BluetoothBroadcastReceiver", "onReceive: action = " + bluetoothBroadcastAction);
try { try {
g gVar = this.n; h hVar = this.n;
int ordinal = bluetoothBroadcastAction.ordinal(); int ordinal = bluetoothBroadcastAction.ordinal();
if (ordinal == 0) { if (ordinal == 0) {
gVar.d(context, BluetoothProfileConnectionState.Companion.b(intent)); hVar.d(context, BluetoothProfileConnectionState.Companion.b(intent));
} else if (ordinal == 1) { } else if (ordinal == 1) {
gVar.a(context, BluetoothHeadsetAudioState.Companion.b(intent)); hVar.a(context, BluetoothHeadsetAudioState.Companion.b(intent));
} else if (ordinal != 4) { } else if (ordinal != 4) {
AnimatableValueParser.H1("BluetoothBroadcastReceiver", "unexpected " + bluetoothBroadcastAction); AnimatableValueParser.H1("BluetoothBroadcastReceiver", "unexpected " + bluetoothBroadcastAction);
} else { } else {
m.checkNotNullParameter(intent, "$this$getBluetoothDeviceExtra"); m.checkNotNullParameter(intent, "$this$getBluetoothDeviceExtra");
gVar.b((BluetoothDevice) intent.getParcelableExtra("android.bluetooth.device.extra.DEVICE")); hVar.b((BluetoothDevice) intent.getParcelableExtra("android.bluetooth.device.extra.DEVICE"));
} }
} catch (Throwable th) { } catch (Throwable th) {
AnimatableValueParser.E1("BluetoothBroadcastReceiver", "error handling " + bluetoothBroadcastAction, th); AnimatableValueParser.E1("BluetoothBroadcastReceiver", "error handling " + bluetoothBroadcastAction, th);

View File

@ -1,19 +1,26 @@
package c.a.q.k0; package c.a.q.k0;
import android.content.Context; import android.database.ContentObserver;
import androidx.annotation.MainThread; import android.os.Handler;
import c.a.q.l0.a; import com.discord.rtcconnection.audio.DiscordAudioManager;
import com.discord.rtcconnection.enums.ScoAudioState; import rx.subjects.SerializedSubject;
/* compiled from: OnAudioManagerBroadcastListener.kt */ /* compiled from: DiscordAudioManager.kt */
@MainThread public final class f extends ContentObserver {
public interface f { public final /* synthetic */ DiscordAudioManager a;
void a(Context context, boolean z2);
void b(Context context, ScoAudioState.b bVar); /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public f(DiscordAudioManager discordAudioManager, Handler handler) {
super(handler);
this.a = discordAudioManager;
}
void c(Context context); @Override // android.database.ContentObserver
public void onChange(boolean z2) {
void d(Context context, boolean z2); super.onChange(z2);
DiscordAudioManager discordAudioManager = this.a;
void e(Context context, a aVar); int streamVolume = discordAudioManager.e.getStreamVolume(3);
discordAudioManager.w = streamVolume;
SerializedSubject<Integer, Integer> serializedSubject = discordAudioManager.f2130y;
serializedSubject.j.onNext(Integer.valueOf(streamVolume));
}
} }

View File

@ -1,19 +1,19 @@
package c.a.q.k0; package c.a.q.k0;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.content.Context; import android.content.Context;
import androidx.annotation.MainThread; import androidx.annotation.MainThread;
import com.discord.rtcconnection.enums.BluetoothHeadsetAudioState; import c.a.q.l0.a;
import com.discord.rtcconnection.enums.BluetoothProfileConnectionState; import com.discord.rtcconnection.enums.ScoAudioState;
/* compiled from: OnBluetoothBroadcastListener.kt */ /* compiled from: OnAudioManagerBroadcastListener.kt */
@MainThread @MainThread
public interface g { public interface g {
void a(Context context, BluetoothHeadsetAudioState.b bVar); void a(Context context, boolean z2);
void b(BluetoothDevice bluetoothDevice); void b(Context context, ScoAudioState.b bVar);
void c(BluetoothHeadset bluetoothHeadset); void c(Context context);
void d(Context context, BluetoothProfileConnectionState.b bVar); void d(Context context, boolean z2);
void e(Context context, a aVar);
} }

View File

@ -0,0 +1,19 @@
package c.a.q.k0;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.content.Context;
import androidx.annotation.MainThread;
import com.discord.rtcconnection.enums.BluetoothHeadsetAudioState;
import com.discord.rtcconnection.enums.BluetoothProfileConnectionState;
/* compiled from: OnBluetoothBroadcastListener.kt */
@MainThread
public interface h {
void a(Context context, BluetoothHeadsetAudioState.b bVar);
void b(BluetoothDevice bluetoothDevice);
void c(BluetoothHeadset bluetoothHeadset);
void d(Context context, BluetoothProfileConnectionState.b bVar);
}

View File

@ -569,13 +569,12 @@ public final class e implements MediaEngineConnection {
MediaEngineConnection.ConnectionState connectionState = MediaEngineConnection.ConnectionState.CONNECTING; MediaEngineConnection.ConnectionState connectionState = MediaEngineConnection.ConnectionState.CONNECTING;
this.f216c = connectionState; this.f216c = connectionState;
this.e = h0.mutableMapOf(d0.o.to(Long.valueOf(j2), Integer.valueOf(aVar.a))); this.e = h0.mutableMapOf(d0.o.to(Long.valueOf(j2), Integer.valueOf(aVar.a)));
boolean z2 = type == MediaEngineConnection.Type.STREAM;
int i2 = aVar.a; int i2 = aVar.a;
String str = aVar.b; String str = aVar.b;
int i3 = aVar.f2136c; int i3 = aVar.f2136c;
Object[] array = aVar.d.toArray(new StreamParameters[0]); Object[] array = aVar.d.toArray(new StreamParameters[0]);
Objects.requireNonNull(array, "null cannot be cast to non-null type kotlin.Array<T>"); Objects.requireNonNull(array, "null cannot be cast to non-null type kotlin.Array<T>");
Connection connectToServer = discord.connectToServer(i2, j2, str, i3, (StreamParameters[]) array, z2, new d(this)); Connection connectToServer = discord.connectToServer(i2, j2, str, i3, (StreamParameters[]) array, new d(this));
d0.z.d.m.checkNotNullExpressionValue(connectToServer, "voiceEngineLegacy.connec…fo, errorMessage) }\n }"); d0.z.d.m.checkNotNullExpressionValue(connectToServer, "voiceEngineLegacy.connec…fo, errorMessage) }\n }");
connectToServer.setOnVideoCallback(new b(this)); connectToServer.setOnVideoCallback(new b(this));
connectToServer.setUserSpeakingStatusChangedCallback(new c(this)); connectToServer.setUserSpeakingStatusChangedCallback(new c(this));

View File

@ -0,0 +1,72 @@
package com.discord.analytics.generated.events.impression;
import c.d.b.a.a;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackChannel;
import com.discord.analytics.generated.traits.TrackChannelReceiver;
import com.discord.analytics.generated.traits.TrackGuild;
import com.discord.analytics.generated.traits.TrackGuildReceiver;
import com.discord.analytics.generated.traits.TrackImpressionMetadata;
import com.discord.analytics.generated.traits.TrackImpressionMetadataReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m;
/* compiled from: TrackImpressionGuildInvite.kt */
public final class TrackImpressionGuildInvite implements AnalyticsSchema, TrackBaseReceiver, TrackGuildReceiver, TrackChannelReceiver, TrackLocationMetadataReceiver, TrackImpressionMetadataReceiver {
private final Long inviteChannelId;
private final Long inviteGuildId;
private TrackBase trackBase;
private TrackChannel trackChannel;
private TrackGuild trackGuild;
private TrackImpressionMetadata trackImpressionMetadata;
private TrackLocationMetadata trackLocationMetadata;
private final transient String type;
public TrackImpressionGuildInvite() {
this(null, null, 3);
}
public TrackImpressionGuildInvite(Long l, Long l2, int i) {
int i2 = i & 1;
int i3 = i & 2;
this.inviteGuildId = null;
this.inviteChannelId = null;
this.type = "impression_guild_invite";
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof TrackImpressionGuildInvite)) {
return false;
}
TrackImpressionGuildInvite trackImpressionGuildInvite = (TrackImpressionGuildInvite) obj;
return m.areEqual(this.inviteGuildId, trackImpressionGuildInvite.inviteGuildId) && m.areEqual(this.inviteChannelId, trackImpressionGuildInvite.inviteChannelId);
}
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
public int hashCode() {
Long l = this.inviteGuildId;
int i = 0;
int hashCode = (l != null ? l.hashCode() : 0) * 31;
Long l2 = this.inviteChannelId;
if (l2 != null) {
i = l2.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder L = a.L("TrackImpressionGuildInvite(inviteGuildId=");
L.append(this.inviteGuildId);
L.append(", inviteChannelId=");
return a.B(L, this.inviteChannelId, ")");
}
}

View File

@ -0,0 +1,4 @@
package com.discord.analytics.generated.events.impression;
/* compiled from: TrackImpressionGuildInvite.kt */
public interface TrackImpressionGuildInviteReceiver {
}

View File

@ -0,0 +1,27 @@
package com.discord.analytics.generated.events.impression;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackChannel;
import com.discord.analytics.generated.traits.TrackChannelReceiver;
import com.discord.analytics.generated.traits.TrackGuild;
import com.discord.analytics.generated.traits.TrackGuildReceiver;
import com.discord.analytics.generated.traits.TrackImpressionMetadata;
import com.discord.analytics.generated.traits.TrackImpressionMetadataReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackImpressionHubCreateGuildCustomize.kt */
public final class TrackImpressionHubCreateGuildCustomize implements AnalyticsSchema, TrackBaseReceiver, TrackGuildReceiver, TrackChannelReceiver, TrackLocationMetadataReceiver, TrackImpressionMetadataReceiver {
private TrackBase trackBase;
private TrackChannel trackChannel;
private TrackGuild trackGuild;
private TrackImpressionMetadata trackImpressionMetadata;
private TrackLocationMetadata trackLocationMetadata;
private final transient String type = "impression_hub_create_guild_customize";
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
}

View File

@ -0,0 +1,4 @@
package com.discord.analytics.generated.events.impression;
/* compiled from: TrackImpressionHubCreateGuildCustomize.kt */
public interface TrackImpressionHubCreateGuildCustomizeReceiver {
}

View File

@ -0,0 +1,27 @@
package com.discord.analytics.generated.events.impression;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackChannel;
import com.discord.analytics.generated.traits.TrackChannelReceiver;
import com.discord.analytics.generated.traits.TrackGuild;
import com.discord.analytics.generated.traits.TrackGuildReceiver;
import com.discord.analytics.generated.traits.TrackImpressionMetadata;
import com.discord.analytics.generated.traits.TrackImpressionMetadataReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackImpressionHubCreateGuildTemplate.kt */
public final class TrackImpressionHubCreateGuildTemplate implements AnalyticsSchema, TrackBaseReceiver, TrackGuildReceiver, TrackChannelReceiver, TrackLocationMetadataReceiver, TrackImpressionMetadataReceiver {
private TrackBase trackBase;
private TrackChannel trackChannel;
private TrackGuild trackGuild;
private TrackImpressionMetadata trackImpressionMetadata;
private TrackLocationMetadata trackLocationMetadata;
private final transient String type = "impression_hub_create_guild_template";
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
}

View File

@ -0,0 +1,4 @@
package com.discord.analytics.generated.events.impression;
/* compiled from: TrackImpressionHubCreateGuildTemplate.kt */
public interface TrackImpressionHubCreateGuildTemplateReceiver {
}

View File

@ -0,0 +1,27 @@
package com.discord.analytics.generated.events.impression;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackChannel;
import com.discord.analytics.generated.traits.TrackChannelReceiver;
import com.discord.analytics.generated.traits.TrackGuild;
import com.discord.analytics.generated.traits.TrackGuildReceiver;
import com.discord.analytics.generated.traits.TrackImpressionMetadata;
import com.discord.analytics.generated.traits.TrackImpressionMetadataReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackImpressionHubEmailSignup.kt */
public final class TrackImpressionHubEmailSignup implements AnalyticsSchema, TrackBaseReceiver, TrackGuildReceiver, TrackChannelReceiver, TrackLocationMetadataReceiver, TrackImpressionMetadataReceiver {
private TrackBase trackBase;
private TrackChannel trackChannel;
private TrackGuild trackGuild;
private TrackImpressionMetadata trackImpressionMetadata;
private TrackLocationMetadata trackLocationMetadata;
private final transient String type = "impression_hub_email_signup";
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
}

View File

@ -0,0 +1,4 @@
package com.discord.analytics.generated.events.impression;
/* compiled from: TrackImpressionHubEmailSignup.kt */
public interface TrackImpressionHubEmailSignupReceiver {
}

View File

@ -0,0 +1,27 @@
package com.discord.analytics.generated.events.impression;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackChannel;
import com.discord.analytics.generated.traits.TrackChannelReceiver;
import com.discord.analytics.generated.traits.TrackGuild;
import com.discord.analytics.generated.traits.TrackGuildReceiver;
import com.discord.analytics.generated.traits.TrackImpressionMetadata;
import com.discord.analytics.generated.traits.TrackImpressionMetadataReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackImpressionHubEmailVerificationPage.kt */
public final class TrackImpressionHubEmailVerificationPage implements AnalyticsSchema, TrackBaseReceiver, TrackGuildReceiver, TrackChannelReceiver, TrackLocationMetadataReceiver, TrackImpressionMetadataReceiver {
private TrackBase trackBase;
private TrackChannel trackChannel;
private TrackGuild trackGuild;
private TrackImpressionMetadata trackImpressionMetadata;
private TrackLocationMetadata trackLocationMetadata;
private final transient String type = "impression_hub_email_verification_page";
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
}

View File

@ -0,0 +1,4 @@
package com.discord.analytics.generated.events.impression;
/* compiled from: TrackImpressionHubEmailVerificationPage.kt */
public interface TrackImpressionHubEmailVerificationPageReceiver {
}

View File

@ -0,0 +1,27 @@
package com.discord.analytics.generated.events.impression;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackChannel;
import com.discord.analytics.generated.traits.TrackChannelReceiver;
import com.discord.analytics.generated.traits.TrackGuild;
import com.discord.analytics.generated.traits.TrackGuildReceiver;
import com.discord.analytics.generated.traits.TrackImpressionMetadata;
import com.discord.analytics.generated.traits.TrackImpressionMetadataReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackImpressionHubExistingGuildChoose.kt */
public final class TrackImpressionHubExistingGuildChoose implements AnalyticsSchema, TrackBaseReceiver, TrackGuildReceiver, TrackChannelReceiver, TrackLocationMetadataReceiver, TrackImpressionMetadataReceiver {
private TrackBase trackBase;
private TrackChannel trackChannel;
private TrackGuild trackGuild;
private TrackImpressionMetadata trackImpressionMetadata;
private TrackLocationMetadata trackLocationMetadata;
private final transient String type = "impression_hub_existing_guild_choose";
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
}

View File

@ -0,0 +1,4 @@
package com.discord.analytics.generated.events.impression;
/* compiled from: TrackImpressionHubExistingGuildChoose.kt */
public interface TrackImpressionHubExistingGuildChooseReceiver {
}

View File

@ -0,0 +1,27 @@
package com.discord.analytics.generated.events.impression;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackChannel;
import com.discord.analytics.generated.traits.TrackChannelReceiver;
import com.discord.analytics.generated.traits.TrackGuild;
import com.discord.analytics.generated.traits.TrackGuildReceiver;
import com.discord.analytics.generated.traits.TrackImpressionMetadata;
import com.discord.analytics.generated.traits.TrackImpressionMetadataReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
/* compiled from: TrackImpressionHubExistingGuildCustomize.kt */
public final class TrackImpressionHubExistingGuildCustomize implements AnalyticsSchema, TrackBaseReceiver, TrackGuildReceiver, TrackChannelReceiver, TrackLocationMetadataReceiver, TrackImpressionMetadataReceiver {
private TrackBase trackBase;
private TrackChannel trackChannel;
private TrackGuild trackGuild;
private TrackImpressionMetadata trackImpressionMetadata;
private TrackLocationMetadata trackLocationMetadata;
private final transient String type = "impression_hub_existing_guild_customize";
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
}

View File

@ -0,0 +1,4 @@
package com.discord.analytics.generated.events.impression;
/* compiled from: TrackImpressionHubExistingGuildCustomize.kt */
public interface TrackImpressionHubExistingGuildCustomizeReceiver {
}

View File

@ -0,0 +1,78 @@
package com.discord.analytics.generated.events.network_action;
import c.d.b.a.a;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.analytics.generated.traits.TrackNetworkMetadata;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m;
/* compiled from: TrackNetworkActionDirectoryGuildEntryCreate.kt */
public final class TrackNetworkActionDirectoryGuildEntryCreate implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver {
private final Long directoryChannelId;
private final Long guildId;
private final Integer primaryCategoryId;
private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata;
private TrackNetworkMetadata trackNetworkMetadata;
private final transient String type;
public TrackNetworkActionDirectoryGuildEntryCreate() {
this.directoryChannelId = null;
this.guildId = null;
this.primaryCategoryId = null;
this.type = "network_action_directory_guild_entry_create";
}
public TrackNetworkActionDirectoryGuildEntryCreate(Long l, Long l2, Integer num) {
this.directoryChannelId = l;
this.guildId = l2;
this.primaryCategoryId = num;
this.type = "network_action_directory_guild_entry_create";
}
@Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver
public void a(TrackNetworkMetadata trackNetworkMetadata) {
this.trackNetworkMetadata = trackNetworkMetadata;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof TrackNetworkActionDirectoryGuildEntryCreate)) {
return false;
}
TrackNetworkActionDirectoryGuildEntryCreate trackNetworkActionDirectoryGuildEntryCreate = (TrackNetworkActionDirectoryGuildEntryCreate) obj;
return m.areEqual(this.directoryChannelId, trackNetworkActionDirectoryGuildEntryCreate.directoryChannelId) && m.areEqual(this.guildId, trackNetworkActionDirectoryGuildEntryCreate.guildId) && m.areEqual(this.primaryCategoryId, trackNetworkActionDirectoryGuildEntryCreate.primaryCategoryId);
}
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
public int hashCode() {
Long l = this.directoryChannelId;
int i = 0;
int hashCode = (l != null ? l.hashCode() : 0) * 31;
Long l2 = this.guildId;
int hashCode2 = (hashCode + (l2 != null ? l2.hashCode() : 0)) * 31;
Integer num = this.primaryCategoryId;
if (num != null) {
i = num.hashCode();
}
return hashCode2 + i;
}
public String toString() {
StringBuilder L = a.L("TrackNetworkActionDirectoryGuildEntryCreate(directoryChannelId=");
L.append(this.directoryChannelId);
L.append(", guildId=");
L.append(this.guildId);
L.append(", primaryCategoryId=");
return a.A(L, this.primaryCategoryId, ")");
}
}

View File

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

View File

@ -0,0 +1,71 @@
package com.discord.analytics.generated.events.network_action;
import c.d.b.a.a;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.analytics.generated.traits.TrackNetworkMetadata;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m;
/* compiled from: TrackNetworkActionDirectoryGuildEntryDelete.kt */
public final class TrackNetworkActionDirectoryGuildEntryDelete implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver {
private final Long directoryChannelId;
private final Long guildId;
private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata;
private TrackNetworkMetadata trackNetworkMetadata;
private final transient String type;
public TrackNetworkActionDirectoryGuildEntryDelete() {
this.directoryChannelId = null;
this.guildId = null;
this.type = "network_action_directory_guild_entry_delete";
}
public TrackNetworkActionDirectoryGuildEntryDelete(Long l, Long l2) {
this.directoryChannelId = l;
this.guildId = l2;
this.type = "network_action_directory_guild_entry_delete";
}
@Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver
public void a(TrackNetworkMetadata trackNetworkMetadata) {
this.trackNetworkMetadata = trackNetworkMetadata;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof TrackNetworkActionDirectoryGuildEntryDelete)) {
return false;
}
TrackNetworkActionDirectoryGuildEntryDelete trackNetworkActionDirectoryGuildEntryDelete = (TrackNetworkActionDirectoryGuildEntryDelete) obj;
return m.areEqual(this.directoryChannelId, trackNetworkActionDirectoryGuildEntryDelete.directoryChannelId) && m.areEqual(this.guildId, trackNetworkActionDirectoryGuildEntryDelete.guildId);
}
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
public int hashCode() {
Long l = this.directoryChannelId;
int i = 0;
int hashCode = (l != null ? l.hashCode() : 0) * 31;
Long l2 = this.guildId;
if (l2 != null) {
i = l2.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder L = a.L("TrackNetworkActionDirectoryGuildEntryDelete(directoryChannelId=");
L.append(this.directoryChannelId);
L.append(", guildId=");
return a.B(L, this.guildId, ")");
}
}

View File

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

View File

@ -0,0 +1,61 @@
package com.discord.analytics.generated.events.network_action;
import c.d.b.a.a;
import com.discord.analytics.generated.traits.TrackBase;
import com.discord.analytics.generated.traits.TrackBaseReceiver;
import com.discord.analytics.generated.traits.TrackLocationMetadata;
import com.discord.analytics.generated.traits.TrackLocationMetadataReceiver;
import com.discord.analytics.generated.traits.TrackNetworkMetadata;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m;
/* compiled from: TrackNetworkActionHubEmailVerifySend.kt */
public final class TrackNetworkActionHubEmailVerifySend implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver {
private final Boolean hasMatchingGuild;
private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata;
private TrackNetworkMetadata trackNetworkMetadata;
private final transient String type;
public TrackNetworkActionHubEmailVerifySend() {
this.hasMatchingGuild = null;
this.type = "network_action_hub_email_verify_send";
}
public TrackNetworkActionHubEmailVerifySend(Boolean bool) {
this.hasMatchingGuild = bool;
this.type = "network_action_hub_email_verify_send";
}
@Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver
public void a(TrackNetworkMetadata trackNetworkMetadata) {
this.trackNetworkMetadata = trackNetworkMetadata;
}
public boolean equals(Object obj) {
if (this != obj) {
return (obj instanceof TrackNetworkActionHubEmailVerifySend) && m.areEqual(this.hasMatchingGuild, ((TrackNetworkActionHubEmailVerifySend) obj).hasMatchingGuild);
}
return true;
}
@Override // com.discord.api.science.AnalyticsSchema
public String getType() {
return this.type;
}
public int hashCode() {
Boolean bool = this.hasMatchingGuild;
if (bool != null) {
return bool.hashCode();
}
return 0;
}
public String toString() {
StringBuilder L = a.L("TrackNetworkActionHubEmailVerifySend(hasMatchingGuild=");
L.append(this.hasMatchingGuild);
L.append(")");
return L.toString();
}
}

View File

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

View File

@ -18,7 +18,8 @@ public final class TrackNetworkActionHubWaitlistSignup implements AnalyticsSchem
private final transient String type; private final transient String type;
public TrackNetworkActionHubWaitlistSignup() { public TrackNetworkActionHubWaitlistSignup() {
this(null); this.isEduEmail = null;
this.type = "network_action_hub_waitlist_signup";
} }
public TrackNetworkActionHubWaitlistSignup(Boolean bool) { public TrackNetworkActionHubWaitlistSignup(Boolean bool) {

View File

@ -6,6 +6,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.viewbinding.ViewBinding; import androidx.viewbinding.ViewBinding;
import com.discord.utilities.view.text.LinkifiedTextView;
public final class GuildScheduledEventItemViewBinding implements ViewBinding { public final class GuildScheduledEventItemViewBinding implements ViewBinding {
@NonNull @NonNull
public final ConstraintLayout a; public final ConstraintLayout a;
@ -18,7 +19,7 @@ public final class GuildScheduledEventItemViewBinding implements ViewBinding {
@NonNull @NonNull
public final TextView d; public final TextView d;
@NonNull @NonNull
public final TextView e; public final LinkifiedTextView e;
@NonNull @NonNull
public final ImageView f; public final ImageView f;
@NonNull @NonNull
@ -36,20 +37,20 @@ public final class GuildScheduledEventItemViewBinding implements ViewBinding {
@NonNull @NonNull
public final TextView m; public final TextView m;
public GuildScheduledEventItemViewBinding(@NonNull ConstraintLayout constraintLayout, @NonNull ImageView imageView, @NonNull TextView textView, @NonNull TextView textView2, @NonNull TextView textView3, @NonNull ImageView imageView2, @NonNull TextView textView4, @NonNull TextView textView5, @NonNull ImageView imageView3, @NonNull ImageView imageView4, @NonNull TextView textView6, @NonNull ImageView imageView5, @NonNull TextView textView7) { public GuildScheduledEventItemViewBinding(@NonNull ConstraintLayout constraintLayout, @NonNull ImageView imageView, @NonNull TextView textView, @NonNull TextView textView2, @NonNull LinkifiedTextView linkifiedTextView, @NonNull ImageView imageView2, @NonNull TextView textView3, @NonNull TextView textView4, @NonNull ImageView imageView3, @NonNull ImageView imageView4, @NonNull TextView textView5, @NonNull ImageView imageView5, @NonNull TextView textView6) {
this.a = constraintLayout; this.a = constraintLayout;
this.b = imageView; this.b = imageView;
this.f1612c = textView; this.f1612c = textView;
this.d = textView2; this.d = textView2;
this.e = textView3; this.e = linkifiedTextView;
this.f = imageView2; this.f = imageView2;
this.g = textView4; this.g = textView3;
this.h = textView5; this.h = textView4;
this.i = imageView3; this.i = imageView3;
this.j = imageView4; this.j = imageView4;
this.k = textView6; this.k = textView5;
this.l = imageView5; this.l = imageView5;
this.m = textView7; this.m = textView6;
} }
@Override // androidx.viewbinding.ViewBinding @Override // androidx.viewbinding.ViewBinding

View File

@ -244,7 +244,7 @@ public interface RestAPIInterface {
Observable<Void> addRelationship(@s("userId") long j, @a RestAPIParams.UserRelationship userRelationship, @i("X-Context-Properties") String str); Observable<Void> addRelationship(@s("userId") long j, @a RestAPIParams.UserRelationship userRelationship, @i("X-Context-Properties") String str);
@i0.f0.o("channels/{channelId}/directory-entry/{guildId}") @i0.f0.o("channels/{channelId}/directory-entry/{guildId}")
Observable<DirectoryEntry> addServerToHub(@s("channelId") long j, @s("guildId") long j2, @a RestAPIParams.AddServerBody addServerBody); Observable<Response<DirectoryEntry>> addServerToHub(@s("channelId") long j, @s("guildId") long j2, @a RestAPIParams.AddServerBody addServerBody);
@f("connections/{connection}/authorize") @f("connections/{connection}/authorize")
Observable<ModelUrl> authorizeConnection(@s("connection") String str); Observable<ModelUrl> authorizeConnection(@s("connection") String str);
@ -754,7 +754,7 @@ public interface RestAPIInterface {
Observable<Void> removeSelfReaction(@s("channelId") long j, @s("messageId") long j2, @s(encoded = true, value = "reaction") String str); Observable<Void> removeSelfReaction(@s("channelId") long j, @s("messageId") long j2, @s(encoded = true, value = "reaction") String str);
@b("channels/{channelId}/directory-entry/{guildId}") @b("channels/{channelId}/directory-entry/{guildId}")
Observable<DirectoryEntry> removeServerFromHub(@s("channelId") long j, @s("guildId") long j2); Observable<Response<DirectoryEntry>> removeServerFromHub(@s("channelId") long j, @s("guildId") long j2);
@n("guilds/{guildId}/channels") @n("guilds/{guildId}/channels")
Observable<Void> reorderChannels(@s("guildId") long j, @a List<RestAPIParams.ChannelPosition> list); Observable<Void> reorderChannels(@s("guildId") long j, @a List<RestAPIParams.ChannelPosition> list);

View File

@ -4,16 +4,20 @@ import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset; import android.bluetooth.BluetoothHeadset;
import android.bluetooth.BluetoothManager; import android.bluetooth.BluetoothManager;
import android.content.ContentResolver;
import android.content.Context; import android.content.Context;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.database.ContentObserver;
import android.media.AudioAttributes; import android.media.AudioAttributes;
import android.media.AudioFocusRequest; import android.media.AudioFocusRequest;
import android.media.AudioManager; import android.media.AudioManager;
import android.os.Build; import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.provider.Settings;
import androidx.annotation.MainThread; import androidx.annotation.MainThread;
import c.a.q.k0.f; import c.a.q.k0.f;
import c.a.q.k0.h;
import c.a.q.l0.a; import c.a.q.l0.a;
import com.airbnb.lottie.parser.AnimatableValueParser; import com.airbnb.lottie.parser.AnimatableValueParser;
import com.discord.rtcconnection.enums.AudioManagerBroadcastAction; import com.discord.rtcconnection.enums.AudioManagerBroadcastAction;
@ -48,36 +52,41 @@ public final class DiscordAudioManager {
/* renamed from: c reason: collision with root package name */ /* renamed from: c reason: collision with root package name */
public static final List<DeviceTypes> f2127c = n.listOf((Object[]) new DeviceTypes[]{DeviceTypes.EARPIECE, DeviceTypes.SPEAKERPHONE, DeviceTypes.BLUETOOTH_HEADSET, DeviceTypes.WIRED_HEADSET}); public static final List<DeviceTypes> f2127c = n.listOf((Object[]) new DeviceTypes[]{DeviceTypes.EARPIECE, DeviceTypes.SPEAKERPHONE, DeviceTypes.BLUETOOTH_HEADSET, DeviceTypes.WIRED_HEADSET});
public static final DiscordAudioManager d = null; public static final DiscordAudioManager d = null;
public boolean A;
public boolean B;
public boolean C;
public List<? extends DeviceTypes> D;
public boolean E;
public final AudioManager e; public final AudioManager e;
public final BluetoothManager f; public final BluetoothManager f;
public final Lazy g; public final Lazy g;
public final boolean h; public final boolean h;
public final Object i = this; public final Object i = this;
public final long j; public final long j;
public final c.a.q.k0.c k; public final ContentResolver k;
public final c.a.q.k0.a l; public final c.a.q.k0.c l;
public BluetoothHeadset m; public final c.a.q.k0.a m;
public BluetoothScoState n; public BluetoothHeadset n;
public AudioManager.OnAudioFocusChangeListener o; public BluetoothScoState o;
public AudioFocusRequest p; public AudioManager.OnAudioFocusChangeListener p;
public List<AudioDevice> q; public AudioFocusRequest q;
public final SerializedSubject<List<AudioDevice>, List<AudioDevice>> r; public List<AudioDevice> r;
/* renamed from: s reason: collision with root package name */ /* renamed from: s reason: collision with root package name */
public DeviceTypes f2128s; public final SerializedSubject<List<AudioDevice>, List<AudioDevice>> f2128s;
public final SerializedSubject<DeviceTypes, DeviceTypes> t; public DeviceTypes t;
public DeviceTypes u; public final SerializedSubject<DeviceTypes, DeviceTypes> u;
public boolean v; public ContentObserver v;
public boolean w; public int w;
/* renamed from: x reason: collision with root package name */ /* renamed from: x reason: collision with root package name */
public boolean f2129x; public final int f2129x;
/* renamed from: y reason: collision with root package name */ /* renamed from: y reason: collision with root package name */
public List<? extends DeviceTypes> f2130y; public final SerializedSubject<Integer, Integer> f2130y;
/* renamed from: z reason: collision with root package name */ /* renamed from: z reason: collision with root package name */
public boolean f2131z; public DeviceTypes f2131z;
/* compiled from: DiscordAudioManager.kt */ /* compiled from: DiscordAudioManager.kt */
public static final class AudioDevice { public static final class AudioDevice {
@ -222,7 +231,7 @@ public final class DiscordAudioManager {
@Override // java.lang.Runnable @Override // java.lang.Runnable
public final void run() { public final void run() {
DiscordAudioManager discordAudioManager = this.i; DiscordAudioManager discordAudioManager = this.i;
c.a.q.k0.a aVar = discordAudioManager.l; c.a.q.k0.a aVar = discordAudioManager.m;
Objects.requireNonNull(aVar); Objects.requireNonNull(aVar);
ThreadUtils.checkIsOnMainThread(); ThreadUtils.checkIsOnMainThread();
boolean z2 = false; boolean z2 = false;
@ -233,7 +242,7 @@ public final class DiscordAudioManager {
intentFilter.addAction(audioManagerBroadcastAction.getAction()); intentFilter.addAction(audioManagerBroadcastAction.getAction());
} }
aVar.b.registerReceiver(aVar, intentFilter); aVar.b.registerReceiver(aVar, intentFilter);
c.a.q.k0.c cVar = discordAudioManager.k; c.a.q.k0.c cVar = discordAudioManager.l;
Objects.requireNonNull(cVar); Objects.requireNonNull(cVar);
ThreadUtils.checkIsOnMainThread(); ThreadUtils.checkIsOnMainThread();
if (!cVar.k) { if (!cVar.k) {
@ -277,23 +286,23 @@ public final class DiscordAudioManager {
} }
c.a.q.k0.e eVar = new c.a.q.k0.e(discordAudioManager); c.a.q.k0.e eVar = new c.a.q.k0.e(discordAudioManager);
synchronized (discordAudioManager.i) { synchronized (discordAudioManager.i) {
discordAudioManager.o = eVar; discordAudioManager.p = eVar;
} }
} }
} }
/* compiled from: DiscordAudioManager.kt */ /* compiled from: DiscordAudioManager.kt */
public final class b implements f { public final class b implements c.a.q.k0.g {
public b() { public b() {
} }
@Override // c.a.q.k0.f @Override // c.a.q.k0.g
public void a(Context context, boolean z2) { public void a(Context context, boolean z2) {
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
} }
@Override // c.a.q.k0.f @Override // c.a.q.k0.g
@MainThread @MainThread
public void b(Context context, ScoAudioState.b bVar) { public void b(Context context, ScoAudioState.b bVar) {
boolean z2; boolean z2;
@ -303,12 +312,12 @@ public final class DiscordAudioManager {
if (ordinal == 0) { if (ordinal == 0) {
AnimatableValueParser.D1("DiscordAudioManager", "[onScoAudioStateUpdate] scoAudioStateUpdate = " + bVar); AnimatableValueParser.D1("DiscordAudioManager", "[onScoAudioStateUpdate] scoAudioStateUpdate = " + bVar);
DiscordAudioManager discordAudioManager = DiscordAudioManager.this; DiscordAudioManager discordAudioManager = DiscordAudioManager.this;
BluetoothScoState bluetoothScoState = discordAudioManager.n; BluetoothScoState bluetoothScoState = discordAudioManager.o;
discordAudioManager.k(); discordAudioManager.k();
int ordinal2 = bluetoothScoState.ordinal(); int ordinal2 = bluetoothScoState.ordinal();
if (ordinal2 == 2) { if (ordinal2 == 2) {
synchronized (DiscordAudioManager.this.i) { synchronized (DiscordAudioManager.this.i) {
z2 = DiscordAudioManager.this.f2131z; z2 = DiscordAudioManager.this.E;
} }
if (z2) { if (z2) {
AnimatableValueParser.D1("DiscordAudioManager", "SCO off detected directly from ON. Refreshing Bluetooth device"); AnimatableValueParser.D1("DiscordAudioManager", "SCO off detected directly from ON. Refreshing Bluetooth device");
@ -321,16 +330,16 @@ public final class DiscordAudioManager {
AnimatableValueParser.D1("DiscordAudioManager", L.toString()); AnimatableValueParser.D1("DiscordAudioManager", L.toString());
synchronized (DiscordAudioManager.this.i) { synchronized (DiscordAudioManager.this.i) {
DiscordAudioManager discordAudioManager2 = DiscordAudioManager.this; DiscordAudioManager discordAudioManager2 = DiscordAudioManager.this;
List<AudioDevice> list = discordAudioManager2.q; List<AudioDevice> list = discordAudioManager2.r;
ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10)); ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10));
for (AudioDevice audioDevice : list) { for (AudioDevice audioDevice : list) {
arrayList.add(audioDevice.a.ordinal() != 5 ? AudioDevice.a(audioDevice, null, false, null, null, 15) : AudioDevice.a(audioDevice, null, false, null, null, 1)); arrayList.add(audioDevice.a.ordinal() != 5 ? AudioDevice.a(audioDevice, null, false, null, null, 15) : AudioDevice.a(audioDevice, null, false, null, null, 1));
} }
discordAudioManager2.q = arrayList; discordAudioManager2.r = arrayList;
discordAudioManager2.r.j.onNext(arrayList); discordAudioManager2.f2128s.j.onNext(arrayList);
} }
DiscordAudioManager discordAudioManager3 = DiscordAudioManager.this; DiscordAudioManager discordAudioManager3 = DiscordAudioManager.this;
discordAudioManager3.a(discordAudioManager3.q); discordAudioManager3.a(discordAudioManager3.r);
} }
} else if (ordinal == 1) { } else if (ordinal == 1) {
AnimatableValueParser.D1("DiscordAudioManager", "[onScoAudioStateUpdate] scoAudioStateUpdate = " + bVar); AnimatableValueParser.D1("DiscordAudioManager", "[onScoAudioStateUpdate] scoAudioStateUpdate = " + bVar);
@ -338,19 +347,19 @@ public final class DiscordAudioManager {
} }
} }
@Override // c.a.q.k0.f @Override // c.a.q.k0.g
public void c(Context context) { public void c(Context context) {
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
} }
@Override // c.a.q.k0.f @Override // c.a.q.k0.g
public void d(Context context, boolean z2) { public void d(Context context, boolean z2) {
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
} }
@Override // c.a.q.k0.f @Override // c.a.q.k0.g
@MainThread @MainThread
public void e(Context context, c.a.q.l0.a aVar) { public void e(Context context, c.a.q.l0.a aVar) {
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
@ -359,26 +368,26 @@ public final class DiscordAudioManager {
if (m.areEqual(aVar, a.b.a)) { if (m.areEqual(aVar, a.b.a)) {
synchronized (DiscordAudioManager.this.i) { synchronized (DiscordAudioManager.this.i) {
DiscordAudioManager discordAudioManager = DiscordAudioManager.this; DiscordAudioManager discordAudioManager = DiscordAudioManager.this;
List<AudioDevice> list = discordAudioManager.q; List<AudioDevice> list = discordAudioManager.r;
ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10)); ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10));
for (AudioDevice audioDevice : list) { for (AudioDevice audioDevice : list) {
int ordinal = audioDevice.a.ordinal(); int ordinal = audioDevice.a.ordinal();
arrayList.add(ordinal != 3 ? ordinal != 4 ? AudioDevice.a(audioDevice, null, false, null, null, 15) : AudioDevice.a(audioDevice, null, DiscordAudioManager.this.h, null, null, 13) : AudioDevice.a(audioDevice, null, false, null, null, 13)); arrayList.add(ordinal != 3 ? ordinal != 4 ? AudioDevice.a(audioDevice, null, false, null, null, 15) : AudioDevice.a(audioDevice, null, DiscordAudioManager.this.h, null, null, 13) : AudioDevice.a(audioDevice, null, false, null, null, 13));
} }
discordAudioManager.q = arrayList; discordAudioManager.r = arrayList;
discordAudioManager.r.j.onNext(arrayList); discordAudioManager.f2128s.j.onNext(arrayList);
} }
} else if (aVar instanceof a.C0036a) { } else if (aVar instanceof a.C0036a) {
synchronized (DiscordAudioManager.this.i) { synchronized (DiscordAudioManager.this.i) {
DiscordAudioManager discordAudioManager2 = DiscordAudioManager.this; DiscordAudioManager discordAudioManager2 = DiscordAudioManager.this;
List<AudioDevice> list2 = discordAudioManager2.q; List<AudioDevice> list2 = discordAudioManager2.r;
ArrayList arrayList2 = new ArrayList(o.collectionSizeOrDefault(list2, 10)); ArrayList arrayList2 = new ArrayList(o.collectionSizeOrDefault(list2, 10));
for (AudioDevice audioDevice2 : list2) { for (AudioDevice audioDevice2 : list2) {
int ordinal2 = audioDevice2.a.ordinal(); int ordinal2 = audioDevice2.a.ordinal();
arrayList2.add(ordinal2 != 3 ? ordinal2 != 4 ? AudioDevice.a(audioDevice2, null, false, null, null, 15) : AudioDevice.a(audioDevice2, null, false, null, null, 13) : AudioDevice.a(audioDevice2, null, true, null, null, 13)); arrayList2.add(ordinal2 != 3 ? ordinal2 != 4 ? AudioDevice.a(audioDevice2, null, false, null, null, 15) : AudioDevice.a(audioDevice2, null, false, null, null, 13) : AudioDevice.a(audioDevice2, null, true, null, null, 13));
} }
discordAudioManager2.q = arrayList2; discordAudioManager2.r = arrayList2;
discordAudioManager2.r.j.onNext(arrayList2); discordAudioManager2.f2128s.j.onNext(arrayList2);
} }
} }
DiscordAudioManager.this.l(); DiscordAudioManager.this.l();
@ -386,11 +395,11 @@ public final class DiscordAudioManager {
} }
/* compiled from: DiscordAudioManager.kt */ /* compiled from: DiscordAudioManager.kt */
public final class c implements c.a.q.k0.g { public final class c implements h {
public c() { public c() {
} }
@Override // c.a.q.k0.g @Override // c.a.q.k0.h
@MainThread @MainThread
public void a(Context context, BluetoothHeadsetAudioState.b bVar) { public void a(Context context, BluetoothHeadsetAudioState.b bVar) {
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
@ -412,18 +421,18 @@ public final class DiscordAudioManager {
} else if (ordinal == 2) { } else if (ordinal == 2) {
synchronized (DiscordAudioManager.this.i) { synchronized (DiscordAudioManager.this.i) {
DiscordAudioManager discordAudioManager = DiscordAudioManager.this; DiscordAudioManager discordAudioManager = DiscordAudioManager.this;
List<AudioDevice> list = discordAudioManager.q; List<AudioDevice> list = discordAudioManager.r;
ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10)); ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10));
for (AudioDevice audioDevice : list) { for (AudioDevice audioDevice : list) {
arrayList.add(audioDevice.a.ordinal() != 5 ? AudioDevice.a(audioDevice, null, false, null, null, 15) : AudioDevice.a(audioDevice, null, true, bluetoothDevice != null ? bluetoothDevice.getAddress() : null, bluetoothDevice != null ? bluetoothDevice.getName() : null, 1)); arrayList.add(audioDevice.a.ordinal() != 5 ? AudioDevice.a(audioDevice, null, false, null, null, 15) : AudioDevice.a(audioDevice, null, true, bluetoothDevice != null ? bluetoothDevice.getAddress() : null, bluetoothDevice != null ? bluetoothDevice.getName() : null, 1));
} }
discordAudioManager.q = arrayList; discordAudioManager.r = arrayList;
discordAudioManager.r.j.onNext(arrayList); discordAudioManager.f2128s.j.onNext(arrayList);
} }
} }
} }
@Override // c.a.q.k0.g @Override // c.a.q.k0.h
@MainThread @MainThread
public void b(BluetoothDevice bluetoothDevice) { public void b(BluetoothDevice bluetoothDevice) {
c.a.q.k0.d dVar = c.a.q.k0.d.f212c; c.a.q.k0.d dVar = c.a.q.k0.d.f212c;
@ -434,13 +443,13 @@ public final class DiscordAudioManager {
} }
} }
@Override // c.a.q.k0.g @Override // c.a.q.k0.h
@MainThread @MainThread
public void c(BluetoothHeadset bluetoothHeadset) { public void c(BluetoothHeadset bluetoothHeadset) {
DiscordAudioManager.this.m = bluetoothHeadset; DiscordAudioManager.this.n = bluetoothHeadset;
} }
@Override // c.a.q.k0.g @Override // c.a.q.k0.h
@MainThread @MainThread
public void d(Context context, BluetoothProfileConnectionState.b bVar) { public void d(Context context, BluetoothProfileConnectionState.b bVar) {
ArrayList arrayList; ArrayList arrayList;
@ -466,7 +475,7 @@ public final class DiscordAudioManager {
if (ordinal == 2) { if (ordinal == 2) {
synchronized (DiscordAudioManager.this.i) { synchronized (DiscordAudioManager.this.i) {
discordAudioManager = DiscordAudioManager.this; discordAudioManager = DiscordAudioManager.this;
deviceTypes = discordAudioManager.f2128s; deviceTypes = discordAudioManager.t;
} }
if (deviceTypes == DeviceTypes.BLUETOOTH_HEADSET) { if (deviceTypes == DeviceTypes.BLUETOOTH_HEADSET) {
discordAudioManager.g(); discordAudioManager.g();
@ -483,7 +492,7 @@ public final class DiscordAudioManager {
return; return;
} }
synchronized (DiscordAudioManager.this.i) { synchronized (DiscordAudioManager.this.i) {
List<AudioDevice> list = DiscordAudioManager.this.q; List<AudioDevice> list = DiscordAudioManager.this.r;
arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10)); arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10));
for (AudioDevice audioDevice : list) { for (AudioDevice audioDevice : list) {
arrayList.add(AudioDevice.a(audioDevice, null, false, null, null, 15)); arrayList.add(AudioDevice.a(audioDevice, null, false, null, null, 15));
@ -549,10 +558,13 @@ public final class DiscordAudioManager {
Thread currentThread = Thread.currentThread(); Thread currentThread = Thread.currentThread();
m.checkNotNullExpressionValue(currentThread, "Thread.currentThread()"); m.checkNotNullExpressionValue(currentThread, "Thread.currentThread()");
this.j = currentThread.getId(); this.j = currentThread.getId();
this.k = new c.a.q.k0.c(context, new c()); ContentResolver contentResolver = context.getContentResolver();
this.l = new c.a.q.k0.a(context, new b()); m.checkNotNullExpressionValue(contentResolver, "context.contentResolver");
this.k = contentResolver;
this.l = new c.a.q.k0.c(context, new c());
this.m = new c.a.q.k0.a(context, new b());
new Handler(Looper.getMainLooper()).post(new a(this)); new Handler(Looper.getMainLooper()).post(new a(this));
this.n = BluetoothScoState.INVALID; this.o = BluetoothScoState.INVALID;
List<AudioDevice> listOf = n.listOf((Object[]) new AudioDevice[]{new AudioDevice(DeviceTypes.SPEAKERPHONE, false, null, null, 14), new AudioDevice(DeviceTypes.WIRED_HEADSET, false, null, null, 14), new AudioDevice(DeviceTypes.EARPIECE, false, null, null, 14), new AudioDevice(DeviceTypes.BLUETOOTH_HEADSET, false, null, null, 14)}); List<AudioDevice> listOf = n.listOf((Object[]) new AudioDevice[]{new AudioDevice(DeviceTypes.SPEAKERPHONE, false, null, null, 14), new AudioDevice(DeviceTypes.WIRED_HEADSET, false, null, null, 14), new AudioDevice(DeviceTypes.EARPIECE, false, null, null, 14), new AudioDevice(DeviceTypes.BLUETOOTH_HEADSET, false, null, null, 14)});
ArrayList arrayList = new ArrayList(); ArrayList arrayList = new ArrayList();
for (AudioDevice audioDevice2 : listOf) { for (AudioDevice audioDevice2 : listOf) {
@ -574,13 +586,15 @@ public final class DiscordAudioManager {
arrayList.add(audioDevice); arrayList.add(audioDevice);
} }
} }
this.q = arrayList; this.r = arrayList;
this.r = new SerializedSubject<>(BehaviorSubject.l0(arrayList)); this.f2128s = new SerializedSubject<>(BehaviorSubject.l0(arrayList));
DeviceTypes deviceTypes = DeviceTypes.INVALID; DeviceTypes deviceTypes = DeviceTypes.INVALID;
this.f2128s = deviceTypes; this.t = deviceTypes;
this.t = new SerializedSubject<>(BehaviorSubject.l0(deviceTypes)); this.u = new SerializedSubject<>(BehaviorSubject.l0(deviceTypes));
this.u = DeviceTypes.DEFAULT; this.f2129x = this.e.getStreamMaxVolume(3);
this.f2130y = f2127c; this.f2130y = new SerializedSubject<>(BehaviorSubject.l0(Integer.valueOf(this.w)));
this.f2131z = DeviceTypes.DEFAULT;
this.D = f2127c;
} }
public static final DiscordAudioManager d() { public static final DiscordAudioManager d() {
@ -595,7 +609,7 @@ public final class DiscordAudioManager {
Object obj; Object obj;
DeviceTypes deviceTypes; DeviceTypes deviceTypes;
synchronized (this.i) { synchronized (this.i) {
List<? extends DeviceTypes> list2 = this.f2130y; List<? extends DeviceTypes> list2 = this.D;
ListIterator<? extends DeviceTypes> listIterator = list2.listIterator(list2.size()); ListIterator<? extends DeviceTypes> listIterator = list2.listIterator(list2.size());
while (true) { while (true) {
if (!listIterator.hasPrevious()) { if (!listIterator.hasPrevious()) {
@ -621,7 +635,7 @@ public final class DiscordAudioManager {
boolean z3; boolean z3;
synchronized (this.i) { synchronized (this.i) {
z2 = true; z2 = true;
z3 = !this.f2131z; z3 = !this.E;
} }
if (z3) { if (z3) {
AnimatableValueParser.H1("DiscordAudioManager", "Unable to activate audio output outside Discord-requested communication mode"); AnimatableValueParser.H1("DiscordAudioManager", "Unable to activate audio output outside Discord-requested communication mode");
@ -639,8 +653,8 @@ public final class DiscordAudioManager {
this.e.setSpeakerphoneOn(z2); this.e.setSpeakerphoneOn(z2);
} }
synchronized (this.i) { synchronized (this.i) {
this.f2128s = deviceTypes; this.t = deviceTypes;
this.t.j.onNext(deviceTypes); this.u.j.onNext(deviceTypes);
} }
AnimatableValueParser.D1("DiscordAudioManager", "Activated device: " + deviceTypes); AnimatableValueParser.D1("DiscordAudioManager", "Activated device: " + deviceTypes);
} }
@ -671,7 +685,7 @@ public final class DiscordAudioManager {
AnimatableValueParser.H1("DiscordAudioManager", "refreshBluetoothHeadset() requires BLUETOOTH permission"); AnimatableValueParser.H1("DiscordAudioManager", "refreshBluetoothHeadset() requires BLUETOOTH permission");
return; return;
} }
BluetoothHeadset bluetoothHeadset = this.m; BluetoothHeadset bluetoothHeadset = this.n;
if (bluetoothHeadset == null || (list = bluetoothHeadset.getConnectedDevices()) == null) { if (bluetoothHeadset == null || (list = bluetoothHeadset.getConnectedDevices()) == null) {
list = n.emptyList(); list = n.emptyList();
} }
@ -683,7 +697,7 @@ public final class DiscordAudioManager {
} }
obj = it.next(); obj = it.next();
BluetoothDevice bluetoothDevice2 = (BluetoothDevice) obj; BluetoothDevice bluetoothDevice2 = (BluetoothDevice) obj;
BluetoothHeadset bluetoothHeadset2 = this.m; BluetoothHeadset bluetoothHeadset2 = this.n;
if (bluetoothHeadset2 != null) { if (bluetoothHeadset2 != null) {
z3 = bluetoothHeadset2.isAudioConnected(bluetoothDevice2); z3 = bluetoothHeadset2.isAudioConnected(bluetoothDevice2);
continue; continue;
@ -696,7 +710,7 @@ public final class DiscordAudioManager {
} }
} }
BluetoothDevice bluetoothDevice3 = (BluetoothDevice) obj; BluetoothDevice bluetoothDevice3 = (BluetoothDevice) obj;
BluetoothHeadset bluetoothHeadset3 = this.m; BluetoothHeadset bluetoothHeadset3 = this.n;
if (bluetoothHeadset3 != null) { if (bluetoothHeadset3 != null) {
c.a.q.k0.d dVar = c.a.q.k0.d.f212c; c.a.q.k0.d dVar = c.a.q.k0.d.f212c;
m.checkNotNullParameter(bluetoothHeadset3, "headsetProfile"); m.checkNotNullParameter(bluetoothHeadset3, "headsetProfile");
@ -721,13 +735,13 @@ public final class DiscordAudioManager {
if (adapter.isEnabled() && profileConnectionState == 2) { if (adapter.isEnabled() && profileConnectionState == 2) {
z2 = true; z2 = true;
synchronized (this.i) { synchronized (this.i) {
List<AudioDevice> list2 = this.q; List<AudioDevice> list2 = this.r;
ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list2, 10)); ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list2, 10));
for (AudioDevice audioDevice : list2) { for (AudioDevice audioDevice : list2) {
arrayList.add(audioDevice.a.ordinal() != 5 ? AudioDevice.a(audioDevice, null, false, null, null, 15) : AudioDevice.a(audioDevice, null, (!this.f2131z || this.f2128s != DeviceTypes.BLUETOOTH_HEADSET) ? z2 : bluetoothDevice3 != null, bluetoothDevice3 != null ? bluetoothDevice3.getAddress() : null, bluetoothDevice3 != null ? bluetoothDevice3.getName() : null, 1)); arrayList.add(audioDevice.a.ordinal() != 5 ? AudioDevice.a(audioDevice, null, false, null, null, 15) : AudioDevice.a(audioDevice, null, (!this.E || this.t != DeviceTypes.BLUETOOTH_HEADSET) ? z2 : bluetoothDevice3 != null, bluetoothDevice3 != null ? bluetoothDevice3.getAddress() : null, bluetoothDevice3 != null ? bluetoothDevice3.getName() : null, 1));
} }
this.q = arrayList; this.r = arrayList;
this.r.j.onNext(arrayList); this.f2128s.j.onNext(arrayList);
} }
return; return;
} }
@ -747,41 +761,50 @@ public final class DiscordAudioManager {
} }
} }
/* JADX WARNING: Code restructure failed: missing block: B:15:0x0076, code lost: /* JADX WARNING: Code restructure failed: missing block: B:18:0x0090, code lost:
if (r6.e.requestAudioFocus(r7) == 1) goto L_0x0081; if (r6.e.requestAudioFocus(r7) == 1) goto L_0x009b;
*/ */
/* JADX WARNING: Code restructure failed: missing block: B:17:0x007f, code lost: /* JADX WARNING: Code restructure failed: missing block: B:20:0x0099, code lost:
if (r6.e.requestAudioFocus(r3, 0, 1) == 1) goto L_0x0081; if (r6.e.requestAudioFocus(r1, 0, 1) == 1) goto L_0x009b;
*/ */
/* JADX WARNING: Code restructure failed: missing block: B:41:0x00bf, code lost: /* JADX WARNING: Code restructure failed: missing block: B:49:0x00e6, code lost:
if (r6.e.abandonAudioFocusRequest(r0) == 1) goto L_0x00d5; if (r6.e.abandonAudioFocusRequest(r0) == 1) goto L_0x00fc;
*/ */
/* JADX WARNING: Code restructure failed: missing block: B:52:0x00d3, code lost: /* JADX WARNING: Code restructure failed: missing block: B:60:0x00fa, code lost:
if (r6.e.abandonAudioFocus(r0) == 1) goto L_0x00d5; if (r6.e.abandonAudioFocus(r0) == 1) goto L_0x00fc;
*/ */
/* JADX WARNING: Removed duplicated region for block: B:55:0x00d8 */ /* JADX WARNING: Removed duplicated region for block: B:63:0x00ff */
/* JADX WARNING: Removed duplicated region for block: B:56:0x00e0 */ /* JADX WARNING: Removed duplicated region for block: B:64:0x0107 */
/* JADX WARNING: Removed duplicated region for block: B:60:0x00f4 */ /* JADX WARNING: Removed duplicated region for block: B:68:0x011b */
/* JADX WARNING: Removed duplicated region for block: B:63:0x0104 */ /* JADX WARNING: Removed duplicated region for block: B:71:0x012b */
/* JADX WARNING: Removed duplicated region for block: B:66:0x010d */ /* JADX WARNING: Removed duplicated region for block: B:74:0x0134 */
/* JADX WARNING: Removed duplicated region for block: B:75:? A[RETURN, SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:83:? A[RETURN, SYNTHETIC] */
public final void h(boolean z2) { public final void h(boolean z2) {
boolean z3; boolean z3;
boolean z4; boolean z4;
AudioFocusRequest audioFocusRequest; AudioFocusRequest audioFocusRequest;
ContentResolver contentResolver;
c(); c();
if (!e().b) { if (!e().b) {
AnimatableValueParser.H1("DiscordAudioManager", "MODIFY_AUDIO_SETTINGS is missing. Client will run with reduced functionality"); AnimatableValueParser.H1("DiscordAudioManager", "MODIFY_AUDIO_SETTINGS is missing. Client will run with reduced functionality");
return; return;
} }
Handler handler = null;
boolean z5 = false; boolean z5 = false;
if (z2) { if (z2) {
this.v = this.e.isSpeakerphoneOn(); Looper myLooper = Looper.myLooper();
this.w = this.e.isMicrophoneMute(); if (myLooper != null) {
this.f2129x = this.e.isBluetoothScoOn(); handler = new Handler(myLooper);
}
f fVar = new f(this, handler);
this.k.registerContentObserver(Settings.System.CONTENT_URI, true, fVar);
this.v = fVar;
this.A = this.e.isSpeakerphoneOn();
this.B = this.e.isMicrophoneMute();
this.C = this.e.isBluetoothScoOn();
i(true); i(true);
synchronized (this.i) { synchronized (this.i) {
AudioManager.OnAudioFocusChangeListener onAudioFocusChangeListener = this.o; AudioManager.OnAudioFocusChangeListener onAudioFocusChangeListener = this.p;
if (onAudioFocusChangeListener != null) { if (onAudioFocusChangeListener != null) {
if (Build.VERSION.SDK_INT >= 26) { if (Build.VERSION.SDK_INT >= 26) {
AudioFocusRequest.Builder builder = new AudioFocusRequest.Builder(1); AudioFocusRequest.Builder builder = new AudioFocusRequest.Builder(1);
@ -789,12 +812,12 @@ public final class DiscordAudioManager {
builder2.setUsage(2); builder2.setUsage(2);
builder2.setContentType(1); builder2.setContentType(1);
builder.setAcceptsDelayedFocusGain(true); builder.setAcceptsDelayedFocusGain(true);
Looper myLooper = Looper.myLooper(); Looper myLooper2 = Looper.myLooper();
m.checkNotNull(myLooper); m.checkNotNull(myLooper2);
builder.setOnAudioFocusChangeListener(onAudioFocusChangeListener, new Handler(myLooper)); builder.setOnAudioFocusChangeListener(onAudioFocusChangeListener, new Handler(myLooper2));
builder.setAudioAttributes(builder2.build()); builder.setAudioAttributes(builder2.build());
AudioFocusRequest build = builder.build(); AudioFocusRequest build = builder.build();
this.p = build; this.q = build;
} }
z5 = true; z5 = true;
if (z5) { if (z5) {
@ -807,14 +830,19 @@ public final class DiscordAudioManager {
l(); l();
return; return;
} }
ContentObserver contentObserver = this.v;
if (!(contentObserver == null || (contentResolver = this.k) == null)) {
contentResolver.unregisterContentObserver(contentObserver);
}
this.v = null;
b(DeviceTypes.INVALID); b(DeviceTypes.INVALID);
synchronized (this.i) { synchronized (this.i) {
this.u = DeviceTypes.DEFAULT; this.f2131z = DeviceTypes.DEFAULT;
} }
i(false); i(false);
if (Build.VERSION.SDK_INT >= 26) { if (Build.VERSION.SDK_INT >= 26) {
synchronized (this.i) { synchronized (this.i) {
audioFocusRequest = this.p; audioFocusRequest = this.q;
} }
if (audioFocusRequest != null) { if (audioFocusRequest != null) {
} }
@ -823,43 +851,43 @@ public final class DiscordAudioManager {
} else { } else {
AnimatableValueParser.H1("DiscordAudioManager", "Unable to releaseAudioFocus()"); AnimatableValueParser.H1("DiscordAudioManager", "Unable to releaseAudioFocus()");
} }
z3 = this.w; z3 = this.B;
if (this.e.isMicrophoneMute() != z3) { if (this.e.isMicrophoneMute() != z3) {
this.e.setMicrophoneMute(z3); this.e.setMicrophoneMute(z3);
} }
z4 = this.v; z4 = this.A;
if (this.e.isSpeakerphoneOn() != z4) { if (this.e.isSpeakerphoneOn() != z4) {
this.e.setSpeakerphoneOn(z4); this.e.setSpeakerphoneOn(z4);
} }
if (this.f2129x) { if (this.C) {
j(); j();
return; return;
} }
return; return;
} }
synchronized (this.i) { synchronized (this.i) {
AudioManager.OnAudioFocusChangeListener onAudioFocusChangeListener2 = this.o; AudioManager.OnAudioFocusChangeListener onAudioFocusChangeListener2 = this.p;
if (onAudioFocusChangeListener2 != null) { if (onAudioFocusChangeListener2 != null) {
} }
} }
z3 = this.w; z3 = this.B;
if (this.e.isMicrophoneMute() != z3) { if (this.e.isMicrophoneMute() != z3) {
} }
z4 = this.v; z4 = this.A;
if (this.e.isSpeakerphoneOn() != z4) { if (this.e.isSpeakerphoneOn() != z4) {
} }
if (this.f2129x) { if (this.C) {
} }
z5 = true; z5 = true;
if (!z5) { if (!z5) {
} }
z3 = this.w; z3 = this.B;
if (this.e.isMicrophoneMute() != z3) { if (this.e.isMicrophoneMute() != z3) {
} }
z4 = this.v; z4 = this.A;
if (this.e.isSpeakerphoneOn() != z4) { if (this.e.isSpeakerphoneOn() != z4) {
} }
if (this.f2129x) { if (this.C) {
} }
} }
@ -869,36 +897,36 @@ public final class DiscordAudioManager {
} catch (SecurityException unused) { } catch (SecurityException unused) {
} }
synchronized (this.i) { synchronized (this.i) {
this.f2131z = z2; this.E = z2;
} }
} }
public final synchronized void j() { public final synchronized void j() {
BluetoothScoState bluetoothScoState = this.n; BluetoothScoState bluetoothScoState = this.o;
BluetoothScoState bluetoothScoState2 = BluetoothScoState.ON; BluetoothScoState bluetoothScoState2 = BluetoothScoState.ON;
if (bluetoothScoState != bluetoothScoState2) { if (bluetoothScoState != bluetoothScoState2) {
BluetoothScoState bluetoothScoState3 = BluetoothScoState.TURNING_ON; BluetoothScoState bluetoothScoState3 = BluetoothScoState.TURNING_ON;
if (bluetoothScoState != bluetoothScoState3) { if (bluetoothScoState != bluetoothScoState3) {
if (this.e.isBluetoothScoOn()) { if (this.e.isBluetoothScoOn()) {
this.n = bluetoothScoState2; this.o = bluetoothScoState2;
return; return;
} }
this.n = bluetoothScoState3; this.o = bluetoothScoState3;
this.e.startBluetoothSco(); this.e.startBluetoothSco();
} }
} }
} }
public final synchronized void k() { public final synchronized void k() {
BluetoothScoState bluetoothScoState = this.n; BluetoothScoState bluetoothScoState = this.o;
if (bluetoothScoState != BluetoothScoState.ON && bluetoothScoState != BluetoothScoState.TURNING_ON) { if (bluetoothScoState != BluetoothScoState.ON && bluetoothScoState != BluetoothScoState.TURNING_ON) {
return; return;
} }
if (!this.e.isBluetoothScoOn()) { if (!this.e.isBluetoothScoOn()) {
this.n = BluetoothScoState.OFF; this.o = BluetoothScoState.OFF;
return; return;
} }
this.n = BluetoothScoState.TURNING_OFF; this.o = BluetoothScoState.TURNING_OFF;
this.e.stopBluetoothSco(); this.e.stopBluetoothSco();
} }
@ -906,11 +934,11 @@ public final class DiscordAudioManager {
DeviceTypes deviceTypes; DeviceTypes deviceTypes;
ArrayList arrayList; ArrayList arrayList;
synchronized (this.i) { synchronized (this.i) {
deviceTypes = this.u; deviceTypes = this.f2131z;
} }
g(); g();
synchronized (this.i) { synchronized (this.i) {
List<AudioDevice> list = this.q; List<AudioDevice> list = this.r;
arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10)); arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10));
for (AudioDevice audioDevice : list) { for (AudioDevice audioDevice : list) {
arrayList.add(AudioDevice.a(audioDevice, null, false, null, null, 15)); arrayList.add(AudioDevice.a(audioDevice, null, false, null, null, 15));

View File

@ -104,6 +104,50 @@ public final class StoreAudioManagerV2$init$1 implements Runnable {
} }
} }
/* compiled from: StoreAudioManagerV2.kt */
/* renamed from: com.discord.stores.StoreAudioManagerV2$init$1$3 reason: invalid class name */
public static final class AnonymousClass3 extends o implements Function1<Integer, Unit> {
public final /* synthetic */ StoreAudioManagerV2$init$1 this$0;
/* compiled from: StoreAudioManagerV2.kt */
/* renamed from: com.discord.stores.StoreAudioManagerV2$init$1$3$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ int $it;
public final /* synthetic */ AnonymousClass3 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(AnonymousClass3 r1, int i) {
super(0);
this.this$0 = r1;
this.$it = i;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreAudioManagerV2.access$updateCurrentMediaVolume(this.this$0.this$0.this$0, this.$it);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass3(StoreAudioManagerV2$init$1 storeAudioManagerV2$init$1) {
super(1);
this.this$0 = storeAudioManagerV2$init$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(Integer num) {
invoke(num.intValue());
return Unit.a;
}
public final void invoke(int i) {
StoreAudioManagerV2.access$getDispatcher$p(this.this$0.this$0).schedule(new AnonymousClass1(this, i));
}
}
public StoreAudioManagerV2$init$1(StoreAudioManagerV2 storeAudioManagerV2) { public StoreAudioManagerV2$init$1(StoreAudioManagerV2 storeAudioManagerV2) {
this.this$0 = storeAudioManagerV2; this.this$0 = storeAudioManagerV2;
} }
@ -111,11 +155,14 @@ public final class StoreAudioManagerV2$init$1 implements Runnable {
@Override // java.lang.Runnable @Override // java.lang.Runnable
public final void run() { public final void run() {
DiscordAudioManager discordAudioManager = DiscordAudioManager.d; DiscordAudioManager discordAudioManager = DiscordAudioManager.d;
Observable<List<DiscordAudioManager.AudioDevice>> r = DiscordAudioManager.d().r.r(); Observable<List<DiscordAudioManager.AudioDevice>> r = DiscordAudioManager.d().f2128s.r();
m.checkNotNullExpressionValue(r, "audioDevicesSubject.distinctUntilChanged()"); m.checkNotNullExpressionValue(r, "audioDevicesSubject.distinctUntilChanged()");
ObservableExtensionsKt.appSubscribe$default(r, this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null); ObservableExtensionsKt.appSubscribe$default(r, this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null);
Observable<DiscordAudioManager.DeviceTypes> r2 = DiscordAudioManager.d().t.r(); Observable<DiscordAudioManager.DeviceTypes> r2 = DiscordAudioManager.d().u.r();
m.checkNotNullExpressionValue(r2, "activeAudioDeviceSubject.distinctUntilChanged()"); m.checkNotNullExpressionValue(r2, "activeAudioDeviceSubject.distinctUntilChanged()");
ObservableExtensionsKt.appSubscribe$default(r2, this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass2(this), 62, (Object) null); ObservableExtensionsKt.appSubscribe$default(r2, this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass2(this), 62, (Object) null);
Observable<Integer> r3 = DiscordAudioManager.d().f2130y.r();
m.checkNotNullExpressionValue(r3, "currentMediaVolumeSubject.distinctUntilChanged()");
ObservableExtensionsKt.appSubscribe$default(r3, this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass3(this), 62, (Object) null);
} }
} }

View File

@ -33,7 +33,7 @@ public final class StoreAudioManagerV2$selectOutputDevice$1 implements Runnable
} }
AnimatableValueParser.D1("DiscordAudioManager", "setDevice(deviceType=" + deviceTypes + ')'); AnimatableValueParser.D1("DiscordAudioManager", "setDevice(deviceType=" + deviceTypes + ')');
synchronized (d.i) { synchronized (d.i) {
List<DiscordAudioManager.AudioDevice> list = d.q; List<DiscordAudioManager.AudioDevice> list = d.r;
arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10)); arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10));
for (DiscordAudioManager.AudioDevice audioDevice : list) { for (DiscordAudioManager.AudioDevice audioDevice : list) {
arrayList.add(DiscordAudioManager.AudioDevice.a(audioDevice, null, false, null, null, 15)); arrayList.add(DiscordAudioManager.AudioDevice.a(audioDevice, null, false, null, null, 15));
@ -42,7 +42,7 @@ public final class StoreAudioManagerV2$selectOutputDevice$1 implements Runnable
DiscordAudioManager.DeviceTypes deviceTypes2 = DiscordAudioManager.DeviceTypes.DEFAULT; DiscordAudioManager.DeviceTypes deviceTypes2 = DiscordAudioManager.DeviceTypes.DEFAULT;
if (deviceTypes == deviceTypes2) { if (deviceTypes == deviceTypes2) {
synchronized (d.i) { synchronized (d.i) {
d.u = deviceTypes2; d.f2131z = deviceTypes2;
} }
d.a(arrayList); d.a(arrayList);
return; return;
@ -57,11 +57,11 @@ public final class StoreAudioManagerV2$selectOutputDevice$1 implements Runnable
} }
if (z2) { if (z2) {
synchronized (d.i) { synchronized (d.i) {
z3 = true ^ d.q.get(deviceTypes.getValue()).b; z3 = true ^ d.r.get(deviceTypes.getValue()).b;
} }
if (!z3) { if (!z3) {
synchronized (d.i) { synchronized (d.i) {
d.u = deviceTypes; d.f2131z = deviceTypes;
} }
d.b(deviceTypes); d.b(deviceTypes);
} }

View File

@ -0,0 +1,30 @@
package com.discord.stores;
import com.airbnb.lottie.parser.AnimatableValueParser;
import com.discord.rtcconnection.audio.DiscordAudioManager;
import d0.a0.a;
/* compiled from: StoreAudioManagerV2.kt */
public final class StoreAudioManagerV2$updateMediaVolume$1 implements Runnable {
public final /* synthetic */ float $ratio;
public StoreAudioManagerV2$updateMediaVolume$1(float f) {
this.$ratio = f;
}
@Override // java.lang.Runnable
public final void run() {
DiscordAudioManager discordAudioManager = DiscordAudioManager.d;
DiscordAudioManager d = DiscordAudioManager.d();
float f = this.$ratio;
d.c();
if (f < 0.0f || f > 1.0f) {
AnimatableValueParser.H1("DiscordAudioManager", "Unexpected media volume ratio: " + f);
return;
}
try {
d.e.setStreamVolume(3, a.roundToInt(f * ((float) d.f2129x)), 0);
} catch (SecurityException e) {
AnimatableValueParser.H1("DiscordAudioManager", "Failed to set stream volume: " + e);
}
}
}

View File

@ -12,6 +12,7 @@ import com.discord.api.voice.state.VoiceState;
import com.discord.rtcconnection.RtcConnection; import com.discord.rtcconnection.RtcConnection;
import com.discord.rtcconnection.audio.DiscordAudioManager; import com.discord.rtcconnection.audio.DiscordAudioManager;
import com.discord.stores.updates.ObservationDeck; import com.discord.stores.updates.ObservationDeck;
import com.discord.utilities.voice.PerceptualVolumeUtils;
import d0.t.h0; import d0.t.h0;
import d0.t.n; import d0.t.n;
import d0.t.o; import d0.t.o;
@ -38,6 +39,7 @@ public final class StoreAudioManagerV2 extends StoreV2 {
private boolean prevMyVideoOn; private boolean prevMyVideoOn;
private State state; private State state;
private State stateSnapshot; private State stateSnapshot;
private final StoreStreamRtcConnection streamRtcConnectionStore;
private final VideoUseDetector videoUseDetector; private final VideoUseDetector videoUseDetector;
private final StoreVoiceChannelSelected voiceChannelSelectedStore; private final StoreVoiceChannelSelected voiceChannelSelectedStore;
@ -239,16 +241,18 @@ public final class StoreAudioManagerV2 extends StoreV2 {
VOICE_ONLY_DEVICE_PRIORITIZATION = n.listOf((Object[]) new DiscordAudioManager.DeviceTypes[]{DiscordAudioManager.DeviceTypes.SPEAKERPHONE, deviceTypes, DiscordAudioManager.DeviceTypes.BLUETOOTH_HEADSET, DiscordAudioManager.DeviceTypes.WIRED_HEADSET}); VOICE_ONLY_DEVICE_PRIORITIZATION = n.listOf((Object[]) new DiscordAudioManager.DeviceTypes[]{DiscordAudioManager.DeviceTypes.SPEAKERPHONE, deviceTypes, DiscordAudioManager.DeviceTypes.BLUETOOTH_HEADSET, DiscordAudioManager.DeviceTypes.WIRED_HEADSET});
} }
public StoreAudioManagerV2(ObservationDeck observationDeck, Dispatcher dispatcher, StoreVoiceChannelSelected storeVoiceChannelSelected, StoreChannels storeChannels, VideoUseDetector videoUseDetector) { public StoreAudioManagerV2(ObservationDeck observationDeck, Dispatcher dispatcher, StoreVoiceChannelSelected storeVoiceChannelSelected, StoreChannels storeChannels, StoreStreamRtcConnection storeStreamRtcConnection, VideoUseDetector videoUseDetector) {
m.checkNotNullParameter(observationDeck, "observationDeck"); m.checkNotNullParameter(observationDeck, "observationDeck");
m.checkNotNullParameter(dispatcher, "dispatcher"); m.checkNotNullParameter(dispatcher, "dispatcher");
m.checkNotNullParameter(storeVoiceChannelSelected, "voiceChannelSelectedStore"); m.checkNotNullParameter(storeVoiceChannelSelected, "voiceChannelSelectedStore");
m.checkNotNullParameter(storeChannels, "channelsStore"); m.checkNotNullParameter(storeChannels, "channelsStore");
m.checkNotNullParameter(storeStreamRtcConnection, "streamRtcConnectionStore");
m.checkNotNullParameter(videoUseDetector, "videoUseDetector"); m.checkNotNullParameter(videoUseDetector, "videoUseDetector");
this.observationDeck = observationDeck; this.observationDeck = observationDeck;
this.dispatcher = dispatcher; this.dispatcher = dispatcher;
this.voiceChannelSelectedStore = storeVoiceChannelSelected; this.voiceChannelSelectedStore = storeVoiceChannelSelected;
this.channelsStore = storeChannels; this.channelsStore = storeChannels;
this.streamRtcConnectionStore = storeStreamRtcConnection;
this.videoUseDetector = videoUseDetector; this.videoUseDetector = videoUseDetector;
State state = new State(null, null, 3, null); State state = new State(null, null, 3, null);
this.state = state; this.state = state;
@ -280,6 +284,10 @@ public final class StoreAudioManagerV2 extends StoreV2 {
storeAudioManagerV2.updateAudioDevices(list); storeAudioManagerV2.updateAudioDevices(list);
} }
public static final /* synthetic */ void access$updateCurrentMediaVolume(StoreAudioManagerV2 storeAudioManagerV2, int i) {
storeAudioManagerV2.updateCurrentMediaVolume(i);
}
private final State getAudioManagerState() { private final State getAudioManagerState() {
return this.stateSnapshot; return this.stateSnapshot;
} }
@ -307,6 +315,12 @@ public final class StoreAudioManagerV2 extends StoreV2 {
markChanged(); markChanged();
} }
@StoreThread
private final void updateCurrentMediaVolume(int i) {
DiscordAudioManager discordAudioManager = DiscordAudioManager.d;
this.streamRtcConnectionStore.updateStreamVolume(PerceptualVolumeUtils.INSTANCE.perceptualToAmplitude((((float) i) / ((float) DiscordAudioManager.d().f2129x)) * 300.0f, 300.0f));
}
public final DiscordAudioManager.AudioDevice getLastActiveAudioDevice$app_productionCanaryRelease() { public final DiscordAudioManager.AudioDevice getLastActiveAudioDevice$app_productionCanaryRelease() {
return this.lastActiveAudioDevice; return this.lastActiveAudioDevice;
} }
@ -325,8 +339,8 @@ public final class StoreAudioManagerV2 extends StoreV2 {
List<DiscordAudioManager.DeviceTypes> list = VOICE_ONLY_DEVICE_PRIORITIZATION; List<DiscordAudioManager.DeviceTypes> list = VOICE_ONLY_DEVICE_PRIORITIZATION;
synchronized (d) { synchronized (d) {
m.checkNotNullParameter(list, "newPrioritization"); m.checkNotNullParameter(list, "newPrioritization");
if (!m.areEqual(list, d.f2130y)) { if (!m.areEqual(list, d.D)) {
d.f2130y = list; d.D = list;
d.l(); d.l();
} }
} }
@ -334,10 +348,10 @@ public final class StoreAudioManagerV2 extends StoreV2 {
DiscordAudioManager discordAudioManager2 = DiscordAudioManager.d; DiscordAudioManager discordAudioManager2 = DiscordAudioManager.d;
DiscordAudioManager d2 = DiscordAudioManager.d(); DiscordAudioManager d2 = DiscordAudioManager.d();
synchronized (d2) { synchronized (d2) {
List<? extends DiscordAudioManager.DeviceTypes> list2 = d2.f2130y; List<? extends DiscordAudioManager.DeviceTypes> list2 = d2.D;
List<DiscordAudioManager.DeviceTypes> list3 = DiscordAudioManager.f2127c; List<DiscordAudioManager.DeviceTypes> list3 = DiscordAudioManager.f2127c;
if (!m.areEqual(list2, list3)) { if (!m.areEqual(list2, list3)) {
d2.f2130y = list3; d2.D = list3;
d2.l(); d2.l();
} }
} }
@ -364,14 +378,14 @@ public final class StoreAudioManagerV2 extends StoreV2 {
DiscordAudioManager discordAudioManager = DiscordAudioManager.d; DiscordAudioManager discordAudioManager = DiscordAudioManager.d;
DiscordAudioManager d = DiscordAudioManager.d(); DiscordAudioManager d = DiscordAudioManager.d();
synchronized (d) { synchronized (d) {
if (d.q.get(DiscordAudioManager.DeviceTypes.EARPIECE.getValue()).b) { if (d.r.get(DiscordAudioManager.DeviceTypes.EARPIECE.getValue()).b) {
List<DiscordAudioManager.AudioDevice> list = d.q; List<DiscordAudioManager.AudioDevice> list = d.r;
ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10)); ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(list, 10));
for (DiscordAudioManager.AudioDevice audioDevice : list) { for (DiscordAudioManager.AudioDevice audioDevice : list) {
arrayList.add(audioDevice.a.ordinal() != 4 ? DiscordAudioManager.AudioDevice.a(audioDevice, null, false, null, null, 15) : DiscordAudioManager.AudioDevice.a(audioDevice, null, false, null, null, 13)); arrayList.add(audioDevice.a.ordinal() != 4 ? DiscordAudioManager.AudioDevice.a(audioDevice, null, false, null, null, 15) : DiscordAudioManager.AudioDevice.a(audioDevice, null, false, null, null, 13));
} }
d.q = arrayList; d.r = arrayList;
d.r.j.onNext(arrayList); d.f2128s.j.onNext(arrayList);
d.l(); d.l();
} }
} }
@ -379,14 +393,14 @@ public final class StoreAudioManagerV2 extends StoreV2 {
DiscordAudioManager discordAudioManager2 = DiscordAudioManager.d; DiscordAudioManager discordAudioManager2 = DiscordAudioManager.d;
DiscordAudioManager d2 = DiscordAudioManager.d(); DiscordAudioManager d2 = DiscordAudioManager.d();
synchronized (d2) { synchronized (d2) {
if (d2.q.get(DiscordAudioManager.DeviceTypes.EARPIECE.getValue()).b != d2.h) { if (d2.r.get(DiscordAudioManager.DeviceTypes.EARPIECE.getValue()).b != d2.h) {
List<DiscordAudioManager.AudioDevice> list2 = d2.q; List<DiscordAudioManager.AudioDevice> list2 = d2.r;
ArrayList arrayList2 = new ArrayList(o.collectionSizeOrDefault(list2, 10)); ArrayList arrayList2 = new ArrayList(o.collectionSizeOrDefault(list2, 10));
for (DiscordAudioManager.AudioDevice audioDevice2 : list2) { for (DiscordAudioManager.AudioDevice audioDevice2 : list2) {
arrayList2.add(audioDevice2.a.ordinal() != 4 ? DiscordAudioManager.AudioDevice.a(audioDevice2, null, false, null, null, 15) : DiscordAudioManager.AudioDevice.a(audioDevice2, null, d2.h, null, null, 13)); arrayList2.add(audioDevice2.a.ordinal() != 4 ? DiscordAudioManager.AudioDevice.a(audioDevice2, null, false, null, null, 15) : DiscordAudioManager.AudioDevice.a(audioDevice2, null, d2.h, null, null, 13));
} }
d2.q = arrayList2; d2.r = arrayList2;
d2.r.j.onNext(arrayList2); d2.f2128s.j.onNext(arrayList2);
d2.l(); d2.l();
} }
} }
@ -441,4 +455,12 @@ public final class StoreAudioManagerV2 extends StoreV2 {
public final void toggleSpeakerOutput() { public final void toggleSpeakerOutput() {
this.dispatcher.schedule(new StoreAudioManagerV2$toggleSpeakerOutput$1(this)); this.dispatcher.schedule(new StoreAudioManagerV2$toggleSpeakerOutput$1(this));
} }
public final void updateMediaVolume(float f) {
Handler handler = this.audioManagerHandler;
if (handler == null) {
m.throwUninitializedPropertyAccessException("audioManagerHandler");
}
handler.post(new StoreAudioManagerV2$updateMediaVolume$1(f));
}
} }

View File

@ -1,75 +1,23 @@
package com.discord.stores; package com.discord.stores;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionDirectoryGuildEntryDelete;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.directory.DirectoryEntry; import com.discord.api.directory.DirectoryEntry;
import com.discord.stores.utilities.RestCallState;
import com.discord.stores.utilities.Success;
import d0.t.n;
import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: StoreDirectories.kt */ /* compiled from: StoreDirectories.kt */
public final class StoreDirectories$removeServerFromDirectory$1 extends o implements Function1<RestCallState<? extends DirectoryEntry>, Unit> { public final class StoreDirectories$removeServerFromDirectory$1 extends o implements Function1<DirectoryEntry, TrackNetworkMetadataReceiver> {
public final /* synthetic */ long $channelId; public final /* synthetic */ long $channelId;
public final /* synthetic */ long $guildId; public final /* synthetic */ long $guildId;
public final /* synthetic */ StoreDirectories this$0;
/* compiled from: StoreDirectories.kt */
/* renamed from: com.discord.stores.StoreDirectories$removeServerFromDirectory$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ StoreDirectories$removeServerFromDirectory$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreDirectories$removeServerFromDirectory$1 storeDirectories$removeServerFromDirectory$1) {
super(0);
this.this$0 = storeDirectories$removeServerFromDirectory$1;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
Map access$getDirectoriesMap$p = StoreDirectories.access$getDirectoriesMap$p(this.this$0.this$0);
Long valueOf = Long.valueOf(this.this$0.$channelId);
RestCallState restCallState = (RestCallState) StoreDirectories.access$getDirectoriesMap$p(this.this$0.this$0).get(Long.valueOf(this.this$0.$channelId));
List list = restCallState != null ? (List) restCallState.invoke() : null;
if (list == null) {
list = n.emptyList();
}
ArrayList arrayList = new ArrayList();
for (Object obj : list) {
if (((DirectoryEntry) obj).c().g() != this.this$0.$guildId) {
arrayList.add(obj);
}
}
access$getDirectoriesMap$p.put(valueOf, new Success(arrayList));
this.this$0.this$0.markChanged();
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreDirectories$removeServerFromDirectory$1(StoreDirectories storeDirectories, long j, long j2) { public StoreDirectories$removeServerFromDirectory$1(long j, long j2) {
super(1); super(1);
this.this$0 = storeDirectories;
this.$channelId = j; this.$channelId = j;
this.$guildId = j2; this.$guildId = j2;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ public final TrackNetworkMetadataReceiver invoke(DirectoryEntry directoryEntry) {
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ return new TrackNetworkActionDirectoryGuildEntryDelete(Long.valueOf(this.$channelId), Long.valueOf(this.$guildId));
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(RestCallState<? extends DirectoryEntry> restCallState) {
invoke((RestCallState<DirectoryEntry>) restCallState);
return Unit.a;
}
public final void invoke(RestCallState<DirectoryEntry> restCallState) {
m.checkNotNullParameter(restCallState, "it");
if (restCallState instanceof Success) {
StoreDirectories.access$getDispatcher$p(this.this$0).schedule(new AnonymousClass1(this));
}
} }
} }

View File

@ -0,0 +1,75 @@
package com.discord.stores;
import com.discord.api.directory.DirectoryEntry;
import com.discord.stores.utilities.RestCallState;
import com.discord.stores.utilities.Success;
import d0.t.n;
import d0.z.d.m;
import d0.z.d.o;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreDirectories.kt */
public final class StoreDirectories$removeServerFromDirectory$2 extends o implements Function1<RestCallState<? extends DirectoryEntry>, Unit> {
public final /* synthetic */ long $channelId;
public final /* synthetic */ long $guildId;
public final /* synthetic */ StoreDirectories this$0;
/* compiled from: StoreDirectories.kt */
/* renamed from: com.discord.stores.StoreDirectories$removeServerFromDirectory$2$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ StoreDirectories$removeServerFromDirectory$2 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreDirectories$removeServerFromDirectory$2 storeDirectories$removeServerFromDirectory$2) {
super(0);
this.this$0 = storeDirectories$removeServerFromDirectory$2;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
Map access$getDirectoriesMap$p = StoreDirectories.access$getDirectoriesMap$p(this.this$0.this$0);
Long valueOf = Long.valueOf(this.this$0.$channelId);
RestCallState restCallState = (RestCallState) StoreDirectories.access$getDirectoriesMap$p(this.this$0.this$0).get(Long.valueOf(this.this$0.$channelId));
List list = restCallState != null ? (List) restCallState.invoke() : null;
if (list == null) {
list = n.emptyList();
}
ArrayList arrayList = new ArrayList();
for (Object obj : list) {
if (((DirectoryEntry) obj).c().g() != this.this$0.$guildId) {
arrayList.add(obj);
}
}
access$getDirectoriesMap$p.put(valueOf, new Success(arrayList));
this.this$0.this$0.markChanged();
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreDirectories$removeServerFromDirectory$2(StoreDirectories storeDirectories, long j, long j2) {
super(1);
this.this$0 = storeDirectories;
this.$channelId = j;
this.$guildId = j2;
}
/* 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(RestCallState<? extends DirectoryEntry> restCallState) {
invoke((RestCallState<DirectoryEntry>) restCallState);
return Unit.a;
}
public final void invoke(RestCallState<DirectoryEntry> restCallState) {
m.checkNotNullParameter(restCallState, "it");
if (restCallState instanceof Success) {
StoreDirectories.access$getDispatcher$p(this.this$0).schedule(new AnonymousClass1(this));
}
}
}

View File

@ -134,7 +134,7 @@ public final class StoreDirectories extends StoreV2 {
} }
public final void removeServerFromDirectory(long j, long j2) { public final void removeServerFromDirectory(long j, long j2) {
RestCallStateKt.executeRequest(this.restApi.removeServerFromHub(j, j2), new StoreDirectories$removeServerFromDirectory$1(this, j, j2)); RestCallStateKt.executeRequest(RestCallStateKt.logNetworkAction(this.restApi.removeServerFromHub(j, j2), StoreDirectories.class, new StoreDirectories$removeServerFromDirectory$1(j, j2)), new StoreDirectories$removeServerFromDirectory$2(this, j, j2));
} }
@Override // com.discord.stores.StoreV2 @Override // com.discord.stores.StoreV2

View File

@ -10,20 +10,20 @@ import kotlin.Unit;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: StoreGuildScheduledEvents.kt */ /* compiled from: StoreGuildScheduledEvents.kt */
public final class StoreGuildScheduledEvents$getGuildScheduledEventUserCounts$1 extends o implements Function1<List<? extends GuildScheduledEvent>, Unit> { public final class StoreGuildScheduledEvents$fetchGuildScheduledEventUserCounts$1 extends o implements Function1<List<? extends GuildScheduledEvent>, Unit> {
public final /* synthetic */ long $guildId; public final /* synthetic */ long $guildId;
public final /* synthetic */ StoreGuildScheduledEvents this$0; public final /* synthetic */ StoreGuildScheduledEvents this$0;
/* compiled from: StoreGuildScheduledEvents.kt */ /* compiled from: StoreGuildScheduledEvents.kt */
/* renamed from: com.discord.stores.StoreGuildScheduledEvents$getGuildScheduledEventUserCounts$1$1 reason: invalid class name */ /* renamed from: com.discord.stores.StoreGuildScheduledEvents$fetchGuildScheduledEventUserCounts$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> { public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ List $events; public final /* synthetic */ List $events;
public final /* synthetic */ StoreGuildScheduledEvents$getGuildScheduledEventUserCounts$1 this$0; public final /* synthetic */ StoreGuildScheduledEvents$fetchGuildScheduledEventUserCounts$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreGuildScheduledEvents$getGuildScheduledEventUserCounts$1 storeGuildScheduledEvents$getGuildScheduledEventUserCounts$1, List list) { public AnonymousClass1(StoreGuildScheduledEvents$fetchGuildScheduledEventUserCounts$1 storeGuildScheduledEvents$fetchGuildScheduledEventUserCounts$1, List list) {
super(0); super(0);
this.this$0 = storeGuildScheduledEvents$getGuildScheduledEventUserCounts$1; this.this$0 = storeGuildScheduledEvents$fetchGuildScheduledEventUserCounts$1;
this.$events = list; this.$events = list;
} }
@ -36,7 +36,7 @@ public final class StoreGuildScheduledEvents$getGuildScheduledEventUserCounts$1
} }
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreGuildScheduledEvents$getGuildScheduledEventUserCounts$1(StoreGuildScheduledEvents storeGuildScheduledEvents, long j) { public StoreGuildScheduledEvents$fetchGuildScheduledEventUserCounts$1(StoreGuildScheduledEvents storeGuildScheduledEvents, long j) {
super(1); super(1);
this.this$0 = storeGuildScheduledEvents; this.this$0 = storeGuildScheduledEvents;
this.$guildId = j; this.$guildId = j;

View File

@ -0,0 +1,63 @@
package com.discord.stores;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import d0.t.h0;
import d0.z.d.m;
import d0.z.d.o;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreGuildScheduledEvents.kt */
public final class StoreGuildScheduledEvents$fetchUserGuildScheduledEvents$1 extends o implements Function1<List<? extends GuildScheduledEvent>, Unit> {
public final /* synthetic */ StoreGuildScheduledEvents this$0;
/* compiled from: StoreGuildScheduledEvents.kt */
/* renamed from: com.discord.stores.StoreGuildScheduledEvents$fetchUserGuildScheduledEvents$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ List $events;
public final /* synthetic */ StoreGuildScheduledEvents$fetchUserGuildScheduledEvents$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreGuildScheduledEvents$fetchUserGuildScheduledEvents$1 storeGuildScheduledEvents$fetchUserGuildScheduledEvents$1, List list) {
super(0);
this.this$0 = storeGuildScheduledEvents$fetchUserGuildScheduledEvents$1;
this.$events = list;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreGuildScheduledEvents.access$getUserGuildScheduledEvents$p(this.this$0.this$0).clear();
HashMap access$getUserGuildScheduledEvents$p = StoreGuildScheduledEvents.access$getUserGuildScheduledEvents$p(this.this$0.this$0);
List<GuildScheduledEvent> list = this.$events;
ArrayList arrayList = new ArrayList(d0.t.o.collectionSizeOrDefault(list, 10));
for (GuildScheduledEvent guildScheduledEvent : list) {
arrayList.add(d0.o.to(Long.valueOf(guildScheduledEvent.e()), guildScheduledEvent));
}
h0.putAll(access$getUserGuildScheduledEvents$p, arrayList);
this.this$0.this$0.markChanged();
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreGuildScheduledEvents$fetchUserGuildScheduledEvents$1(StoreGuildScheduledEvents storeGuildScheduledEvents) {
super(1);
this.this$0 = storeGuildScheduledEvents;
}
/* 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 GuildScheduledEvent> list) {
invoke((List<GuildScheduledEvent>) list);
return Unit.a;
}
public final void invoke(List<GuildScheduledEvent> list) {
m.checkNotNullParameter(list, "events");
StoreGuildScheduledEvents.access$getDispatcher$p(this.this$0).schedule(new AnonymousClass1(this, list));
}
}

View File

@ -1,17 +1,8 @@
package com.discord.stores; package com.discord.stores;
import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.guildscheduledevent.GuildScheduledEventStatus;
import com.discord.api.permission.Permission;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventTiming;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilitiesKt;
import com.discord.utilities.permissions.PermissionUtils;
import d0.t.n;
import d0.z.d.o; import d0.z.d.o;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
/* compiled from: StoreGuildScheduledEvents.kt */ /* compiled from: StoreGuildScheduledEvents.kt */
public final class StoreGuildScheduledEvents$observeGuildScheduledEvents$1 extends o implements Function0<List<? extends GuildScheduledEvent>> { public final class StoreGuildScheduledEvents$observeGuildScheduledEvents$1 extends o implements Function0<List<? extends GuildScheduledEvent>> {
@ -30,49 +21,9 @@ public final class StoreGuildScheduledEvents$observeGuildScheduledEvents$1 exten
} }
/* Return type fixed from 'java.util.List<com.discord.api.guildscheduledevent.GuildScheduledEvent>' to match base method */ /* Return type fixed from 'java.util.List<com.discord.api.guildscheduledevent.GuildScheduledEvent>' to match base method */
/* JADX WARNING: Removed duplicated region for block: B:34:0x0094 A[SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:37:0x005b A[SYNTHETIC] */
@Override // kotlin.jvm.functions.Function0 @Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */ /* renamed from: invoke */
public final List<? extends GuildScheduledEvent> mo1invoke() { public final List<? extends GuildScheduledEvent> mo1invoke() {
boolean z2; return this.this$0.getGuildScheduledEvents(this.$guildId, this.$filterExpired, this.$filterInaccessible);
Map<Long, Long> permissionsByChannel = StoreGuildScheduledEvents.access$getPermissionsStore$p(this.this$0).getPermissionsByChannel();
List list = (List) StoreGuildScheduledEvents.access$getGuildScheduledEventsSnapshot$p(this.this$0).get(Long.valueOf(this.$guildId));
if (list == null) {
return n.emptyList();
}
ArrayList arrayList = new ArrayList();
Iterator it = list.iterator();
while (true) {
boolean z3 = true;
if (!it.hasNext()) {
break;
}
Object next = it.next();
GuildScheduledEvent guildScheduledEvent = (GuildScheduledEvent) next;
if (this.$filterExpired && GuildScheduledEventUtilitiesKt.getEventTiming(guildScheduledEvent) == GuildScheduledEventTiming.EXPIRED && guildScheduledEvent.h() != GuildScheduledEventStatus.ACTIVE) {
z3 = false;
}
if (z3) {
arrayList.add(next);
}
}
ArrayList arrayList2 = new ArrayList();
for (Object obj : arrayList) {
GuildScheduledEvent guildScheduledEvent2 = (GuildScheduledEvent) obj;
if (this.$filterInaccessible) {
Long l = permissionsByChannel.get(Long.valueOf(guildScheduledEvent2.b()));
if (!(l != null ? PermissionUtils.can(Permission.VIEW_CHANNEL, Long.valueOf(l.longValue())) : false)) {
z2 = false;
if (!z2) {
arrayList2.add(obj);
}
}
}
z2 = true;
if (!z2) {
}
}
return arrayList2;
} }
} }

View File

@ -1,105 +0,0 @@
package com.discord.stores;
import android.content.Context;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.stores.updates.ObservationDeck;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.t.h0;
import d0.z.d.m;
import d0.z.d.o;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import rx.Observable;
import rx.functions.Func0;
/* compiled from: StoreGuildScheduledEvents.kt */
public final class StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1<R> implements Func0<Observable<Map<Long, ? extends GuildScheduledEvent>>> {
public final /* synthetic */ StoreGuildScheduledEvents this$0;
/* compiled from: StoreGuildScheduledEvents.kt */
/* renamed from: com.discord.stores.StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<List<? extends GuildScheduledEvent>, Unit> {
public final /* synthetic */ StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1 this$0;
/* compiled from: StoreGuildScheduledEvents.kt */
/* renamed from: com.discord.stores.StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ List $events;
public final /* synthetic */ AnonymousClass1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(AnonymousClass1 r1, List list) {
super(0);
this.this$0 = r1;
this.$events = list;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreGuildScheduledEvents.access$getUserGuildScheduledEvents$p(this.this$0.this$0.this$0).clear();
HashMap access$getUserGuildScheduledEvents$p = StoreGuildScheduledEvents.access$getUserGuildScheduledEvents$p(this.this$0.this$0.this$0);
List<GuildScheduledEvent> list = this.$events;
ArrayList arrayList = new ArrayList(d0.t.o.collectionSizeOrDefault(list, 10));
for (GuildScheduledEvent guildScheduledEvent : list) {
arrayList.add(d0.o.to(Long.valueOf(guildScheduledEvent.e()), guildScheduledEvent));
}
h0.putAll(access$getUserGuildScheduledEvents$p, arrayList);
this.this$0.this$0.this$0.markChanged();
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1 storeGuildScheduledEvents$observeUserGuildScheduledEvents$1) {
super(1);
this.this$0 = storeGuildScheduledEvents$observeUserGuildScheduledEvents$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 GuildScheduledEvent> list) {
invoke((List<GuildScheduledEvent>) list);
return Unit.a;
}
public final void invoke(List<GuildScheduledEvent> list) {
m.checkNotNullParameter(list, "events");
StoreGuildScheduledEvents.access$getDispatcher$p(this.this$0.this$0).schedule(new AnonymousClass1(this, list));
}
}
/* compiled from: StoreGuildScheduledEvents.kt */
/* renamed from: com.discord.stores.StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function0<Map<Long, ? extends GuildScheduledEvent>> {
public final /* synthetic */ StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1 storeGuildScheduledEvents$observeUserGuildScheduledEvents$1) {
super(0);
this.this$0 = storeGuildScheduledEvents$observeUserGuildScheduledEvents$1;
}
/* Return type fixed from 'java.util.Map<java.lang.Long, com.discord.api.guildscheduledevent.GuildScheduledEvent>' to match base method */
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final Map<Long, ? extends GuildScheduledEvent> mo1invoke() {
return StoreGuildScheduledEvents.access$getUserGuildScheduledEventsSnapshot$p(this.this$0.this$0);
}
}
public StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1(StoreGuildScheduledEvents storeGuildScheduledEvents) {
this.this$0 = storeGuildScheduledEvents;
}
@Override // rx.functions.Func0, java.util.concurrent.Callable
public final Observable<Map<Long, GuildScheduledEvent>> call() {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().getUserGuildScheduledEvents(), false, 1, null), this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null);
return ObservationDeck.connectRx$default(StoreGuildScheduledEvents.access$getObservationDeck$p(this.this$0), new ObservationDeck.UpdateSource[]{this.this$0}, false, null, null, new AnonymousClass2(this), 14, null);
}
}

View File

@ -3,15 +3,21 @@ package com.discord.stores;
import android.content.Context; import android.content.Context;
import com.discord.api.guild.Guild; import com.discord.api.guild.Guild;
import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.guildscheduledevent.GuildScheduledEventStatus;
import com.discord.api.guildscheduledevent.GuildScheduledEventUserUpdate; import com.discord.api.guildscheduledevent.GuildScheduledEventUserUpdate;
import com.discord.api.permission.Permission;
import com.discord.models.domain.ModelPayload; import com.discord.models.domain.ModelPayload;
import com.discord.stores.updates.ObservationDeck; import com.discord.stores.updates.ObservationDeck;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventTiming;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilitiesKt;
import com.discord.utilities.permissions.PermissionUtils;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.t.h0; import d0.t.h0;
import d0.t.n; import d0.t.n;
import d0.t.o; import d0.t.o;
import d0.z.d.m; import d0.z.d.m;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
@ -56,18 +62,6 @@ public final class StoreGuildScheduledEvents extends StoreV2 {
return storeGuildScheduledEvents.guildScheduledEvents; return storeGuildScheduledEvents.guildScheduledEvents;
} }
public static final /* synthetic */ Map access$getGuildScheduledEventsSnapshot$p(StoreGuildScheduledEvents storeGuildScheduledEvents) {
return storeGuildScheduledEvents.guildScheduledEventsSnapshot;
}
public static final /* synthetic */ ObservationDeck access$getObservationDeck$p(StoreGuildScheduledEvents storeGuildScheduledEvents) {
return storeGuildScheduledEvents.observationDeck;
}
public static final /* synthetic */ StorePermissions access$getPermissionsStore$p(StoreGuildScheduledEvents storeGuildScheduledEvents) {
return storeGuildScheduledEvents.permissionsStore;
}
public static final /* synthetic */ HashSet access$getRsvpsAwaitingNetwork$p(StoreGuildScheduledEvents storeGuildScheduledEvents) { public static final /* synthetic */ HashSet access$getRsvpsAwaitingNetwork$p(StoreGuildScheduledEvents storeGuildScheduledEvents) {
return storeGuildScheduledEvents.rsvpsAwaitingNetwork; return storeGuildScheduledEvents.rsvpsAwaitingNetwork;
} }
@ -76,18 +70,6 @@ public final class StoreGuildScheduledEvents extends StoreV2 {
return storeGuildScheduledEvents.userGuildScheduledEvents; return storeGuildScheduledEvents.userGuildScheduledEvents;
} }
public static final /* synthetic */ Map access$getUserGuildScheduledEventsSnapshot$p(StoreGuildScheduledEvents storeGuildScheduledEvents) {
return storeGuildScheduledEvents.userGuildScheduledEventsSnapshot;
}
public static final /* synthetic */ void access$setGuildScheduledEventsSnapshot$p(StoreGuildScheduledEvents storeGuildScheduledEvents, Map map) {
storeGuildScheduledEvents.guildScheduledEventsSnapshot = map;
}
public static final /* synthetic */ void access$setUserGuildScheduledEventsSnapshot$p(StoreGuildScheduledEvents storeGuildScheduledEvents, Map map) {
storeGuildScheduledEvents.userGuildScheduledEventsSnapshot = map;
}
private final GuildScheduledEvent findEventFromStore(GuildScheduledEvent guildScheduledEvent) { private final GuildScheduledEvent findEventFromStore(GuildScheduledEvent guildScheduledEvent) {
GuildScheduledEvent findEventFromStore = findEventFromStore(guildScheduledEvent.e(), Long.valueOf(guildScheduledEvent.d())); GuildScheduledEvent findEventFromStore = findEventFromStore(guildScheduledEvent.e(), Long.valueOf(guildScheduledEvent.d()));
return findEventFromStore != null ? findEventFromStore : guildScheduledEvent; return findEventFromStore != null ? findEventFromStore : guildScheduledEvent;
@ -100,6 +82,16 @@ public final class StoreGuildScheduledEvents extends StoreV2 {
return storeGuildScheduledEvents.findEventFromStore(j, l); return storeGuildScheduledEvents.findEventFromStore(j, l);
} }
public static /* synthetic */ List getGuildScheduledEvents$default(StoreGuildScheduledEvents storeGuildScheduledEvents, long j, boolean z2, boolean z3, int i, Object obj) {
if ((i & 2) != 0) {
z2 = true;
}
if ((i & 4) != 0) {
z3 = true;
}
return storeGuildScheduledEvents.getGuildScheduledEvents(j, z2, z3);
}
public static /* synthetic */ Observable observeGuildScheduledEvents$default(StoreGuildScheduledEvents storeGuildScheduledEvents, long j, boolean z2, boolean z3, int i, Object obj) { public static /* synthetic */ Observable observeGuildScheduledEvents$default(StoreGuildScheduledEvents storeGuildScheduledEvents, long j, boolean z2, boolean z3, int i, Object obj) {
if ((i & 2) != 0) { if ((i & 2) != 0) {
z2 = true; z2 = true;
@ -274,6 +266,17 @@ public final class StoreGuildScheduledEvents extends StoreV2 {
markChanged(); markChanged();
} }
public final void fetchGuildScheduledEventUserCounts(long j) {
List list = (List) this.guildScheduledEventsSnapshot.get(Long.valueOf(j));
if (list != null && (!list.isEmpty())) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().getGuildScheduledEvents(j, true), false, 1, null), StoreGuildScheduledEvents.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new StoreGuildScheduledEvents$fetchGuildScheduledEventUserCounts$1(this, j), 62, (Object) null);
}
}
public final void fetchUserGuildScheduledEvents() {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().getUserGuildScheduledEvents(), false, 1, null), StoreGuildScheduledEvents.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new StoreGuildScheduledEvents$fetchUserGuildScheduledEvents$1(this), 62, (Object) null);
}
/* JADX WARNING: Code restructure failed: missing block: B:15:0x003b, code lost: /* JADX WARNING: Code restructure failed: missing block: B:15:0x003b, code lost:
if (r3 != null) goto L_0x006a; if (r3 != null) goto L_0x006a;
*/ */
@ -331,16 +334,48 @@ public final class StoreGuildScheduledEvents extends StoreV2 {
return guildScheduledEvent != null ? guildScheduledEvent : this.userGuildScheduledEvents.get(Long.valueOf(j)); return guildScheduledEvent != null ? guildScheduledEvent : this.userGuildScheduledEvents.get(Long.valueOf(j));
} }
public final void getGuildScheduledEventUserCounts(long j) { /* JADX WARNING: Removed duplicated region for block: B:35:0x0086 A[SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:37:0x004f A[SYNTHETIC] */
public final List<GuildScheduledEvent> getGuildScheduledEvents(long j, boolean z2, boolean z3) {
boolean z4;
Map<Long, Long> permissionsByChannel = this.permissionsStore.getPermissionsByChannel();
List list = (List) this.guildScheduledEventsSnapshot.get(Long.valueOf(j)); List list = (List) this.guildScheduledEventsSnapshot.get(Long.valueOf(j));
if (list != null && (!list.isEmpty())) { if (list == null) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().getGuildScheduledEvents(j, true), false, 1, null), StoreGuildScheduledEvents.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new StoreGuildScheduledEvents$getGuildScheduledEventUserCounts$1(this, j), 62, (Object) null); return n.emptyList();
} }
} ArrayList arrayList = new ArrayList();
Iterator it = list.iterator();
public final List<GuildScheduledEvent> getGuildScheduledEvents(long j) { while (true) {
List<GuildScheduledEvent> list = (List) this.guildScheduledEventsSnapshot.get(Long.valueOf(j)); boolean z5 = true;
return list != null ? list : n.emptyList(); if (!it.hasNext()) {
break;
}
Object next = it.next();
GuildScheduledEvent guildScheduledEvent = (GuildScheduledEvent) next;
if (z2 && GuildScheduledEventUtilitiesKt.getEventTiming(guildScheduledEvent) == GuildScheduledEventTiming.EXPIRED && guildScheduledEvent.h() != GuildScheduledEventStatus.ACTIVE) {
z5 = false;
}
if (z5) {
arrayList.add(next);
}
}
ArrayList arrayList2 = new ArrayList();
for (Object obj : arrayList) {
GuildScheduledEvent guildScheduledEvent2 = (GuildScheduledEvent) obj;
if (z3) {
Long l = permissionsByChannel.get(Long.valueOf(guildScheduledEvent2.b()));
if (!(l != null ? PermissionUtils.can(Permission.VIEW_CHANNEL, Long.valueOf(l.longValue())) : false)) {
z4 = false;
if (!z4) {
arrayList2.add(obj);
}
}
}
z4 = true;
if (!z4) {
}
}
return arrayList2;
} }
public final Map<Long, GuildScheduledEvent> getUserGuildScheduledEvents() { public final Map<Long, GuildScheduledEvent> getUserGuildScheduledEvents() {
@ -441,12 +476,6 @@ public final class StoreGuildScheduledEvents extends StoreV2 {
return ObservationDeck.connectRx$default(this.observationDeck, new ObservationDeck.UpdateSource[]{this}, false, null, null, new StoreGuildScheduledEvents$observeGuildScheduledEvents$1(this, j, z2, z3), 14, null); return ObservationDeck.connectRx$default(this.observationDeck, new ObservationDeck.UpdateSource[]{this}, false, null, null, new StoreGuildScheduledEvents$observeGuildScheduledEvents$1(this, j, z2, z3), 14, null);
} }
public final Observable<Map<Long, GuildScheduledEvent>> observeUserGuildScheduledEvents() {
Observable<Map<Long, GuildScheduledEvent>> p = Observable.p(new StoreGuildScheduledEvents$observeUserGuildScheduledEvents$1(this));
m.checkNotNullExpressionValue(p, "Observable.defer {\n …ntsSnapshot\n }\n }");
return p;
}
@Override // com.discord.stores.StoreV2 @Override // com.discord.stores.StoreV2
public void snapshotData() { public void snapshotData() {
super.snapshotData(); super.snapshotData();

View File

@ -923,7 +923,7 @@ public final class StoreStream {
this.mfa = new StoreMFA(this, this.dispatcher, ObservationDeckProvider.get()); this.mfa = new StoreMFA(this, this.dispatcher, ObservationDeckProvider.get());
StoreStreamRtcConnection storeStreamRtcConnection = new StoreStreamRtcConnection(storeMediaEngine, this.users, this, this.dispatcher, this.clock, this.analytics, storeRtcConnection, null, null, null, 896, null); StoreStreamRtcConnection storeStreamRtcConnection = new StoreStreamRtcConnection(storeMediaEngine, this.users, this, this.dispatcher, this.clock, this.analytics, storeRtcConnection, null, null, null, 896, null);
this.streamRtcConnection = storeStreamRtcConnection; this.streamRtcConnection = storeStreamRtcConnection;
StoreAudioManagerV2 storeAudioManagerV2 = new StoreAudioManagerV2(ObservationDeckProvider.get(), this.dispatcher, storeVoiceChannelSelected, this.channels, videoUseDetector); StoreAudioManagerV2 storeAudioManagerV2 = new StoreAudioManagerV2(ObservationDeckProvider.get(), this.dispatcher, storeVoiceChannelSelected, this.channels, storeStreamRtcConnection, videoUseDetector);
this.audioManagerV2 = storeAudioManagerV2; this.audioManagerV2 = storeAudioManagerV2;
StoreApplicationStreamPreviews storeApplicationStreamPreviews = new StoreApplicationStreamPreviews(this.dispatcher, this.clock, null, null, 12, null); StoreApplicationStreamPreviews storeApplicationStreamPreviews = new StoreApplicationStreamPreviews(this.dispatcher, this.clock, null, null, 12, null);
this.applicationStreamPreviews = storeApplicationStreamPreviews; this.applicationStreamPreviews = storeApplicationStreamPreviews;

View File

@ -1,11 +1,13 @@
package com.discord.stores.utilities; package com.discord.stores.utilities;
import com.discord.analytics.generated.traits.TrackNetworkMetadata; import com.discord.analytics.generated.traits.TrackNetworkMetadata;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.utilities.analytics.AnalyticsUtils; import com.discord.utilities.analytics.AnalyticsUtils;
import com.discord.utilities.features.GrowthTeamFeatures; import com.discord.utilities.features.GrowthTeamFeatures;
import d0.z.d.m; import d0.z.d.m;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
import okhttp3.Request; import okhttp3.Request;
import retrofit2.HttpException;
import retrofit2.Response; import retrofit2.Response;
import rx.functions.Action1; import rx.functions.Action1;
/* compiled from: RestCallState.kt */ /* compiled from: RestCallState.kt */
@ -13,9 +15,9 @@ public final class RestCallStateKt$logNetworkAction$1<T> implements Action1<Resp
public final /* synthetic */ Function1 $networkActionProvider; public final /* synthetic */ Function1 $networkActionProvider;
public final /* synthetic */ AnalyticsUtils.Tracker $tracker; public final /* synthetic */ AnalyticsUtils.Tracker $tracker;
public RestCallStateKt$logNetworkAction$1(AnalyticsUtils.Tracker tracker, Function1 function1) { public RestCallStateKt$logNetworkAction$1(Function1 function1, AnalyticsUtils.Tracker tracker) {
this.$tracker = tracker;
this.$networkActionProvider = function1; this.$networkActionProvider = function1;
this.$tracker = tracker;
} }
@Override // rx.functions.Action1 @Override // rx.functions.Action1
@ -24,10 +26,16 @@ public final class RestCallStateKt$logNetworkAction$1<T> implements Action1<Resp
} }
public final void call(Response<T> response) { public final void call(Response<T> response) {
TrackNetworkMetadataReceiver schema;
m.checkNotNullExpressionValue(response, "response"); m.checkNotNullExpressionValue(response, "response");
Request request = RestCallStateKt.getRequest(response); if (response.a()) {
if (GrowthTeamFeatures.INSTANCE.isNetworkActionLoggingEnabled()) { Request request = RestCallStateKt.getRequest(response);
this.$tracker.track(RestCallStateKt.getSchema(this.$networkActionProvider, new TrackNetworkMetadata(request.b.l, request.f2908c, Integer.valueOf(response.a.l), null, null, 24), response.b)); if (GrowthTeamFeatures.INSTANCE.isNetworkActionLoggingEnabled() && (schema = RestCallStateKt.getSchema(this.$networkActionProvider, new TrackNetworkMetadata(request.b.l, request.f2908c, Integer.valueOf(response.a.l), null, null, 24), response.b)) != null) {
this.$tracker.track(schema);
return;
}
return;
} }
throw new HttpException(response);
} }
} }

View File

@ -1,6 +1,7 @@
package com.discord.stores.utilities; package com.discord.stores.utilities;
import com.discord.analytics.generated.traits.TrackNetworkMetadata; import com.discord.analytics.generated.traits.TrackNetworkMetadata;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.utilities.analytics.AnalyticsUtils; import com.discord.utilities.analytics.AnalyticsUtils;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.features.GrowthTeamFeatures; import com.discord.utilities.features.GrowthTeamFeatures;
@ -29,9 +30,10 @@ public final class RestCallStateKt$logNetworkAction$2<T> implements Action1<Thro
} }
/* JADX WARNING: Removed duplicated region for block: B:12:0x006a */ /* JADX WARNING: Removed duplicated region for block: B:12:0x006a */
/* JADX WARNING: Removed duplicated region for block: B:14:? A[RETURN, SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:16:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */
public final void call(Error error) { public final void call(Error error) {
TrackNetworkMetadata trackNetworkMetadata; TrackNetworkMetadata trackNetworkMetadata;
TrackNetworkMetadataReceiver schema$default;
Request request; Request request;
Throwable th = this.$throwable; Throwable th = this.$throwable;
if (th instanceof HttpException) { if (th instanceof HttpException) {
@ -49,28 +51,29 @@ public final class RestCallStateKt$logNetworkAction$2<T> implements Action1<Thro
Error.Response response4 = error.getResponse(); Error.Response response4 = error.getResponse();
m.checkNotNullExpressionValue(response4, "error.response"); m.checkNotNullExpressionValue(response4, "error.response");
trackNetworkMetadata = new TrackNetworkMetadata(str, str2, valueOf, valueOf2, response4.getMessage()); trackNetworkMetadata = new TrackNetworkMetadata(str, str2, valueOf, valueOf2, response4.getMessage());
if (trackNetworkMetadata != null) { if (trackNetworkMetadata == null && (schema$default = RestCallStateKt.getSchema$default(this.this$0.$networkActionProvider, trackNetworkMetadata, null, 4, null)) != null) {
RestCallStateKt$logNetworkAction$2 restCallStateKt$logNetworkAction$2 = this.this$0; this.this$0.$tracker.track(schema$default);
restCallStateKt$logNetworkAction$2.$tracker.track(RestCallStateKt.getSchema$default(restCallStateKt$logNetworkAction$2.$networkActionProvider, trackNetworkMetadata, null, 4, null));
return; return;
} }
return; return;
} }
} else if (th instanceof UnknownHostException) { } else if (th instanceof UnknownHostException) {
trackNetworkMetadata = new TrackNetworkMetadata(null, null, null, null, ((UnknownHostException) th).getLocalizedMessage(), 15); trackNetworkMetadata = new TrackNetworkMetadata(null, null, null, null, ((UnknownHostException) th).getLocalizedMessage(), 15);
if (trackNetworkMetadata != null) { if (trackNetworkMetadata == null) {
return;
} }
return;
} }
trackNetworkMetadata = null; trackNetworkMetadata = null;
if (trackNetworkMetadata != null) { if (trackNetworkMetadata == null) {
} }
} }
} }
public RestCallStateKt$logNetworkAction$2(Class cls, AnalyticsUtils.Tracker tracker, Function1 function1) { public RestCallStateKt$logNetworkAction$2(Class cls, Function1 function1, AnalyticsUtils.Tracker tracker) {
this.$errorClass = cls; this.$errorClass = cls;
this.$tracker = tracker;
this.$networkActionProvider = function1; this.$networkActionProvider = function1;
this.$tracker = tracker;
} }
public final void call(Throwable th) { public final void call(Throwable th) {

View File

@ -33,7 +33,9 @@ public final class RestCallStateKt {
public static final <T> TrackNetworkMetadataReceiver getSchema(Function1<? super T, ? extends TrackNetworkMetadataReceiver> function1, TrackNetworkMetadata trackNetworkMetadata, T t) { public static final <T> TrackNetworkMetadataReceiver getSchema(Function1<? super T, ? extends TrackNetworkMetadataReceiver> function1, TrackNetworkMetadata trackNetworkMetadata, T t) {
m.checkNotNullParameter(function1, "networkActionProvider"); m.checkNotNullParameter(function1, "networkActionProvider");
TrackNetworkMetadataReceiver trackNetworkMetadataReceiver = (TrackNetworkMetadataReceiver) function1.invoke(t); TrackNetworkMetadataReceiver trackNetworkMetadataReceiver = (TrackNetworkMetadataReceiver) function1.invoke(t);
trackNetworkMetadataReceiver.a(trackNetworkMetadata); if (trackNetworkMetadataReceiver != null) {
trackNetworkMetadataReceiver.a(trackNetworkMetadata);
}
return trackNetworkMetadataReceiver; return trackNetworkMetadataReceiver;
} }
@ -77,7 +79,7 @@ public final class RestCallStateKt {
m.checkNotNullParameter(cls, "errorClass"); m.checkNotNullParameter(cls, "errorClass");
m.checkNotNullParameter(function1, "networkActionProvider"); m.checkNotNullParameter(function1, "networkActionProvider");
AnalyticsUtils.Tracker tracker = AnalyticsTracker.INSTANCE.getTracker(); AnalyticsUtils.Tracker tracker = AnalyticsTracker.INSTANCE.getTracker();
Observable<T> observable2 = (Observable<T>) observable.t(new RestCallStateKt$logNetworkAction$1(tracker, function1)).s(new RestCallStateKt$logNetworkAction$2(cls, tracker, function1)).F(RestCallStateKt$logNetworkAction$3.INSTANCE); Observable<T> observable2 = (Observable<T>) observable.t(new RestCallStateKt$logNetworkAction$1(function1, tracker)).s(new RestCallStateKt$logNetworkAction$2(cls, function1, tracker)).F(RestCallStateKt$logNetworkAction$3.INSTANCE);
m.checkNotNullExpressionValue(observable2, "doOnNext { response ->\n …rectly.\n it.body()\n }"); m.checkNotNullExpressionValue(observable2, "doOnNext { response ->\n …rectly.\n it.body()\n }");
return observable2; return observable2;
} }

View File

@ -66,7 +66,7 @@ public final class DirectoryUtilsKt$showServerOptions$1 extends o implements Fun
public final void invoke(int i) { public final void invoke(int i) {
if (i == 0) { if (i == 0) {
j.d(this.$context, WidgetHubDescription.class, new HubDescriptionArgs(this.$directoryEntry.c().g(), this.$channelId, true, this.$hubName, this.$directoryEntry.a(), DirectoryEntryCategory.Companion.findByKey(this.$directoryEntry.d()))); j.d(this.$context, WidgetHubDescription.class, new HubDescriptionArgs(this.$directoryEntry.c().g(), this.$channelId, true, this.$hubName, false, this.$directoryEntry.a(), DirectoryEntryCategory.Companion.findByKey(this.$directoryEntry.d()), 16, null));
} else if (i == 1) { } else if (i == 1) {
d.c cVar = d.j; d.c cVar = d.j;
FragmentManager childFragmentManager = this.$this_showServerOptions.getChildFragmentManager(); FragmentManager childFragmentManager = this.$this_showServerOptions.getChildFragmentManager();

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,7 @@ import com.airbnb.lottie.parser.AnimatableValueParser;
import com.discord.R; import com.discord.R;
import com.discord.api.application.Application; import com.discord.api.application.Application;
import com.discord.api.channel.Channel; import com.discord.api.channel.Channel;
import com.discord.api.guildmember.GuildMember;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType; import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType;
import com.discord.api.message.Message; import com.discord.api.message.Message;
import com.discord.api.message.activity.MessageActivity; import com.discord.api.message.activity.MessageActivity;
@ -93,6 +94,7 @@ public final class NotificationData {
private final Channel channel; private final Channel channel;
private final String guildIcon; private final String guildIcon;
private final long guildId; private final long guildId;
private final String guildMemberAvatar;
private final String guildName; private final String guildName;
private final GuildScheduledEventEntityType guildScheduledEventEntityType; private final GuildScheduledEventEntityType guildScheduledEventEntityType;
private final boolean isGroupConversation; private final boolean isGroupConversation;
@ -318,7 +320,7 @@ public final class NotificationData {
this(new HashMap()); this(new HashMap());
} }
public NotificationData(String str, long j, MessageActivityType messageActivityType, String str2, int i, String str3, Channel channel, List<Long> list, long j2, String str4, Integer num, String str5, int i2, long j3, String str6, String str7, int i3, String str8, long j4, String str9, String str10, Sticker sticker, String str11, String str12, GuildScheduledEventEntityType guildScheduledEventEntityType) { public NotificationData(String str, long j, MessageActivityType messageActivityType, String str2, int i, String str3, Channel channel, List<Long> list, long j2, String str4, Integer num, String str5, String str6, int i2, long j3, String str7, String str8, int i3, String str9, long j4, String str10, String str11, Sticker sticker, String str12, String str13, GuildScheduledEventEntityType guildScheduledEventEntityType) {
m.checkNotNullParameter(str, "type"); m.checkNotNullParameter(str, "type");
m.checkNotNullParameter(channel, "channel"); m.checkNotNullParameter(channel, "channel");
m.checkNotNullParameter(list, "ackChannelIds"); m.checkNotNullParameter(list, "ackChannelIds");
@ -334,17 +336,18 @@ public final class NotificationData {
this.userUsername = str4; this.userUsername = str4;
this.userDiscriminator = num; this.userDiscriminator = num;
this.userAvatar = str5; this.userAvatar = str5;
this.guildMemberAvatar = str6;
this.relationshipType = i2; this.relationshipType = i2;
this.guildName = str6; this.guildName = str7;
this.guildIcon = str7; this.guildIcon = str8;
this.activityType = i3; this.activityType = i3;
this.activityName = str8; this.activityName = str9;
this.applicationId = j4; this.applicationId = j4;
this.applicationName = str9; this.applicationName = str10;
this.applicationIcon = str10; this.applicationIcon = str11;
this.sticker = sticker; this.sticker = sticker;
this.subtitle = str11; this.subtitle = str12;
this.stageInstanceTopic = str12; this.stageInstanceTopic = str13;
this.guildScheduledEventEntityType = guildScheduledEventEntityType; this.guildScheduledEventEntityType = guildScheduledEventEntityType;
Long valueOf = Long.valueOf(j3); Long valueOf = Long.valueOf(j3);
boolean z2 = false; boolean z2 = false;
@ -367,7 +370,7 @@ public final class NotificationData {
/* JADX WARNING: Illegal instructions before constructor call */ /* JADX WARNING: Illegal instructions before constructor call */
public NotificationData(Map<String, String> map) { public NotificationData(Map<String, String> map) {
this(r1, r1, r6, r7, r8, r9, r49, r11, r12, r14, r15, r16, r17, r18, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31); this(r1, r1, r6, r7, r8, r9, r49, r11, r12, r14, r15, r16, r17, r18, r19, r21, r22, r23, r24, r25, r27, r28, r29, r30, r31, r32);
GuildScheduledEventEntityType guildScheduledEventEntityType; GuildScheduledEventEntityType guildScheduledEventEntityType;
Integer intOrNull; Integer intOrNull;
Long longOrNull; Long longOrNull;
@ -407,24 +410,25 @@ public final class NotificationData {
String str13 = map.get("user_discriminator"); String str13 = map.get("user_discriminator");
Integer intOrNull7 = str13 != null ? s.toIntOrNull(str13) : null; Integer intOrNull7 = str13 != null ? s.toIntOrNull(str13) : null;
String str14 = map.get("user_avatar"); String str14 = map.get("user_avatar");
String str15 = map.get(ANALYTICS_REL_TYPE); String str15 = map.get("user_guild_avatar");
int intValue3 = (str15 == null || (intOrNull3 = s.toIntOrNull(str15)) == null) ? -1 : intOrNull3.intValue(); String str16 = map.get(ANALYTICS_REL_TYPE);
String str16 = map.get("guild_id"); int intValue3 = (str16 == null || (intOrNull3 = s.toIntOrNull(str16)) == null) ? -1 : intOrNull3.intValue();
long longValue4 = (str16 == null || (longOrNull2 = s.toLongOrNull(str16)) == null) ? -1 : longOrNull2.longValue(); String str17 = map.get("guild_id");
String str17 = map.get("guild_name"); long longValue4 = (str17 == null || (longOrNull2 = s.toLongOrNull(str17)) == null) ? -1 : longOrNull2.longValue();
String str18 = map.get("guild_icon"); String str18 = map.get("guild_name");
String str19 = map.get(ANALYTICS_ACTIVITY_TYPE); String str19 = map.get("guild_icon");
int intValue4 = (str19 == null || (intOrNull2 = s.toIntOrNull(str19)) == null) ? -1 : intOrNull2.intValue(); String str20 = map.get(ANALYTICS_ACTIVITY_TYPE);
String str20 = map.get(ANALYTICS_ACTIVITY_NAME); int intValue4 = (str20 == null || (intOrNull2 = s.toIntOrNull(str20)) == null) ? -1 : intOrNull2.intValue();
String str21 = map.get(ModelAuditLogEntry.CHANGE_KEY_APPLICATION_ID); String str21 = map.get(ANALYTICS_ACTIVITY_NAME);
long longValue5 = (str21 == null || (longOrNull = s.toLongOrNull(str21)) == null) ? -1 : longOrNull.longValue(); String str22 = map.get(ModelAuditLogEntry.CHANGE_KEY_APPLICATION_ID);
String str22 = map.get("application_name"); long longValue5 = (str22 == null || (longOrNull = s.toLongOrNull(str22)) == null) ? -1 : longOrNull.longValue();
String str23 = map.get("application_icon"); String str23 = map.get("application_name");
String str24 = map.get("application_icon");
Sticker parseFromMessageNotificationJson = StickerUtils.INSTANCE.parseFromMessageNotificationJson(map.get("message")); Sticker parseFromMessageNotificationJson = StickerUtils.INSTANCE.parseFromMessageNotificationJson(map.get("message"));
String str24 = map.get("subtitle"); String str25 = map.get("subtitle");
String str25 = map.get("stage_instance_topic"); String str26 = map.get("stage_instance_topic");
String str26 = map.get("guild_scheduled_event_entity_type"); String str27 = map.get("guild_scheduled_event_entity_type");
if (str26 == null || (intOrNull = s.toIntOrNull(str26)) == null) { if (str27 == null || (intOrNull = s.toIntOrNull(str27)) == null) {
guildScheduledEventEntityType = null; guildScheduledEventEntityType = null;
} else { } else {
GuildScheduledEventEntityType.Companion companion = GuildScheduledEventEntityType.Companion; GuildScheduledEventEntityType.Companion companion = GuildScheduledEventEntityType.Companion;
@ -503,6 +507,10 @@ public final class NotificationData {
return IconUtils.getForGuild$default(Long.valueOf(this.guildId), this.guildIcon, "", false, null, 24, null); return IconUtils.getForGuild$default(Long.valueOf(this.guildId), this.guildIcon, "", false, null, 24, null);
} }
private final String getIconUrlForGuildMember() {
return IconUtils.getForGuildMember$default(IconUtils.INSTANCE, this.guildMemberAvatar, this.guildId, this.userId, null, false, 24, null);
}
public final boolean canDisplayInApp() { public final boolean canDisplayInApp() {
if (m.areEqual(this.type, TYPE_STAGE_INSTANCE_CREATE)) { if (m.areEqual(this.type, TYPE_STAGE_INSTANCE_CREATE)) {
return true; return true;
@ -539,11 +547,13 @@ public final class NotificationData {
Integer intOrNull = (e3 == null || (f = e3.f()) == null) ? null : s.toIntOrNull(f); Integer intOrNull = (e3 == null || (f = e3.f()) == null) ? null : s.toIntOrNull(f);
User e4 = message.e(); User e4 = message.e();
String str2 = (e4 == null || (a = e4.a()) == null || (a2 = a.a()) == null) ? "" : a2; String str2 = (e4 == null || (a = e4.a()) == null || (a2 = a.a()) == null) ? "" : a2;
GuildMember q = message.q();
String b3 = q != null ? q.b() : null;
long j = this.guildId; long j = this.guildId;
String str3 = this.guildName; String str3 = this.guildName;
String str4 = this.guildIcon; String str4 = this.guildIcon;
List<Sticker> A = message.A(); List<Sticker> A = message.A();
return new NotificationData(TYPE_MESSAGE_CREATE, o, b, g, intValue, i, a4, emptyList, i2, str, intOrNull, str2, -1, j, str3, str4, -1, null, -1, null, null, A != null ? (Sticker) u.firstOrNull((List<? extends Object>) A) : null, null, null, null); return new NotificationData(TYPE_MESSAGE_CREATE, o, b, g, intValue, i, a4, emptyList, i2, str, intOrNull, str2, b3, -1, j, str3, str4, -1, null, -1, null, null, A != null ? (Sticker) u.firstOrNull((List<? extends Object>) A) : null, null, null, null);
} }
public final List<Long> getAckChannelIds() { public final List<Long> getAckChannelIds() {
@ -803,6 +813,11 @@ public final class NotificationData {
} }
} }
public final String getIconUrlForAvatar() {
String iconUrlForGuildMember = getIconUrlForGuildMember();
return iconUrlForGuildMember != null ? iconUrlForGuildMember : getIconUrlForUser();
}
public final String getIconUrlForUser() { public final String getIconUrlForUser() {
return IconUtils.getForUser$default(Long.valueOf(this.userId), this.userAvatar, this.userDiscriminator, false, null, 24, null); return IconUtils.getForUser$default(Long.valueOf(this.userId), this.userAvatar, this.userDiscriminator, false, null, 24, null);
} }

View File

@ -180,9 +180,9 @@ public final class NotificationRenderer {
List<NotificationData> extras2 = andUpdate.getExtras(); List<NotificationData> extras2 = andUpdate.getExtras();
ArrayList arrayList = new ArrayList(); ArrayList arrayList = new ArrayList();
for (NotificationData notificationData2 : extras2) { for (NotificationData notificationData2 : extras2) {
String iconUrlForUser = notificationData2.getIconUrlForUser(); String iconUrlForAvatar = notificationData2.getIconUrlForAvatar();
if (iconUrlForUser != null) { if (iconUrlForAvatar != null) {
arrayList.add(iconUrlForUser); arrayList.add(iconUrlForAvatar);
} }
} }
List<String> plus = u.plus((Collection<? extends String>) arrayList, notificationData.getIconUrl()); List<String> plus = u.plus((Collection<? extends String>) arrayList, notificationData.getIconUrl());
@ -218,7 +218,7 @@ public final class NotificationRenderer {
m.checkNotNullExpressionValue(build, "Person.Builder()\n …ey(\"me\")\n .build()"); m.checkNotNullExpressionValue(build, "Person.Builder()\n …ey(\"me\")\n .build()");
NotificationCompat.MessagingStyle groupConversation = new NotificationCompat.MessagingStyle(build).setConversationTitle(notificationData.getConversationTitle(context)).setGroupConversation(notificationData.isGroupConversation()); NotificationCompat.MessagingStyle groupConversation = new NotificationCompat.MessagingStyle(build).setConversationTitle(notificationData.getConversationTitle(context)).setGroupConversation(notificationData.isGroupConversation());
for (NotificationData notificationData2 : list) { for (NotificationData notificationData2 : list) {
Bitmap bitmap = map.get(notificationData2.getIconUrlForUser()); Bitmap bitmap = map.get(notificationData2.getIconUrlForAvatar());
IconCompat createWithBitmap = bitmap != null ? IconCompat.createWithBitmap(bitmap) : null; IconCompat createWithBitmap = bitmap != null ? IconCompat.createWithBitmap(bitmap) : null;
Person build2 = notificationData2.getSender(context).toBuilder().setIcon(createWithBitmap).build(); Person build2 = notificationData2.getSender(context).toBuilder().setIcon(createWithBitmap).build();
m.checkNotNullExpressionValue(build2, "person.toBuilder()\n …(icon)\n .build()"); m.checkNotNullExpressionValue(build2, "person.toBuilder()\n …(icon)\n .build()");

View File

@ -23,7 +23,6 @@ import com.discord.utilities.SnowflakeUtils;
import com.discord.utilities.color.ColorCompat; import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.drawable.DrawableCompat; import com.discord.utilities.drawable.DrawableCompat;
import com.discord.utilities.images.MGImages; import com.discord.utilities.images.MGImages;
import com.discord.utilities.premium.GuildMemberAvatarsFeatureFlag;
import com.discord.utilities.string.StringUtilsKt; import com.discord.utilities.string.StringUtilsKt;
import com.discord.widgets.chat.input.MentionUtilsKt; import com.discord.widgets.chat.input.MentionUtilsKt;
import com.facebook.imagepipeline.request.ImageRequestBuilder; import com.facebook.imagepipeline.request.ImageRequestBuilder;
@ -243,6 +242,10 @@ public final class IconUtils {
return iconUtils.getForGuildMember(guildMember, num, z2); return iconUtils.getForGuildMember(guildMember, num, z2);
} }
public static /* synthetic */ String getForGuildMember$default(IconUtils iconUtils, String str, long j, long j2, Integer num, boolean z2, int i, Object obj) {
return iconUtils.getForGuildMember(str, j, j2, (i & 8) != 0 ? null : num, (i & 16) != 0 ? false : z2);
}
public static /* synthetic */ String getForGuildMemberOrUser$default(IconUtils iconUtils, User user, GuildMember guildMember, Integer num, int i, Object obj) { public static /* synthetic */ String getForGuildMemberOrUser$default(IconUtils iconUtils, User user, GuildMember guildMember, Integer num, int i, Object obj) {
if ((i & 4) != 0) { if ((i & 4) != 0) {
num = null; num = null;
@ -506,7 +509,7 @@ public final class IconUtils {
m.checkNotNullParameter(imageView, "imageView"); m.checkNotNullParameter(imageView, "imageView");
m.checkNotNullParameter(changeDetector, "changeDetector"); m.checkNotNullParameter(changeDetector, "changeDetector");
Integer valueOf = i != R.dimen.avatar_size_unrestricted ? Integer.valueOf(imageView.getResources().getDimensionPixelSize(i)) : null; Integer valueOf = i != R.dimen.avatar_size_unrestricted ? Integer.valueOf(imageView.getResources().getDimensionPixelSize(i)) : null;
setIcon$default(imageView, (guildMember == null || !guildMember.hasAvatar() || !GuildMemberAvatarsFeatureFlag.Companion.getINSTANCE().isEnabled()) ? getForUser$default(l, str2, num, false, valueOf, 8, null) : getForGuildMember$default(INSTANCE, guildMember, valueOf, false, 4, null), valueOf != null ? valueOf.intValue() : 0, valueOf != null ? valueOf.intValue() : 0, false, function1, changeDetector, 16, null); setIcon$default(imageView, (guildMember == null || !guildMember.hasAvatar()) ? getForUser$default(l, str2, num, false, valueOf, 8, null) : getForGuildMember$default(INSTANCE, guildMember, valueOf, false, 4, null), valueOf != null ? valueOf.intValue() : 0, valueOf != null ? valueOf.intValue() : 0, false, function1, changeDetector, 16, null);
imageView.setContentDescription(str); imageView.setContentDescription(str);
} }
@ -657,24 +660,25 @@ public final class IconUtils {
public final String getForGuildMember(GuildMember guildMember, Integer num, boolean z2) { public final String getForGuildMember(GuildMember guildMember, Integer num, boolean z2) {
m.checkNotNullParameter(guildMember, "guildMember"); m.checkNotNullParameter(guildMember, "guildMember");
String avatarHash = guildMember.getAvatarHash(); return getForGuildMember(guildMember.getAvatarHash(), guildMember.getGuildId(), guildMember.getUserId(), num, z2);
if (avatarHash == null || t.isBlank(avatarHash)) { }
public final String getForGuildMember(String str, long j, long j2, Integer num, boolean z2) {
if ((str == null || t.isBlank(str)) || j == 0 || j2 == 0) {
return null; return null;
} }
String imageExtension = getImageExtension(avatarHash, z2); String imageExtension = getImageExtension(str, z2);
StringBuilder L = a.L("https://cdn.discordapp.com/guilds/"); StringBuilder O = a.O("https://cdn.discordapp.com/guilds/", j, "/users/");
L.append(guildMember.getGuildId()); O.append(j2);
L.append("/users/"); O.append("/avatars/");
L.append(guildMember.getUserId()); O.append(str);
L.append("/avatars/"); O.append('.');
L.append(guildMember.getAvatarHash()); O.append(imageExtension);
L.append('.'); return withSize(O.toString(), num);
L.append(imageExtension);
return withSize(L.toString(), num);
} }
public final String getForGuildMemberOrUser(User user, GuildMember guildMember, Integer num) { public final String getForGuildMemberOrUser(User user, GuildMember guildMember, Integer num) {
return (guildMember == null || !guildMember.hasAvatar() || !GuildMemberAvatarsFeatureFlag.Companion.getINSTANCE().isEnabled()) ? getForUser$default(user, false, num, 2, null) : getForGuildMember$default(this, guildMember, num, false, 4, null); return (guildMember == null || !guildMember.hasAvatar()) ? getForUser$default(user, false, num, 2, null) : getForGuildMember$default(this, guildMember, num, false, 4, null);
} }
public final String getForUserBanner(long j, String str, Integer num, boolean z2) { public final String getForUserBanner(long j, String str, Integer num, boolean z2) {

View File

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

View File

@ -1,54 +0,0 @@
package com.discord.utilities.premium;
import com.discord.models.experiments.domain.Experiment;
import com.discord.stores.StoreExperiments;
import com.discord.stores.StoreStream;
import d0.g;
import d0.z.d.m;
import kotlin.Lazy;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: GuildMemberAvatarsFeatureFlag.kt */
public final class GuildMemberAvatarsFeatureFlag {
public static final Companion Companion = new Companion(null);
private static final Lazy INSTANCE$delegate = g.lazy(GuildMemberAvatarsFeatureFlag$Companion$INSTANCE$2.INSTANCE);
private final StoreExperiments storeExperiments;
/* compiled from: GuildMemberAvatarsFeatureFlag.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final GuildMemberAvatarsFeatureFlag getINSTANCE() {
Lazy access$getINSTANCE$cp = GuildMemberAvatarsFeatureFlag.access$getINSTANCE$cp();
Companion companion = GuildMemberAvatarsFeatureFlag.Companion;
return (GuildMemberAvatarsFeatureFlag) access$getINSTANCE$cp.getValue();
}
}
public GuildMemberAvatarsFeatureFlag() {
this(null, 1, null);
}
public GuildMemberAvatarsFeatureFlag(StoreExperiments storeExperiments) {
m.checkNotNullParameter(storeExperiments, "storeExperiments");
this.storeExperiments = storeExperiments;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ GuildMemberAvatarsFeatureFlag(StoreExperiments storeExperiments, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? StoreStream.Companion.getExperiments() : storeExperiments);
}
public static final /* synthetic */ Lazy access$getINSTANCE$cp() {
return INSTANCE$delegate;
}
public final boolean isEnabled() {
Experiment userExperiment = this.storeExperiments.getUserExperiment("2021-05_guild_member_avatars_android_kill_switch", true);
return userExperiment == null || userExperiment.getBucket() != 1;
}
}

View File

@ -600,7 +600,7 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@o("channels/{channelId}/directory-entry/{guildId}") @o("channels/{channelId}/directory-entry/{guildId}")
public Observable<DirectoryEntry> addServerToHub(@s("channelId") long j, @s("guildId") long j2, @i0.f0.a RestAPIParams.AddServerBody addServerBody) { public Observable<Response<DirectoryEntry>> addServerToHub(@s("channelId") long j, @s("guildId") long j2, @i0.f0.a RestAPIParams.AddServerBody addServerBody) {
m.checkNotNullParameter(addServerBody, "body"); m.checkNotNullParameter(addServerBody, "body");
return this._api.addServerToHub(j, j2, addServerBody); return this._api.addServerToHub(j, j2, addServerBody);
} }
@ -1824,7 +1824,7 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@b("channels/{channelId}/directory-entry/{guildId}") @b("channels/{channelId}/directory-entry/{guildId}")
public Observable<DirectoryEntry> removeServerFromHub(@s("channelId") long j, @s("guildId") long j2) { public Observable<Response<DirectoryEntry>> removeServerFromHub(@s("channelId") long j, @s("guildId") long j2) {
return this._api.removeServerFromHub(j, j2); return this._api.removeServerFromHub(j, j2);
} }

View File

@ -539,10 +539,10 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter
imageView2.setVisibility(8); imageView2.setVisibility(8);
} }
/* JADX WARNING: Removed duplicated region for block: B:31:0x0136 */ /* JADX WARNING: Removed duplicated region for block: B:31:0x0142 */
/* JADX WARNING: Removed duplicated region for block: B:32:0x013a */ /* JADX WARNING: Removed duplicated region for block: B:32:0x0146 */
/* JADX WARNING: Removed duplicated region for block: B:35:0x014b A[ADDED_TO_REGION] */ /* JADX WARNING: Removed duplicated region for block: B:35:0x0157 A[ADDED_TO_REGION] */
/* JADX WARNING: Removed duplicated region for block: B:42:0x0162 */ /* JADX WARNING: Removed duplicated region for block: B:42:0x016e */
private final void configureInvalidUI(Model.Invalid invalid) { private final void configureInvalidUI(Model.Invalid invalid) {
CharSequence charSequence; CharSequence charSequence;
Channel channel; Channel channel;
@ -570,6 +570,9 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter
if ((invalid != null ? invalid.getAuthorUser() : null) != null) { if ((invalid != null ? invalid.getAuthorUser() : null) != null) {
m.checkNotNullExpressionValue(context, "context"); m.checkNotNullExpressionValue(context, "context");
charSequence = c.a.k.b.h(context, R.string.instant_invite_ask_user_for_new_invite, new Object[]{invalid.getAuthorUser().getUsername()}, null, 4); charSequence = c.a.k.b.h(context, R.string.instant_invite_ask_user_for_new_invite, new Object[]{invalid.getAuthorUser().getUsername()}, null, 4);
TextView textView4 = this.binding.b;
m.checkNotNullExpressionValue(textView4, "binding.itemInviteChannelName");
textView4.setVisibility(8);
d3 d3Var = this.binding.k; d3 d3Var = this.binding.k;
m.checkNotNullExpressionValue(d3Var, "binding.itemInviteMemberContainer"); m.checkNotNullExpressionValue(d3Var, "binding.itemInviteMemberContainer");
LinearLayout linearLayout = d3Var.a; LinearLayout linearLayout = d3Var.a;
@ -578,15 +581,15 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter
d3 d3Var2 = this.binding.k; d3 d3Var2 = this.binding.k;
m.checkNotNullExpressionValue(d3Var2, "binding.itemInviteMemberContainer"); m.checkNotNullExpressionValue(d3Var2, "binding.itemInviteMemberContainer");
d3Var2.a.setBackgroundResource(0); d3Var2.a.setBackgroundResource(0);
TextView textView4 = this.binding.k.f80c; TextView textView5 = this.binding.k.f80c;
m.checkNotNullExpressionValue(textView4, "binding.itemInviteMember…iner.itemInviteOnlineText"); m.checkNotNullExpressionValue(textView5, "binding.itemInviteMember…iner.itemInviteOnlineText");
ViewExtensions.setTextAndVisibilityBy(textView4, charSequence); ViewExtensions.setTextAndVisibilityBy(textView5, charSequence);
ImageView imageView = this.binding.k.b; ImageView imageView = this.binding.k.b;
m.checkNotNullExpressionValue(imageView, "binding.itemInviteMember…ainer.itemInviteOnlineDot"); m.checkNotNullExpressionValue(imageView, "binding.itemInviteMember…ainer.itemInviteOnlineDot");
imageView.setVisibility(8); imageView.setVisibility(8);
TextView textView5 = this.binding.k.e; TextView textView6 = this.binding.k.e;
m.checkNotNullExpressionValue(textView5, "binding.itemInviteMember…itemInviteTotalMemberText"); m.checkNotNullExpressionValue(textView6, "binding.itemInviteMember…itemInviteTotalMemberText");
ViewExtensions.setTextAndVisibilityBy(textView5, null); ViewExtensions.setTextAndVisibilityBy(textView6, null);
ImageView imageView2 = this.binding.k.d; ImageView imageView2 = this.binding.k.d;
m.checkNotNullExpressionValue(imageView2, "binding.itemInviteMember….itemInviteTotalMemberDot"); m.checkNotNullExpressionValue(imageView2, "binding.itemInviteMember….itemInviteTotalMemberDot");
imageView2.setVisibility(8); imageView2.setVisibility(8);
@ -623,6 +626,9 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter
if ((invalid != null ? invalid.getAuthorUser() : null) == null) { if ((invalid != null ? invalid.getAuthorUser() : null) == null) {
m.checkNotNullExpressionValue(context, "context"); m.checkNotNullExpressionValue(context, "context");
charSequence = c.a.k.b.h(context, R.string.instant_invite_ask_for_new_invite, new Object[0], null, 4); charSequence = c.a.k.b.h(context, R.string.instant_invite_ask_for_new_invite, new Object[0], null, 4);
TextView textView4 = this.binding.b;
m.checkNotNullExpressionValue(textView4, "binding.itemInviteChannelName");
textView4.setVisibility(8);
d3 d3Var = this.binding.k; d3 d3Var = this.binding.k;
m.checkNotNullExpressionValue(d3Var, "binding.itemInviteMemberContainer"); m.checkNotNullExpressionValue(d3Var, "binding.itemInviteMemberContainer");
LinearLayout linearLayout = d3Var.a; LinearLayout linearLayout = d3Var.a;
@ -631,15 +637,15 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter
d3 d3Var2 = this.binding.k; d3 d3Var2 = this.binding.k;
m.checkNotNullExpressionValue(d3Var2, "binding.itemInviteMemberContainer"); m.checkNotNullExpressionValue(d3Var2, "binding.itemInviteMemberContainer");
d3Var2.a.setBackgroundResource(0); d3Var2.a.setBackgroundResource(0);
TextView textView4 = this.binding.k.f80c; TextView textView5 = this.binding.k.f80c;
m.checkNotNullExpressionValue(textView4, "binding.itemInviteMember…iner.itemInviteOnlineText"); m.checkNotNullExpressionValue(textView5, "binding.itemInviteMember…iner.itemInviteOnlineText");
ViewExtensions.setTextAndVisibilityBy(textView4, charSequence); ViewExtensions.setTextAndVisibilityBy(textView5, charSequence);
ImageView imageView = this.binding.k.b; ImageView imageView = this.binding.k.b;
m.checkNotNullExpressionValue(imageView, "binding.itemInviteMember…ainer.itemInviteOnlineDot"); m.checkNotNullExpressionValue(imageView, "binding.itemInviteMember…ainer.itemInviteOnlineDot");
imageView.setVisibility(8); imageView.setVisibility(8);
TextView textView5 = this.binding.k.e; TextView textView6 = this.binding.k.e;
m.checkNotNullExpressionValue(textView5, "binding.itemInviteMember…itemInviteTotalMemberText"); m.checkNotNullExpressionValue(textView6, "binding.itemInviteMember…itemInviteTotalMemberText");
ViewExtensions.setTextAndVisibilityBy(textView5, null); ViewExtensions.setTextAndVisibilityBy(textView6, null);
ImageView imageView2 = this.binding.k.d; ImageView imageView2 = this.binding.k.d;
m.checkNotNullExpressionValue(imageView2, "binding.itemInviteMember….itemInviteTotalMemberDot"); m.checkNotNullExpressionValue(imageView2, "binding.itemInviteMember….itemInviteTotalMemberDot");
imageView2.setVisibility(8); imageView2.setVisibility(8);
@ -671,6 +677,9 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter
} else { } else {
charSequence = null; charSequence = null;
} }
TextView textView4 = this.binding.b;
m.checkNotNullExpressionValue(textView4, "binding.itemInviteChannelName");
textView4.setVisibility(8);
d3 d3Var = this.binding.k; d3 d3Var = this.binding.k;
m.checkNotNullExpressionValue(d3Var, "binding.itemInviteMemberContainer"); m.checkNotNullExpressionValue(d3Var, "binding.itemInviteMemberContainer");
LinearLayout linearLayout = d3Var.a; LinearLayout linearLayout = d3Var.a;
@ -679,15 +688,15 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter
d3 d3Var2 = this.binding.k; d3 d3Var2 = this.binding.k;
m.checkNotNullExpressionValue(d3Var2, "binding.itemInviteMemberContainer"); m.checkNotNullExpressionValue(d3Var2, "binding.itemInviteMemberContainer");
d3Var2.a.setBackgroundResource(0); d3Var2.a.setBackgroundResource(0);
TextView textView4 = this.binding.k.f80c; TextView textView5 = this.binding.k.f80c;
m.checkNotNullExpressionValue(textView4, "binding.itemInviteMember…iner.itemInviteOnlineText"); m.checkNotNullExpressionValue(textView5, "binding.itemInviteMember…iner.itemInviteOnlineText");
ViewExtensions.setTextAndVisibilityBy(textView4, charSequence); ViewExtensions.setTextAndVisibilityBy(textView5, charSequence);
ImageView imageView = this.binding.k.b; ImageView imageView = this.binding.k.b;
m.checkNotNullExpressionValue(imageView, "binding.itemInviteMember…ainer.itemInviteOnlineDot"); m.checkNotNullExpressionValue(imageView, "binding.itemInviteMember…ainer.itemInviteOnlineDot");
imageView.setVisibility(8); imageView.setVisibility(8);
TextView textView5 = this.binding.k.e; TextView textView6 = this.binding.k.e;
m.checkNotNullExpressionValue(textView5, "binding.itemInviteMember…itemInviteTotalMemberText"); m.checkNotNullExpressionValue(textView6, "binding.itemInviteMember…itemInviteTotalMemberText");
ViewExtensions.setTextAndVisibilityBy(textView5, null); ViewExtensions.setTextAndVisibilityBy(textView6, null);
ImageView imageView2 = this.binding.k.d; ImageView imageView2 = this.binding.k.d;
m.checkNotNullExpressionValue(imageView2, "binding.itemInviteMember….itemInviteTotalMemberDot"); m.checkNotNullExpressionValue(imageView2, "binding.itemInviteMember….itemInviteTotalMemberDot");
imageView2.setVisibility(8); imageView2.setVisibility(8);

View File

@ -27,6 +27,7 @@ import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
import com.discord.widgets.botuikit.BotComponentExperiments; import com.discord.widgets.botuikit.BotComponentExperiments;
import com.discord.widgets.botuikit.ComponentChatListState; import com.discord.widgets.botuikit.ComponentChatListState;
import com.discord.widgets.botuikit.ComponentStateMapper; import com.discord.widgets.botuikit.ComponentStateMapper;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventsSharingFeatureFlag;
import d0.g0.s; import d0.g0.s;
import d0.t.h0; import d0.t.h0;
import d0.t.n; import d0.t.n;
@ -100,7 +101,7 @@ public abstract class ChatListEntry implements MGRecyclerDataPayload {
private final ChatListEntry createEntryForInvite(Message message, String str, String str2, InviteEmbedModel inviteEmbedModel) { private final ChatListEntry createEntryForInvite(Message message, String str, String str2, InviteEmbedModel inviteEmbedModel) {
if (str2 != null) { if (str2 != null) {
ModelInvite resolveInviteForGuildScheduledEvent = inviteEmbedModel.resolveInviteForGuildScheduledEvent(str, str2); ModelInvite resolveInviteForGuildScheduledEvent = inviteEmbedModel.resolveInviteForGuildScheduledEvent(str, str2);
if ((resolveInviteForGuildScheduledEvent != null ? resolveInviteForGuildScheduledEvent.getGuildScheduledEvent() : null) != null) { if ((resolveInviteForGuildScheduledEvent != null ? resolveInviteForGuildScheduledEvent.getGuildScheduledEvent() : null) != null && GuildScheduledEventsSharingFeatureFlag.Companion.getINSTANCE().canShareGuildScheduledEvents()) {
GuildScheduledEvent guildScheduledEvent = resolveInviteForGuildScheduledEvent.getGuildScheduledEvent(); GuildScheduledEvent guildScheduledEvent = resolveInviteForGuildScheduledEvent.getGuildScheduledEvent();
m.checkNotNull(guildScheduledEvent); m.checkNotNull(guildScheduledEvent);
m.checkNotNullExpressionValue(guildScheduledEvent, "eventInvite.guildScheduledEvent!!"); m.checkNotNullExpressionValue(guildScheduledEvent, "eventInvite.guildScheduledEvent!!");

View File

@ -0,0 +1,20 @@
package com.discord.widgets.guilds.invite;
import com.discord.analytics.generated.events.impression.TrackImpressionGuildInvite;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.o;
import kotlin.jvm.functions.Function0;
/* compiled from: WidgetGuildInviteShare.kt */
public final class WidgetGuildInviteShare$loggingConfig$1 extends o implements Function0<AnalyticsSchema> {
public static final WidgetGuildInviteShare$loggingConfig$1 INSTANCE = new WidgetGuildInviteShare$loggingConfig$1();
public WidgetGuildInviteShare$loggingConfig$1() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final AnalyticsSchema mo1invoke() {
return new TrackImpressionGuildInvite(null, null, 3);
}
}

View File

@ -19,6 +19,7 @@ import com.discord.api.guild.Guild;
import com.discord.app.AppActivity; import com.discord.app.AppActivity;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.app.AppViewFlipper; import com.discord.app.AppViewFlipper;
import com.discord.app.LoggingConfig;
import com.discord.databinding.WidgetGuildInviteShareBinding; import com.discord.databinding.WidgetGuildInviteShareBinding;
import com.discord.models.domain.ModelInvite; import com.discord.models.domain.ModelInvite;
import com.discord.models.experiments.domain.Experiment; import com.discord.models.experiments.domain.Experiment;
@ -57,6 +58,7 @@ public final class WidgetGuildInviteShare extends AppFragment {
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetGuildInviteShare$binding$2.INSTANCE, null, 2, null); private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetGuildInviteShare$binding$2.INSTANCE, null, 2, null);
private BottomSheetBehavior<ViewInviteSettingsSheet> bottomSheetBehavior; private BottomSheetBehavior<ViewInviteSettingsSheet> bottomSheetBehavior;
private boolean hasTrackedSuggestionsViewed; private boolean hasTrackedSuggestionsViewed;
private final LoggingConfig loggingConfig;
private final Lazy viewModel$delegate; private final Lazy viewModel$delegate;
/* compiled from: WidgetGuildInviteShare.kt */ /* compiled from: WidgetGuildInviteShare.kt */
@ -97,6 +99,7 @@ public final class WidgetGuildInviteShare extends AppFragment {
WidgetGuildInviteShare$viewModel$2 widgetGuildInviteShare$viewModel$2 = new WidgetGuildInviteShare$viewModel$2(this); WidgetGuildInviteShare$viewModel$2 widgetGuildInviteShare$viewModel$2 = new WidgetGuildInviteShare$viewModel$2(this);
f0 f0Var = new f0(this); f0 f0Var = new f0(this);
this.viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(WidgetGuildInviteShareViewModel.class), new WidgetGuildInviteShare$appViewModels$$inlined$viewModels$1(f0Var), new h0(widgetGuildInviteShare$viewModel$2)); this.viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(WidgetGuildInviteShareViewModel.class), new WidgetGuildInviteShare$appViewModels$$inlined$viewModels$1(f0Var), new h0(widgetGuildInviteShare$viewModel$2));
this.loggingConfig = new LoggingConfig(false, null, WidgetGuildInviteShare$loggingConfig$1.INSTANCE, 3);
} }
public static final /* synthetic */ void access$configureUI(WidgetGuildInviteShare widgetGuildInviteShare, WidgetGuildInviteShareViewModel.ViewState.Loaded loaded) { public static final /* synthetic */ void access$configureUI(WidgetGuildInviteShare widgetGuildInviteShare, WidgetGuildInviteShareViewModel.ViewState.Loaded loaded) {
@ -260,6 +263,11 @@ public final class WidgetGuildInviteShare extends AppFragment {
} }
} }
@Override // com.discord.app.AppFragment, com.discord.app.AppLogger.a
public LoggingConfig getLoggingConfig() {
return this.loggingConfig;
}
@Override // com.discord.app.AppFragment @Override // com.discord.app.AppFragment
public void onViewBound(View view) { public void onViewBound(View view) {
Window window; Window window;

View File

@ -0,0 +1,140 @@
package com.discord.widgets.guildscheduledevent;
import c.d.b.a.a;
import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.simpleast.core.node.Node;
import com.discord.utilities.textprocessing.MessageRenderContext;
import d0.z.d.m;
import java.util.List;
import java.util.Set;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: GuildScheduledEventItemView.kt */
public abstract class DescriptionCache {
private final List<Node<MessageRenderContext>> maybeAst;
private final String maybeDescription;
/* compiled from: GuildScheduledEventItemView.kt */
public static final class HasDescription extends DescriptionCache {
private final List<Node<MessageRenderContext>> ast;
private final String description;
private final Set<Integer> shownSpoilerIndices;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public HasDescription(String str, List<Node<MessageRenderContext>> list, Set<Integer> set) {
super(str, list, null);
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_DESCRIPTION);
m.checkNotNullParameter(list, "ast");
m.checkNotNullParameter(set, "shownSpoilerIndices");
this.description = str;
this.ast = list;
this.shownSpoilerIndices = set;
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.guildscheduledevent.DescriptionCache$HasDescription */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ HasDescription copy$default(HasDescription hasDescription, String str, List list, Set set, int i, Object obj) {
if ((i & 1) != 0) {
str = hasDescription.description;
}
if ((i & 2) != 0) {
list = hasDescription.ast;
}
if ((i & 4) != 0) {
set = hasDescription.shownSpoilerIndices;
}
return hasDescription.copy(str, list, set);
}
public final String component1() {
return this.description;
}
public final List<Node<MessageRenderContext>> component2() {
return this.ast;
}
public final Set<Integer> component3() {
return this.shownSpoilerIndices;
}
public final HasDescription copy(String str, List<Node<MessageRenderContext>> list, Set<Integer> set) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_DESCRIPTION);
m.checkNotNullParameter(list, "ast");
m.checkNotNullParameter(set, "shownSpoilerIndices");
return new HasDescription(str, list, set);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof HasDescription)) {
return false;
}
HasDescription hasDescription = (HasDescription) obj;
return m.areEqual(this.description, hasDescription.description) && m.areEqual(this.ast, hasDescription.ast) && m.areEqual(this.shownSpoilerIndices, hasDescription.shownSpoilerIndices);
}
public final List<Node<MessageRenderContext>> getAst() {
return this.ast;
}
public final String getDescription() {
return this.description;
}
public final Set<Integer> getShownSpoilerIndices() {
return this.shownSpoilerIndices;
}
public int hashCode() {
String str = this.description;
int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
List<Node<MessageRenderContext>> list = this.ast;
int hashCode2 = (hashCode + (list != null ? list.hashCode() : 0)) * 31;
Set<Integer> set = this.shownSpoilerIndices;
if (set != null) {
i = set.hashCode();
}
return hashCode2 + i;
}
public String toString() {
StringBuilder L = a.L("HasDescription(description=");
L.append(this.description);
L.append(", ast=");
L.append(this.ast);
L.append(", shownSpoilerIndices=");
L.append(this.shownSpoilerIndices);
L.append(")");
return L.toString();
}
}
/* compiled from: GuildScheduledEventItemView.kt */
public static final class NoDescription extends DescriptionCache {
public static final NoDescription INSTANCE = new NoDescription();
private NoDescription() {
super(null, null, null);
}
}
private DescriptionCache(String str, List<Node<MessageRenderContext>> list) {
this.maybeDescription = str;
this.maybeAst = list;
}
public /* synthetic */ DescriptionCache(String str, List list, DefaultConstructorMarker defaultConstructorMarker) {
this(str, list);
}
public final List<Node<MessageRenderContext>> getMaybeAst() {
return this.maybeAst;
}
public final String getMaybeDescription() {
return this.maybeDescription;
}
}

View File

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

View File

@ -0,0 +1,23 @@
package com.discord.widgets.guildscheduledevent;
import com.discord.simpleast.core.node.Node;
import com.discord.simpleast.core.parser.Parser;
import com.discord.utilities.textprocessing.DiscordParser;
import com.discord.utilities.textprocessing.MessageParseState;
import com.discord.utilities.textprocessing.MessageRenderContext;
import d0.z.d.o;
import kotlin.jvm.functions.Function0;
/* compiled from: GuildScheduledEventDescriptionParser.kt */
public final class GuildScheduledEventDescriptionParser$descriptionParser$2 extends o implements Function0<Parser<MessageRenderContext, Node<MessageRenderContext>, MessageParseState>> {
public static final GuildScheduledEventDescriptionParser$descriptionParser$2 INSTANCE = new GuildScheduledEventDescriptionParser$descriptionParser$2();
public GuildScheduledEventDescriptionParser$descriptionParser$2() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final Parser<MessageRenderContext, Node<MessageRenderContext>, MessageParseState> mo1invoke() {
return DiscordParser.createParser(false, false, false);
}
}

View File

@ -0,0 +1,55 @@
package com.discord.widgets.guildscheduledevent;
import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.simpleast.core.node.Node;
import com.discord.simpleast.core.parser.Parser;
import com.discord.utilities.textprocessing.MessageParseState;
import com.discord.utilities.textprocessing.MessagePreprocessor;
import com.discord.utilities.textprocessing.MessageRenderContext;
import d0.g;
import d0.z.d.m;
import java.util.List;
import java.util.Set;
import kotlin.Lazy;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: GuildScheduledEventDescriptionParser.kt */
public final class GuildScheduledEventDescriptionParser {
public static final Companion Companion = new Companion(null);
private static final Lazy INSTANCE$delegate = g.lazy(GuildScheduledEventDescriptionParser$Companion$INSTANCE$2.INSTANCE);
private final Lazy descriptionParser$delegate = g.lazy(GuildScheduledEventDescriptionParser$descriptionParser$2.INSTANCE);
/* compiled from: GuildScheduledEventDescriptionParser.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final GuildScheduledEventDescriptionParser getINSTANCE() {
Lazy access$getINSTANCE$cp = GuildScheduledEventDescriptionParser.access$getINSTANCE$cp();
Companion companion = GuildScheduledEventDescriptionParser.Companion;
return (GuildScheduledEventDescriptionParser) access$getINSTANCE$cp.getValue();
}
}
public static final /* synthetic */ Lazy access$getINSTANCE$cp() {
return INSTANCE$delegate;
}
private final Parser<MessageRenderContext, Node<MessageRenderContext>, MessageParseState> getDescriptionParser() {
return (Parser) this.descriptionParser$delegate.getValue();
}
public final List<Node<MessageRenderContext>> parse(String str) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_DESCRIPTION);
return Parser.parse$default(getDescriptionParser(), str, MessageParseState.Companion.getInitialState(), null, 4, null);
}
public final void updateAstForSpoiler(List<Node<MessageRenderContext>> list, Set<Integer> set) {
m.checkNotNullParameter(list, "ast");
m.checkNotNullParameter(set, "visibleSpoilerNodeIndices");
new MessagePreprocessor(-1, set, null, false, null, 28, null).process(list);
}
}

View File

@ -0,0 +1,4 @@
package com.discord.widgets.guildscheduledevent;
/* compiled from: GuildScheduledEventDescriptionParser.kt */
public final class GuildScheduledEventDescriptionParserKt {
}

View File

@ -0,0 +1,26 @@
package com.discord.widgets.guildscheduledevent;
import com.discord.utilities.textprocessing.node.SpoilerNode;
import d0.z.d.k;
import d0.z.d.m;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: GuildScheduledEventItemView.kt */
public final /* synthetic */ class GuildScheduledEventItemView$configureDescription$1$renderContext$1 extends k implements Function1<SpoilerNode<?>, Unit> {
public GuildScheduledEventItemView$configureDescription$1$renderContext$1(GuildScheduledEventItemView guildScheduledEventItemView) {
super(1, guildScheduledEventItemView, GuildScheduledEventItemView.class, "handleSpoilerClicked", "handleSpoilerClicked(Lcom/discord/utilities/textprocessing/node/SpoilerNode;)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(SpoilerNode<?> spoilerNode) {
invoke(spoilerNode);
return Unit.a;
}
public final void invoke(SpoilerNode<?> spoilerNode) {
m.checkNotNullParameter(spoilerNode, "p1");
GuildScheduledEventItemView.access$handleSpoilerClicked((GuildScheduledEventItemView) this.receiver, spoilerNode);
}
}

View File

@ -14,20 +14,29 @@ import com.discord.R;
import com.discord.api.channel.Channel; import com.discord.api.channel.Channel;
import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.databinding.GuildScheduledEventItemViewBinding; import com.discord.databinding.GuildScheduledEventItemViewBinding;
import com.discord.simpleast.core.node.Node;
import com.discord.utilities.color.ColorCompat; import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.color.ColorCompatKt; import com.discord.utilities.color.ColorCompatKt;
import com.discord.utilities.drawable.DrawableCompat; import com.discord.utilities.drawable.DrawableCompat;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventTiming; import com.discord.utilities.guildscheduledevent.GuildScheduledEventTiming;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilitiesKt; import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilitiesKt;
import com.discord.utilities.textprocessing.AstRenderer;
import com.discord.utilities.textprocessing.MessageRenderContext;
import com.discord.utilities.textprocessing.node.SpoilerNode;
import com.discord.utilities.view.extensions.ViewExtensions; import com.discord.utilities.view.extensions.ViewExtensions;
import com.discord.utilities.view.text.LinkifiedTextView;
import com.discord.widgets.guildscheduledevent.DescriptionCache;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventListItem; import com.discord.widgets.guildscheduledevent.GuildScheduledEventListItem;
import d0.z.d.m; import d0.z.d.m;
import java.util.LinkedHashSet;
import java.util.List;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: GuildScheduledEventItemView.kt */ /* compiled from: GuildScheduledEventItemView.kt */
public final class GuildScheduledEventItemView extends ConstraintLayout { public final class GuildScheduledEventItemView extends ConstraintLayout {
private final GuildScheduledEventItemViewBinding binding; private final GuildScheduledEventItemViewBinding binding;
private DescriptionCache savedDescriptionCache;
public final /* synthetic */ class WhenMappings { public final /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0; public static final /* synthetic */ int[] $EnumSwitchMapping$0;
@ -76,17 +85,17 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
TextView textView2 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_date_text); TextView textView2 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_date_text);
if (textView2 != null) { if (textView2 != null) {
i2 = R.id.guild_scheduled_event_list_item_desc_text; i2 = R.id.guild_scheduled_event_list_item_desc_text;
TextView textView3 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_desc_text); LinkifiedTextView linkifiedTextView = (LinkifiedTextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_desc_text);
if (textView3 != null) { if (linkifiedTextView != null) {
i2 = R.id.guild_scheduled_event_list_item_interested_button; i2 = R.id.guild_scheduled_event_list_item_interested_button;
ImageView imageView2 = (ImageView) inflate.findViewById(R.id.guild_scheduled_event_list_item_interested_button); ImageView imageView2 = (ImageView) inflate.findViewById(R.id.guild_scheduled_event_list_item_interested_button);
if (imageView2 != null) { if (imageView2 != null) {
i2 = R.id.guild_scheduled_event_list_item_interested_button_text; i2 = R.id.guild_scheduled_event_list_item_interested_button_text;
TextView textView4 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_interested_button_text); TextView textView3 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_interested_button_text);
if (textView4 != null) { if (textView3 != null) {
i2 = R.id.guild_scheduled_event_list_item_rsvp_text; i2 = R.id.guild_scheduled_event_list_item_rsvp_text;
TextView textView5 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_rsvp_text); TextView textView4 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_rsvp_text);
if (textView5 != null) { if (textView4 != null) {
i2 = R.id.guild_scheduled_event_list_item_share_button; i2 = R.id.guild_scheduled_event_list_item_share_button;
ImageView imageView3 = (ImageView) inflate.findViewById(R.id.guild_scheduled_event_list_item_share_button); ImageView imageView3 = (ImageView) inflate.findViewById(R.id.guild_scheduled_event_list_item_share_button);
if (imageView3 != null) { if (imageView3 != null) {
@ -94,17 +103,18 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
ImageView imageView4 = (ImageView) inflate.findViewById(R.id.guild_scheduled_event_list_item_start_event_button); ImageView imageView4 = (ImageView) inflate.findViewById(R.id.guild_scheduled_event_list_item_start_event_button);
if (imageView4 != null) { if (imageView4 != null) {
i2 = R.id.guild_scheduled_event_list_item_start_event_button_text; i2 = R.id.guild_scheduled_event_list_item_start_event_button_text;
TextView textView6 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_start_event_button_text); TextView textView5 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_start_event_button_text);
if (textView6 != null) { if (textView5 != null) {
i2 = R.id.guild_scheduled_event_list_item_status_icon; i2 = R.id.guild_scheduled_event_list_item_status_icon;
ImageView imageView5 = (ImageView) inflate.findViewById(R.id.guild_scheduled_event_list_item_status_icon); ImageView imageView5 = (ImageView) inflate.findViewById(R.id.guild_scheduled_event_list_item_status_icon);
if (imageView5 != null) { if (imageView5 != null) {
i2 = R.id.guild_scheduled_event_list_item_title_text; i2 = R.id.guild_scheduled_event_list_item_title_text;
TextView textView7 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_title_text); TextView textView6 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_title_text);
if (textView7 != null) { if (textView6 != null) {
GuildScheduledEventItemViewBinding guildScheduledEventItemViewBinding = new GuildScheduledEventItemViewBinding((ConstraintLayout) inflate, imageView, textView, textView2, textView3, imageView2, textView4, textView5, imageView3, imageView4, textView6, imageView5, textView7); GuildScheduledEventItemViewBinding guildScheduledEventItemViewBinding = new GuildScheduledEventItemViewBinding((ConstraintLayout) inflate, imageView, textView, textView2, linkifiedTextView, imageView2, textView3, textView4, imageView3, imageView4, textView5, imageView5, textView6);
m.checkNotNullExpressionValue(guildScheduledEventItemViewBinding, "GuildScheduledEventItemV…rom(context), this, true)"); m.checkNotNullExpressionValue(guildScheduledEventItemViewBinding, "GuildScheduledEventItemV…rom(context), this, true)");
this.binding = guildScheduledEventItemViewBinding; this.binding = guildScheduledEventItemViewBinding;
this.savedDescriptionCache = DescriptionCache.NoDescription.INSTANCE;
return; return;
} }
} }
@ -126,22 +136,41 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i); this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i);
} }
public static final /* synthetic */ void access$handleSpoilerClicked(GuildScheduledEventItemView guildScheduledEventItemView, SpoilerNode spoilerNode) {
guildScheduledEventItemView.handleSpoilerClicked(spoilerNode);
}
private final void configureDescription(String str) {
List<Node<MessageRenderContext>> parseAndSaveDescription = parseAndSaveDescription(str);
LinkifiedTextView linkifiedTextView = this.binding.e;
if (parseAndSaveDescription != null) {
setVisibility(0);
m.checkNotNullExpressionValue(linkifiedTextView, "it");
Context context = linkifiedTextView.getContext();
m.checkNotNullExpressionValue(context, "it.context");
linkifiedTextView.setDraweeSpanStringBuilder(AstRenderer.render(parseAndSaveDescription, new MessageRenderContext(context, 0, false, null, null, null, 0, null, null, 0, 0, new GuildScheduledEventItemView$configureDescription$1$renderContext$1(this), null, null, 14328, null)));
return;
}
setVisibility(8);
}
public static /* synthetic */ void configureInChatList$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEvent guildScheduledEvent, Channel channel, boolean z2, boolean z3, Function0 function0, Function0 function02, Function0 function03, int i, Object obj) { public static /* synthetic */ void configureInChatList$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEvent guildScheduledEvent, Channel channel, boolean z2, boolean z3, Function0 function0, Function0 function02, Function0 function03, int i, Object obj) {
guildScheduledEventItemView.configureInChatList(guildScheduledEvent, channel, z2, z3, (i & 16) != 0 ? GuildScheduledEventItemView$configureInChatList$1.INSTANCE : function0, (i & 32) != 0 ? GuildScheduledEventItemView$configureInChatList$2.INSTANCE : function02, function03); guildScheduledEventItemView.configureInChatList(guildScheduledEvent, channel, z2, z3, (i & 16) != 0 ? GuildScheduledEventItemView$configureInChatList$1.INSTANCE : function0, (i & 32) != 0 ? GuildScheduledEventItemView$configureInChatList$2.INSTANCE : function02, function03);
} }
private final void configureInternal(GuildScheduledEvent guildScheduledEvent, Channel channel, boolean z2, boolean z3, boolean z4) { private final void configureInternal(GuildScheduledEvent guildScheduledEvent, Channel channel, boolean z2, boolean z3, boolean z4) {
GuildScheduledEventTiming eventTiming = GuildScheduledEventUtilitiesKt.getEventTiming(guildScheduledEvent);
GuildScheduledEventTiming guildScheduledEventTiming = GuildScheduledEventTiming.LIVE;
boolean z5 = true; boolean z5 = true;
int i = 0; int i = 0;
boolean z6 = eventTiming == guildScheduledEventTiming; boolean z6 = z4 && GuildScheduledEventsSharingFeatureFlag.Companion.getINSTANCE().canShareGuildScheduledEvents();
boolean z7 = z3 && (eventTiming == GuildScheduledEventTiming.SOON || eventTiming == GuildScheduledEventTiming.NOW); GuildScheduledEventTiming eventTiming = GuildScheduledEventUtilitiesKt.getEventTiming(guildScheduledEvent);
this.binding.f.setImageResource(z6 ? R.drawable.bg_guild_scheduled_event_list_item_interested_button_active : z2 ? R.drawable.bg_guild_scheduled_event_list_item_interested_button_interested : R.drawable.bg_guild_scheduled_event_list_item_interested_button_default); GuildScheduledEventTiming guildScheduledEventTiming = GuildScheduledEventTiming.LIVE;
boolean z7 = eventTiming == guildScheduledEventTiming;
boolean z8 = z3 && (eventTiming == GuildScheduledEventTiming.SOON || eventTiming == GuildScheduledEventTiming.NOW);
this.binding.f.setImageResource(z7 ? R.drawable.bg_guild_scheduled_event_list_item_interested_button_active : z2 ? R.drawable.bg_guild_scheduled_event_list_item_interested_button_interested : R.drawable.bg_guild_scheduled_event_list_item_interested_button_default);
TextView textView = this.binding.g; TextView textView = this.binding.g;
int color = (!z2 || eventTiming == guildScheduledEventTiming) ? ColorCompat.getColor(textView.getContext(), (int) R.color.white) : ColorCompat.getThemedColor(textView.getContext(), (int) R.attr.colorControlBrandForegroundNew); int color = (!z2 || eventTiming == guildScheduledEventTiming) ? ColorCompat.getColor(textView.getContext(), (int) R.color.white) : ColorCompat.getThemedColor(textView.getContext(), (int) R.attr.colorControlBrandForegroundNew);
int i2 = z6 ? 0 : z2 ? R.drawable.ic_check_brand_16dp : R.drawable.ic_bell_16dp; int i2 = z7 ? 0 : z2 ? R.drawable.ic_check_brand_16dp : R.drawable.ic_bell_16dp;
int i3 = z6 ? R.string.stage_channel_join_button : R.string.stage_instance_interested_label; int i3 = z7 ? R.string.stage_channel_join_button : R.string.stage_instance_interested_label;
DrawableCompat.setCompoundDrawablesCompat$default(textView, i2, 0, 0, 0, 14, (Object) null); DrawableCompat.setCompoundDrawablesCompat$default(textView, i2, 0, 0, 0, 14, (Object) null);
textView.setTextColor(color); textView.setTextColor(color);
Context context = textView.getContext(); Context context = textView.getContext();
@ -150,13 +179,13 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
textView.setText(b.h(context, i3, new Object[0], null, 4)); textView.setText(b.h(context, i3, new Object[0], null, 4));
TextView textView2 = this.binding.k; TextView textView2 = this.binding.k;
m.checkNotNullExpressionValue(textView2, "binding.guildScheduledEv…tItemStartEventButtonText"); m.checkNotNullExpressionValue(textView2, "binding.guildScheduledEv…tItemStartEventButtonText");
textView2.setVisibility(z7 ? 0 : 8); textView2.setVisibility(z8 ? 0 : 8);
ImageView imageView = this.binding.j; ImageView imageView = this.binding.j;
m.checkNotNullExpressionValue(imageView, "binding.guildScheduledEv…tListItemStartEventButton"); m.checkNotNullExpressionValue(imageView, "binding.guildScheduledEv…tListItemStartEventButton");
imageView.setVisibility(z7 ? 0 : 8); imageView.setVisibility(z8 ? 0 : 8);
ImageView imageView2 = this.binding.i; ImageView imageView2 = this.binding.i;
m.checkNotNullExpressionValue(imageView2, "binding.guildScheduledEventListItemShareButton"); m.checkNotNullExpressionValue(imageView2, "binding.guildScheduledEventListItemShareButton");
imageView2.setVisibility(z4 ? 0 : 8); imageView2.setVisibility(z6 ? 0 : 8);
TextView textView3 = this.binding.h; TextView textView3 = this.binding.h;
Integer i5 = guildScheduledEvent.i(); Integer i5 = guildScheduledEvent.i();
if (i5 != null) { if (i5 != null) {
@ -172,9 +201,7 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
TextView textView5 = this.binding.m; TextView textView5 = this.binding.m;
m.checkNotNullExpressionValue(textView5, "binding.guildScheduledEventListItemTitleText"); m.checkNotNullExpressionValue(textView5, "binding.guildScheduledEventListItemTitleText");
textView5.setText(guildScheduledEvent.f()); textView5.setText(guildScheduledEvent.f());
TextView textView6 = this.binding.e; configureDescription(guildScheduledEvent.c());
m.checkNotNullExpressionValue(textView6, "binding.guildScheduledEventListItemDescText");
ViewExtensions.setTextAndVisibilityBy(textView6, guildScheduledEvent.c());
ImageView imageView3 = this.binding.b; ImageView imageView3 = this.binding.b;
m.checkNotNullExpressionValue(imageView3, "binding.guildScheduledEventListItemChannelIcon"); m.checkNotNullExpressionValue(imageView3, "binding.guildScheduledEventListItemChannelIcon");
if (channel.m() == null) { if (channel.m() == null) {
@ -184,9 +211,9 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
i = 8; i = 8;
} }
imageView3.setVisibility(i); imageView3.setVisibility(i);
TextView textView7 = this.binding.f1612c; TextView textView6 = this.binding.f1612c;
m.checkNotNullExpressionValue(textView7, "binding.guildScheduledEventListItemChannelName"); m.checkNotNullExpressionValue(textView6, "binding.guildScheduledEventListItemChannelName");
ViewExtensions.setTextAndVisibilityBy(textView7, channel.m()); ViewExtensions.setTextAndVisibilityBy(textView6, channel.m());
configureTimeIconAndTextColor(eventTiming); configureTimeIconAndTextColor(eventTiming);
} }
@ -208,6 +235,30 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
textView.setTextColor((ordinal2 == 3 || ordinal2 == 4) ? ColorCompat.getThemedColor(getContext(), (int) R.attr.colorControlBrandForegroundNew) : ordinal2 != 5 ? ColorCompat.getThemedColor(getContext(), (int) R.attr.colorHeaderPrimary) : ColorCompat.getColor(getContext(), (int) R.color.status_green_600)); textView.setTextColor((ordinal2 == 3 || ordinal2 == 4) ? ColorCompat.getThemedColor(getContext(), (int) R.attr.colorControlBrandForegroundNew) : ordinal2 != 5 ? ColorCompat.getThemedColor(getContext(), (int) R.attr.colorHeaderPrimary) : ColorCompat.getColor(getContext(), (int) R.color.status_green_600));
} }
private final void handleSpoilerClicked(SpoilerNode<?> spoilerNode) {
DescriptionCache descriptionCache = this.savedDescriptionCache;
if (descriptionCache instanceof DescriptionCache.HasDescription) {
DescriptionCache.HasDescription hasDescription = (DescriptionCache.HasDescription) descriptionCache;
hasDescription.getShownSpoilerIndices().add(Integer.valueOf(spoilerNode.getId()));
GuildScheduledEventDescriptionParser.Companion.getINSTANCE().updateAstForSpoiler(hasDescription.getAst(), hasDescription.getShownSpoilerIndices());
configureDescription(hasDescription.getDescription());
}
}
private final List<Node<MessageRenderContext>> parseAndSaveDescription(String str) {
if (m.areEqual(this.savedDescriptionCache.getMaybeDescription(), str)) {
return this.savedDescriptionCache.getMaybeAst();
}
if (str == null) {
DescriptionCache.NoDescription noDescription = DescriptionCache.NoDescription.INSTANCE;
this.savedDescriptionCache = noDescription;
return noDescription.getMaybeAst();
}
DescriptionCache.HasDescription hasDescription = new DescriptionCache.HasDescription(str, GuildScheduledEventDescriptionParser.Companion.getINSTANCE().parse(str), new LinkedHashSet());
this.savedDescriptionCache = hasDescription;
return hasDescription.getMaybeAst();
}
public final void configureAsPreview(GuildScheduledEventModel guildScheduledEventModel, Channel channel) { public final void configureAsPreview(GuildScheduledEventModel guildScheduledEventModel, Channel channel) {
m.checkNotNullParameter(guildScheduledEventModel, "eventModel"); m.checkNotNullParameter(guildScheduledEventModel, "eventModel");
m.checkNotNullParameter(channel, "channel"); m.checkNotNullParameter(channel, "channel");
@ -238,24 +289,22 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
TextView textView4 = this.binding.m; TextView textView4 = this.binding.m;
m.checkNotNullExpressionValue(textView4, "binding.guildScheduledEventListItemTitleText"); m.checkNotNullExpressionValue(textView4, "binding.guildScheduledEventListItemTitleText");
textView4.setText(guildScheduledEventModel.getName()); textView4.setText(guildScheduledEventModel.getName());
TextView textView5 = this.binding.e; configureDescription(guildScheduledEventModel.getDescription());
m.checkNotNullExpressionValue(textView5, "binding.guildScheduledEventListItemDescText");
ViewExtensions.setTextAndVisibilityBy(textView5, guildScheduledEventModel.getDescription());
configureTimeIconAndTextColor(eventTiming); configureTimeIconAndTextColor(eventTiming);
TextView textView6 = this.binding.d; TextView textView5 = this.binding.d;
m.checkNotNullExpressionValue(textView6, "binding.guildScheduledEventListItemDateText"); m.checkNotNullExpressionValue(textView5, "binding.guildScheduledEventListItemDateText");
Context context = getContext(); Context context = getContext();
m.checkNotNullExpressionValue(context, "context"); m.checkNotNullExpressionValue(context, "context");
textView6.setText(GuildScheduledEventUtilitiesKt.getEventStartingTimeString(millis, context)); textView5.setText(GuildScheduledEventUtilitiesKt.getEventStartingTimeString(millis, context));
ImageView imageView4 = this.binding.b; ImageView imageView4 = this.binding.b;
m.checkNotNullExpressionValue(imageView4, "binding.guildScheduledEventListItemChannelIcon"); m.checkNotNullExpressionValue(imageView4, "binding.guildScheduledEventListItemChannelIcon");
if (channel.m() != null) { if (channel.m() != null) {
i = 0; i = 0;
} }
imageView4.setVisibility(i); imageView4.setVisibility(i);
TextView textView7 = this.binding.f1612c; TextView textView6 = this.binding.f1612c;
m.checkNotNullExpressionValue(textView7, "binding.guildScheduledEventListItemChannelName"); m.checkNotNullExpressionValue(textView6, "binding.guildScheduledEventListItemChannelName");
ViewExtensions.setTextAndVisibilityBy(textView7, channel.m()); ViewExtensions.setTextAndVisibilityBy(textView6, channel.m());
} }
public final void configureInChatList(GuildScheduledEvent guildScheduledEvent, Channel channel, boolean z2, boolean z3, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03) { public final void configureInChatList(GuildScheduledEvent guildScheduledEvent, Channel channel, boolean z2, boolean z3, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03) {

View File

@ -38,9 +38,9 @@ public final class GuildScheduledEventListViewModel$Companion$observeStores$1 ex
/* renamed from: invoke */ /* renamed from: invoke */
public final GuildScheduledEventListViewModel.StoreState mo1invoke() { public final GuildScheduledEventListViewModel.StoreState mo1invoke() {
Map<Long, Channel> channelsForGuild = this.$channelStore.getChannelsForGuild(this.$guildId); Map<Long, Channel> channelsForGuild = this.$channelStore.getChannelsForGuild(this.$guildId);
List<GuildScheduledEvent> guildScheduledEvents = this.$guildScheduledEventsStore.getGuildScheduledEvents(this.$guildId); List guildScheduledEvents$default = StoreGuildScheduledEvents.getGuildScheduledEvents$default(this.$guildScheduledEventsStore, this.$guildId, false, false, 6, null);
ArrayList arrayList = new ArrayList(); ArrayList arrayList = new ArrayList();
for (Object obj : guildScheduledEvents) { for (Object obj : guildScheduledEvents$default) {
if (channelsForGuild.containsKey(Long.valueOf(((GuildScheduledEvent) obj).b()))) { if (channelsForGuild.containsKey(Long.valueOf(((GuildScheduledEvent) obj).b()))) {
arrayList.add(obj); arrayList.add(obj);
} }

View File

@ -381,7 +381,8 @@ public final class GuildScheduledEventListViewModel extends AppViewModel<ViewSta
this.channelsStore = storeChannels; this.channelsStore = storeChannels;
this.permissionsStore = storePermissions; this.permissionsStore = storePermissions;
this.guildsStore = storeGuilds; this.guildsStore = storeGuilds;
storeGuildScheduledEvents.getGuildScheduledEventUserCounts(j); storeGuildScheduledEvents.fetchGuildScheduledEventUserCounts(j);
storeGuildScheduledEvents.fetchUserGuildScheduledEvents();
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.computationLatest(observable), this, null, 2, null), GuildScheduledEventListViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.computationLatest(observable), this, null, 2, null), GuildScheduledEventListViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null);
} }

View File

@ -1,23 +0,0 @@
package com.discord.widgets.hubs;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionHubWaitlistSignup;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.hubs.EmailVerification;
import d0.z.d.o;
import kotlin.jvm.functions.Function1;
/* compiled from: DiscordHubEmailViewModel.kt */
public final class DiscordHubEmailViewModel$onGuildClicked$1 extends o implements Function1<EmailVerification, TrackNetworkMetadataReceiver> {
public static final DiscordHubEmailViewModel$onGuildClicked$1 INSTANCE = new DiscordHubEmailViewModel$onGuildClicked$1();
public DiscordHubEmailViewModel$onGuildClicked$1() {
super(1);
}
public final TrackNetworkMetadataReceiver invoke(EmailVerification emailVerification) {
boolean z2 = true;
if (emailVerification == null || !emailVerification.b()) {
z2 = false;
}
return new TrackNetworkActionHubWaitlistSignup(Boolean.valueOf(z2));
}
}

View File

@ -16,12 +16,13 @@ public final class HubDescriptionArgs implements Parcelable {
private final long guildId; private final long guildId;
private final String hubName; private final String hubName;
private final boolean isEditing; private final boolean isEditing;
private final boolean isNewGuild;
public static class Creator implements Parcelable.Creator<HubDescriptionArgs> { public static class Creator implements Parcelable.Creator<HubDescriptionArgs> {
@Override // android.os.Parcelable.Creator @Override // android.os.Parcelable.Creator
public final HubDescriptionArgs createFromParcel(Parcel parcel) { public final HubDescriptionArgs createFromParcel(Parcel parcel) {
m.checkNotNullParameter(parcel, "in"); m.checkNotNullParameter(parcel, "in");
return new HubDescriptionArgs(parcel.readLong(), parcel.readLong(), parcel.readInt() != 0, parcel.readString(), parcel.readString(), parcel.readInt() != 0 ? (DirectoryEntryCategory) Enum.valueOf(DirectoryEntryCategory.class, parcel.readString()) : null); return new HubDescriptionArgs(parcel.readLong(), parcel.readLong(), parcel.readInt() != 0, parcel.readString(), parcel.readInt() != 0, parcel.readString(), parcel.readInt() != 0 ? (DirectoryEntryCategory) Enum.valueOf(DirectoryEntryCategory.class, parcel.readString()) : null);
} }
@Override // android.os.Parcelable.Creator @Override // android.os.Parcelable.Creator
@ -30,23 +31,24 @@ public final class HubDescriptionArgs implements Parcelable {
} }
} }
public HubDescriptionArgs(long j, long j2, boolean z2, String str, String str2, DirectoryEntryCategory directoryEntryCategory) { public HubDescriptionArgs(long j, long j2, boolean z2, String str, boolean z3, String str2, DirectoryEntryCategory directoryEntryCategory) {
m.checkNotNullParameter(str, "hubName"); m.checkNotNullParameter(str, "hubName");
this.guildId = j; this.guildId = j;
this.channelId = j2; this.channelId = j2;
this.isEditing = z2; this.isEditing = z2;
this.hubName = str; this.hubName = str;
this.isNewGuild = z3;
this.description = str2; this.description = str2;
this.category = directoryEntryCategory; this.category = directoryEntryCategory;
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ HubDescriptionArgs(long j, long j2, boolean z2, String str, String str2, DirectoryEntryCategory directoryEntryCategory, int i, DefaultConstructorMarker defaultConstructorMarker) { public /* synthetic */ HubDescriptionArgs(long j, long j2, boolean z2, String str, boolean z3, String str2, DirectoryEntryCategory directoryEntryCategory, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(j, j2, z2, str, (i & 16) != 0 ? null : str2, (i & 32) != 0 ? null : directoryEntryCategory); this(j, j2, z2, str, (i & 16) != 0 ? false : z3, (i & 32) != 0 ? null : str2, (i & 64) != 0 ? null : directoryEntryCategory);
} }
public static /* synthetic */ HubDescriptionArgs copy$default(HubDescriptionArgs hubDescriptionArgs, long j, long j2, boolean z2, String str, String str2, DirectoryEntryCategory directoryEntryCategory, int i, Object obj) { public static /* synthetic */ HubDescriptionArgs copy$default(HubDescriptionArgs hubDescriptionArgs, long j, long j2, boolean z2, String str, boolean z3, String str2, DirectoryEntryCategory directoryEntryCategory, int i, Object obj) {
return hubDescriptionArgs.copy((i & 1) != 0 ? hubDescriptionArgs.guildId : j, (i & 2) != 0 ? hubDescriptionArgs.channelId : j2, (i & 4) != 0 ? hubDescriptionArgs.isEditing : z2, (i & 8) != 0 ? hubDescriptionArgs.hubName : str, (i & 16) != 0 ? hubDescriptionArgs.description : str2, (i & 32) != 0 ? hubDescriptionArgs.category : directoryEntryCategory); return hubDescriptionArgs.copy((i & 1) != 0 ? hubDescriptionArgs.guildId : j, (i & 2) != 0 ? hubDescriptionArgs.channelId : j2, (i & 4) != 0 ? hubDescriptionArgs.isEditing : z2, (i & 8) != 0 ? hubDescriptionArgs.hubName : str, (i & 16) != 0 ? hubDescriptionArgs.isNewGuild : z3, (i & 32) != 0 ? hubDescriptionArgs.description : str2, (i & 64) != 0 ? hubDescriptionArgs.category : directoryEntryCategory);
} }
public final long component1() { public final long component1() {
@ -65,17 +67,21 @@ public final class HubDescriptionArgs implements Parcelable {
return this.hubName; return this.hubName;
} }
public final String component5() { public final boolean component5() {
return this.isNewGuild;
}
public final String component6() {
return this.description; return this.description;
} }
public final DirectoryEntryCategory component6() { public final DirectoryEntryCategory component7() {
return this.category; return this.category;
} }
public final HubDescriptionArgs copy(long j, long j2, boolean z2, String str, String str2, DirectoryEntryCategory directoryEntryCategory) { public final HubDescriptionArgs copy(long j, long j2, boolean z2, String str, boolean z3, String str2, DirectoryEntryCategory directoryEntryCategory) {
m.checkNotNullParameter(str, "hubName"); m.checkNotNullParameter(str, "hubName");
return new HubDescriptionArgs(j, j2, z2, str, str2, directoryEntryCategory); return new HubDescriptionArgs(j, j2, z2, str, z3, str2, directoryEntryCategory);
} }
@Override // android.os.Parcelable @Override // android.os.Parcelable
@ -92,7 +98,7 @@ public final class HubDescriptionArgs implements Parcelable {
return false; return false;
} }
HubDescriptionArgs hubDescriptionArgs = (HubDescriptionArgs) obj; HubDescriptionArgs hubDescriptionArgs = (HubDescriptionArgs) obj;
return this.guildId == hubDescriptionArgs.guildId && this.channelId == hubDescriptionArgs.channelId && this.isEditing == hubDescriptionArgs.isEditing && m.areEqual(this.hubName, hubDescriptionArgs.hubName) && m.areEqual(this.description, hubDescriptionArgs.description) && m.areEqual(this.category, hubDescriptionArgs.category); return this.guildId == hubDescriptionArgs.guildId && this.channelId == hubDescriptionArgs.channelId && this.isEditing == hubDescriptionArgs.isEditing && m.areEqual(this.hubName, hubDescriptionArgs.hubName) && this.isNewGuild == hubDescriptionArgs.isNewGuild && m.areEqual(this.description, hubDescriptionArgs.description) && m.areEqual(this.category, hubDescriptionArgs.category);
} }
public final DirectoryEntryCategory getCategory() { public final DirectoryEntryCategory getCategory() {
@ -119,29 +125,39 @@ public final class HubDescriptionArgs implements Parcelable {
public int hashCode() { public int hashCode() {
int a = (b.a(this.channelId) + (b.a(this.guildId) * 31)) * 31; int a = (b.a(this.channelId) + (b.a(this.guildId) * 31)) * 31;
boolean z2 = this.isEditing; boolean z2 = this.isEditing;
int i = 1;
if (z2) { if (z2) {
z2 = true; z2 = true;
} }
int i = z2 ? 1 : 0;
int i2 = z2 ? 1 : 0; int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0; int i3 = z2 ? 1 : 0;
int i4 = (a + i) * 31; int i4 = z2 ? 1 : 0;
int i5 = (a + i2) * 31;
String str = this.hubName; String str = this.hubName;
int i5 = 0; int i6 = 0;
int hashCode = (i4 + (str != null ? str.hashCode() : 0)) * 31; int hashCode = (i5 + (str != null ? str.hashCode() : 0)) * 31;
boolean z3 = this.isNewGuild;
if (!z3) {
i = z3 ? 1 : 0;
}
int i7 = (hashCode + i) * 31;
String str2 = this.description; String str2 = this.description;
int hashCode2 = (hashCode + (str2 != null ? str2.hashCode() : 0)) * 31; int hashCode2 = (i7 + (str2 != null ? str2.hashCode() : 0)) * 31;
DirectoryEntryCategory directoryEntryCategory = this.category; DirectoryEntryCategory directoryEntryCategory = this.category;
if (directoryEntryCategory != null) { if (directoryEntryCategory != null) {
i5 = directoryEntryCategory.hashCode(); i6 = directoryEntryCategory.hashCode();
} }
return hashCode2 + i5; return hashCode2 + i6;
} }
public final boolean isEditing() { public final boolean isEditing() {
return this.isEditing; return this.isEditing;
} }
public final boolean isNewGuild() {
return this.isNewGuild;
}
@Override // java.lang.Object @Override // java.lang.Object
public String toString() { public String toString() {
StringBuilder L = a.L("HubDescriptionArgs(guildId="); StringBuilder L = a.L("HubDescriptionArgs(guildId=");
@ -152,6 +168,8 @@ public final class HubDescriptionArgs implements Parcelable {
L.append(this.isEditing); L.append(this.isEditing);
L.append(", hubName="); L.append(", hubName=");
L.append(this.hubName); L.append(this.hubName);
L.append(", isNewGuild=");
L.append(this.isNewGuild);
L.append(", description="); L.append(", description=");
L.append(this.description); L.append(this.description);
L.append(", category="); L.append(", category=");
@ -167,6 +185,7 @@ public final class HubDescriptionArgs implements Parcelable {
parcel.writeLong(this.channelId); parcel.writeLong(this.channelId);
parcel.writeInt(this.isEditing ? 1 : 0); parcel.writeInt(this.isEditing ? 1 : 0);
parcel.writeString(this.hubName); parcel.writeString(this.hubName);
parcel.writeInt(this.isNewGuild ? 1 : 0);
parcel.writeString(this.description); parcel.writeString(this.description);
DirectoryEntryCategory directoryEntryCategory = this.category; DirectoryEntryCategory directoryEntryCategory = this.category;
if (directoryEntryCategory != null) { if (directoryEntryCategory != null) {

View File

@ -5,7 +5,7 @@ import android.os.Parcelable;
import c.d.b.a.a; import c.d.b.a.a;
import d0.z.d.m; import d0.z.d.m;
import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: DiscordHubEmailViewModel.kt */ /* compiled from: WidgetHubEmailViewModel.kt */
public final class HubEmailArgs implements Parcelable { public final class HubEmailArgs implements Parcelable {
public static final Parcelable.Creator<HubEmailArgs> CREATOR = new Creator(); public static final Parcelable.Creator<HubEmailArgs> CREATOR = new Creator();
private final int guildMemberCount; private final int guildMemberCount;

View File

@ -5,14 +5,14 @@ import com.discord.api.hubs.GuildInfo;
import d0.z.d.o; import d0.z.d.o;
import java.util.List; import java.util.List;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
/* compiled from: DiscordHubEmailViewModel.kt */ /* compiled from: WidgetHubEmailViewModel.kt */
public final class DiscordHubEmailState$hasMultipleDomains$2 extends o implements Function0<Boolean> { public final class HubEmailState$hasMultipleDomains$2 extends o implements Function0<Boolean> {
public final /* synthetic */ DiscordHubEmailState this$0; public final /* synthetic */ HubEmailState this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public DiscordHubEmailState$hasMultipleDomains$2(DiscordHubEmailState discordHubEmailState) { public HubEmailState$hasMultipleDomains$2(HubEmailState hubEmailState) {
super(0); super(0);
this.this$0 = discordHubEmailState; this.this$0 = hubEmailState;
} }
/* Return type fixed from 'boolean' to match base method */ /* Return type fixed from 'boolean' to match base method */

View File

@ -8,43 +8,43 @@ import d0.g;
import d0.z.d.m; import d0.z.d.m;
import kotlin.Lazy; import kotlin.Lazy;
import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: DiscordHubEmailViewModel.kt */ /* compiled from: WidgetHubEmailViewModel.kt */
public final class DiscordHubEmailState { public final class HubEmailState {
private final String email; private final String email;
private final Lazy hasMultipleDomains$delegate; private final Lazy hasMultipleDomains$delegate;
private final RestCallState<EmailVerification> verifyEmailAsync; private final RestCallState<EmailVerification> verifyEmailAsync;
private final HubWaitlistResult waitlistResult; private final HubWaitlistResult waitlistResult;
public DiscordHubEmailState() { public HubEmailState() {
this(null, null, null, 7, null); this(null, null, null, 7, null);
} }
public DiscordHubEmailState(String str, HubWaitlistResult hubWaitlistResult, RestCallState<EmailVerification> restCallState) { public HubEmailState(String str, HubWaitlistResult hubWaitlistResult, RestCallState<EmailVerification> restCallState) {
m.checkNotNullParameter(restCallState, "verifyEmailAsync"); m.checkNotNullParameter(restCallState, "verifyEmailAsync");
this.email = str; this.email = str;
this.waitlistResult = hubWaitlistResult; this.waitlistResult = hubWaitlistResult;
this.verifyEmailAsync = restCallState; this.verifyEmailAsync = restCallState;
this.hasMultipleDomains$delegate = g.lazy(new DiscordHubEmailState$hasMultipleDomains$2(this)); this.hasMultipleDomains$delegate = g.lazy(new HubEmailState$hasMultipleDomains$2(this));
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ DiscordHubEmailState(String str, HubWaitlistResult hubWaitlistResult, RestCallState restCallState, int i, DefaultConstructorMarker defaultConstructorMarker) { public /* synthetic */ HubEmailState(String str, HubWaitlistResult hubWaitlistResult, RestCallState restCallState, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : str, (i & 2) != 0 ? null : hubWaitlistResult, (i & 4) != 0 ? Default.INSTANCE : restCallState); this((i & 1) != 0 ? null : str, (i & 2) != 0 ? null : hubWaitlistResult, (i & 4) != 0 ? Default.INSTANCE : restCallState);
} }
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.hubs.DiscordHubEmailState */ /* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.hubs.HubEmailState */
/* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ DiscordHubEmailState copy$default(DiscordHubEmailState discordHubEmailState, String str, HubWaitlistResult hubWaitlistResult, RestCallState restCallState, int i, Object obj) { public static /* synthetic */ HubEmailState copy$default(HubEmailState hubEmailState, String str, HubWaitlistResult hubWaitlistResult, RestCallState restCallState, int i, Object obj) {
if ((i & 1) != 0) { if ((i & 1) != 0) {
str = discordHubEmailState.email; str = hubEmailState.email;
} }
if ((i & 2) != 0) { if ((i & 2) != 0) {
hubWaitlistResult = discordHubEmailState.waitlistResult; hubWaitlistResult = hubEmailState.waitlistResult;
} }
if ((i & 4) != 0) { if ((i & 4) != 0) {
restCallState = discordHubEmailState.verifyEmailAsync; restCallState = hubEmailState.verifyEmailAsync;
} }
return discordHubEmailState.copy(str, hubWaitlistResult, restCallState); return hubEmailState.copy(str, hubWaitlistResult, restCallState);
} }
public final String component1() { public final String component1() {
@ -59,20 +59,20 @@ public final class DiscordHubEmailState {
return this.verifyEmailAsync; return this.verifyEmailAsync;
} }
public final DiscordHubEmailState copy(String str, HubWaitlistResult hubWaitlistResult, RestCallState<EmailVerification> restCallState) { public final HubEmailState copy(String str, HubWaitlistResult hubWaitlistResult, RestCallState<EmailVerification> restCallState) {
m.checkNotNullParameter(restCallState, "verifyEmailAsync"); m.checkNotNullParameter(restCallState, "verifyEmailAsync");
return new DiscordHubEmailState(str, hubWaitlistResult, restCallState); return new HubEmailState(str, hubWaitlistResult, restCallState);
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) { if (this == obj) {
return true; return true;
} }
if (!(obj instanceof DiscordHubEmailState)) { if (!(obj instanceof HubEmailState)) {
return false; return false;
} }
DiscordHubEmailState discordHubEmailState = (DiscordHubEmailState) obj; HubEmailState hubEmailState = (HubEmailState) obj;
return m.areEqual(this.email, discordHubEmailState.email) && m.areEqual(this.waitlistResult, discordHubEmailState.waitlistResult) && m.areEqual(this.verifyEmailAsync, discordHubEmailState.verifyEmailAsync); return m.areEqual(this.email, hubEmailState.email) && m.areEqual(this.waitlistResult, hubEmailState.waitlistResult) && m.areEqual(this.verifyEmailAsync, hubEmailState.verifyEmailAsync);
} }
public final String getEmail() { public final String getEmail() {
@ -105,7 +105,7 @@ public final class DiscordHubEmailState {
} }
public String toString() { public String toString() {
StringBuilder L = a.L("DiscordHubEmailState(email="); StringBuilder L = a.L("HubEmailState(email=");
L.append(this.email); L.append(this.email);
L.append(", waitlistResult="); L.append(", waitlistResult=");
L.append(this.waitlistResult); L.append(this.waitlistResult);

View File

@ -3,7 +3,7 @@ package com.discord.widgets.hubs;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.ViewGroup; import android.view.ViewGroup;
import com.discord.databinding.DiscordHubAddServerListItemBinding; import com.discord.databinding.DiscordHubAddServerListItemBinding;
import d0.z.d.k; import d0.z.d.a;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
@ -15,9 +15,9 @@ public final class WidgetHubAddServer$adapter$1 extends o implements Function2<L
/* compiled from: WidgetHubAddServer.kt */ /* compiled from: WidgetHubAddServer.kt */
/* renamed from: com.discord.widgets.hubs.WidgetHubAddServer$adapter$1$1 reason: invalid class name */ /* renamed from: com.discord.widgets.hubs.WidgetHubAddServer$adapter$1$1 reason: invalid class name */
public static final /* synthetic */ class AnonymousClass1 extends k implements Function1<Long, Unit> { public static final /* synthetic */ class AnonymousClass1 extends a implements Function1<Long, Unit> {
public AnonymousClass1(WidgetHubAddServer widgetHubAddServer) { public AnonymousClass1(WidgetHubAddServer widgetHubAddServer) {
super(1, widgetHubAddServer, WidgetHubAddServer.class, "onServerClickListener", "onServerClickListener(J)V", 0); super(1, widgetHubAddServer, WidgetHubAddServer.class, "onServerClickListener", "onServerClickListener(JZ)V", 0);
} }
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
@ -29,7 +29,7 @@ public final class WidgetHubAddServer$adapter$1 extends o implements Function2<L
} }
public final void invoke(long j) { public final void invoke(long j) {
WidgetHubAddServer.access$onServerClickListener((WidgetHubAddServer) this.receiver, j); WidgetHubAddServer.onServerClickListener$default((WidgetHubAddServer) this.receiver, j, false, 2, null);
} }
} }

View File

@ -12,7 +12,7 @@ import com.discord.widgets.nux.GuildCreateArgs;
import com.discord.widgets.nux.GuildTemplateAnalytics; import com.discord.widgets.nux.GuildTemplateAnalytics;
import com.discord.widgets.nux.GuildTemplateArgs; import com.discord.widgets.nux.GuildTemplateArgs;
import com.discord.widgets.nux.GuildTemplateTypes; import com.discord.widgets.nux.GuildTemplateTypes;
import com.discord.widgets.nux.WidgetGuildTemplates; import com.discord.widgets.nux.WidgetHubGuildTemplates;
import d0.z.d.m; import d0.z.d.m;
/* compiled from: WidgetHubAddServer.kt */ /* compiled from: WidgetHubAddServer.kt */
public final class WidgetHubAddServer$configureUI$1 implements View.OnClickListener { public final class WidgetHubAddServer$configureUI$1 implements View.OnClickListener {
@ -35,7 +35,7 @@ public final class WidgetHubAddServer$configureUI$1 implements View.OnClickListe
String obj = b.h(context, R.string.hub_create_or_add_guild_title, new Object[]{this.$state.getGuildName()}, null, 4).toString(); String obj = b.h(context, R.string.hub_create_or_add_guild_title, new Object[]{this.$state.getGuildName()}, null, 4).toString();
String string = context.getString(R.string.hub_create_or_add_guild_subtitle); String string = context.getString(R.string.hub_create_or_add_guild_subtitle);
m.checkNotNullExpressionValue(string, "context.getString(R.stri…te_or_add_guild_subtitle)"); m.checkNotNullExpressionValue(string, "context.getString(R.stri…te_or_add_guild_subtitle)");
jVar.f(context, access$getLauncher$p, WidgetGuildTemplates.class, new GuildCreateArgs(false, GuildTemplateAnalytics.IN_APP_LOCATION_TEMPLATE, createGuildTrigger, new GuildTemplateArgs(obj, string, GuildTemplateTypes.INSTANCE.getHUB(), false, true), true)); jVar.f(context, access$getLauncher$p, WidgetHubGuildTemplates.class, new GuildCreateArgs(false, GuildTemplateAnalytics.IN_APP_LOCATION_TEMPLATE, createGuildTrigger, new GuildTemplateArgs(obj, string, GuildTemplateTypes.INSTANCE.getHUB(), false, true), true));
} }
} }
} }

View File

@ -22,7 +22,7 @@ public final class WidgetHubAddServer$launcher$1<O> implements ActivityResultCal
data = null; data = null;
} }
if (data != null && (result = (WidgetGuildCreate.Result) data.getParcelableExtra("intent_args_key")) != null) { if (data != null && (result = (WidgetGuildCreate.Result) data.getParcelableExtra("intent_args_key")) != null) {
WidgetHubAddServer.access$onServerClickListener(this.this$0, result.getGuildId()); WidgetHubAddServer.access$onServerClickListener(this.this$0, result.getGuildId(), true);
} }
} }
} }

View File

@ -0,0 +1,20 @@
package com.discord.widgets.hubs;
import com.discord.analytics.generated.events.impression.TrackImpressionHubExistingGuildChoose;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.o;
import kotlin.jvm.functions.Function0;
/* compiled from: WidgetHubAddServer.kt */
public final class WidgetHubAddServer$loggingConfig$1 extends o implements Function0<AnalyticsSchema> {
public static final WidgetHubAddServer$loggingConfig$1 INSTANCE = new WidgetHubAddServer$loggingConfig$1();
public WidgetHubAddServer$loggingConfig$1() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final AnalyticsSchema mo1invoke() {
return new TrackImpressionHubExistingGuildChoose();
}
}

View File

@ -15,6 +15,7 @@ import c.a.k.b;
import c.d.b.a.a; import c.d.b.a.a;
import com.discord.R; import com.discord.R;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.app.LoggingConfig;
import com.discord.databinding.WidgetHubAddServerBinding; import com.discord.databinding.WidgetHubAddServerBinding;
import com.discord.models.guild.Guild; import com.discord.models.guild.Guild;
import com.discord.utilities.hubs.HubUtilsKt; import com.discord.utilities.hubs.HubUtilsKt;
@ -36,6 +37,7 @@ public final class WidgetHubAddServer extends AppFragment {
private final SimpleRecyclerAdapter<Guild, DiscordHubAddServerViewHolder> adapter = new SimpleRecyclerAdapter<>(null, new WidgetHubAddServer$adapter$1(this), 1, null); private final SimpleRecyclerAdapter<Guild, DiscordHubAddServerViewHolder> adapter = new SimpleRecyclerAdapter<>(null, new WidgetHubAddServer$adapter$1(this), 1, null);
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetHubAddServer$binding$2.INSTANCE, null, 2, null); private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetHubAddServer$binding$2.INSTANCE, null, 2, null);
private final ActivityResultLauncher<Intent> launcher; private final ActivityResultLauncher<Intent> launcher;
private final LoggingConfig loggingConfig;
private final Lazy viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(WidgetDiscordHubAddServerViewModel.class), new WidgetHubAddServer$appActivityViewModels$$inlined$activityViewModels$1(this), new e0(WidgetHubAddServer$viewModel$2.INSTANCE)); private final Lazy viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(WidgetDiscordHubAddServerViewModel.class), new WidgetHubAddServer$appActivityViewModels$$inlined$activityViewModels$1(this), new e0(WidgetHubAddServer$viewModel$2.INSTANCE));
/* compiled from: WidgetHubAddServer.kt */ /* compiled from: WidgetHubAddServer.kt */
@ -56,8 +58,9 @@ public final class WidgetHubAddServer extends AppFragment {
public WidgetHubAddServer() { public WidgetHubAddServer() {
super(R.layout.widget_hub_add_server); super(R.layout.widget_hub_add_server);
ActivityResultLauncher<Intent> registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new WidgetHubAddServer$launcher$1(this)); ActivityResultLauncher<Intent> registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new WidgetHubAddServer$launcher$1(this));
m.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul…istener(it.guildId) }\n }"); m.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul… isNewGuild = true) }\n }");
this.launcher = registerForActivityResult; this.launcher = registerForActivityResult;
this.loggingConfig = new LoggingConfig(false, null, WidgetHubAddServer$loggingConfig$1.INSTANCE, 3);
} }
public static final /* synthetic */ void access$configureUI(WidgetHubAddServer widgetHubAddServer, DiscordHubAddServerState discordHubAddServerState) { public static final /* synthetic */ void access$configureUI(WidgetHubAddServer widgetHubAddServer, DiscordHubAddServerState discordHubAddServerState) {
@ -68,8 +71,8 @@ public final class WidgetHubAddServer extends AppFragment {
return widgetHubAddServer.launcher; return widgetHubAddServer.launcher;
} }
public static final /* synthetic */ void access$onServerClickListener(WidgetHubAddServer widgetHubAddServer, long j) { public static final /* synthetic */ void access$onServerClickListener(WidgetHubAddServer widgetHubAddServer, long j, boolean z2) {
widgetHubAddServer.onServerClickListener(j); widgetHubAddServer.onServerClickListener(j, z2);
} }
private final void configureUI(DiscordHubAddServerState discordHubAddServerState) { private final void configureUI(DiscordHubAddServerState discordHubAddServerState) {
@ -78,17 +81,24 @@ public final class WidgetHubAddServer extends AppFragment {
getBinding().b.setOnClickListener(new WidgetHubAddServer$configureUI$1(this, discordHubAddServerState)); getBinding().b.setOnClickListener(new WidgetHubAddServer$configureUI$1(this, discordHubAddServerState));
} }
private final void onServerClickListener(long j) { private final void onServerClickListener(long j, boolean z2) {
Context context = getContext(); Context context = getContext();
if (context != null) { if (context != null) {
m.checkNotNullExpressionValue(context, "context ?: return"); m.checkNotNullExpressionValue(context, "context ?: return");
Long channelId = getViewModel().getChannelId(); Long channelId = getViewModel().getChannelId();
if (channelId != null) { if (channelId != null) {
j.g(j.g, getParentFragmentManager(), context, WidgetHubDescription.class, 0, true, null, new HubDescriptionArgs(j, channelId.longValue(), false, getViewModel().getHubName(), null, null, 48, null), 40); j.g(j.g, getParentFragmentManager(), context, WidgetHubDescription.class, 0, true, null, new HubDescriptionArgs(j, channelId.longValue(), false, getViewModel().getHubName(), z2, null, null, 96, null), 40);
} }
} }
} }
public static /* synthetic */ void onServerClickListener$default(WidgetHubAddServer widgetHubAddServer, long j, boolean z2, int i, Object obj) {
if ((i & 2) != 0) {
z2 = false;
}
widgetHubAddServer.onServerClickListener(j, z2);
}
public final SimpleRecyclerAdapter<Guild, DiscordHubAddServerViewHolder> getAdapter() { public final SimpleRecyclerAdapter<Guild, DiscordHubAddServerViewHolder> getAdapter() {
return this.adapter; return this.adapter;
} }
@ -97,6 +107,11 @@ public final class WidgetHubAddServer extends AppFragment {
return (WidgetHubAddServerBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]); return (WidgetHubAddServerBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]);
} }
@Override // com.discord.app.AppFragment, com.discord.app.AppLogger.a
public LoggingConfig getLoggingConfig() {
return this.loggingConfig;
}
public final WidgetDiscordHubAddServerViewModel getViewModel() { public final WidgetDiscordHubAddServerViewModel getViewModel() {
return (WidgetDiscordHubAddServerViewModel) this.viewModel$delegate.getValue(); return (WidgetDiscordHubAddServerViewModel) this.viewModel$delegate.getValue();
} }

View File

@ -0,0 +1,23 @@
package com.discord.widgets.hubs;
import com.discord.analytics.generated.events.impression.TrackImpressionHubCreateGuildCustomize;
import com.discord.analytics.generated.events.impression.TrackImpressionHubExistingGuildCustomize;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.o;
import kotlin.jvm.functions.Function0;
/* compiled from: WidgetHubDescription.kt */
public final class WidgetHubDescription$loggingConfig$1 extends o implements Function0<AnalyticsSchema> {
public final /* synthetic */ WidgetHubDescription this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetHubDescription$loggingConfig$1(WidgetHubDescription widgetHubDescription) {
super(0);
this.this$0 = widgetHubDescription;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final AnalyticsSchema mo1invoke() {
return this.this$0.getArgs().isNewGuild() ? new TrackImpressionHubCreateGuildCustomize() : new TrackImpressionHubExistingGuildCustomize();
}
}

View File

@ -16,6 +16,6 @@ public final class WidgetHubDescription$viewModel$2 extends o implements Functio
@Override // kotlin.jvm.functions.Function0 @Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */ /* renamed from: invoke */
public final AppViewModel<HubDescriptionState> mo1invoke() { public final AppViewModel<HubDescriptionState> mo1invoke() {
return new WidgetDiscordHubsDescriptionViewModel(this.this$0.getArgs().getGuildId(), this.this$0.getArgs().isEditing(), this.this$0.getArgs().getCategory(), null, null, 24, null); return new WidgetHubDescriptionViewModel(this.this$0.getArgs().getGuildId(), this.this$0.getArgs().isEditing(), this.this$0.getArgs().getCategory(), null, null, 24, null);
} }
} }

View File

@ -11,6 +11,7 @@ import c.a.k.b;
import c.d.b.a.a; import c.d.b.a.a;
import com.discord.R; import com.discord.R;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.app.LoggingConfig;
import com.discord.databinding.WidgetHubDescriptionBinding; import com.discord.databinding.WidgetHubDescriptionBinding;
import com.discord.models.hubs.DirectoryEntryCategory; import com.discord.models.hubs.DirectoryEntryCategory;
import com.discord.models.hubs.DirectoryEntryCategoryKt; import com.discord.models.hubs.DirectoryEntryCategoryKt;
@ -37,6 +38,7 @@ public final class WidgetHubDescription extends AppFragment {
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.W(WidgetHubDescription.class, "binding", "getBinding()Lcom/discord/databinding/WidgetHubDescriptionBinding;", 0)}; public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.W(WidgetHubDescription.class, "binding", "getBinding()Lcom/discord/databinding/WidgetHubDescriptionBinding;", 0)};
private final Lazy args$delegate = g.lazy(new WidgetHubDescription$$special$$inlined$args$1(this, "intent_args_key")); private final Lazy args$delegate = g.lazy(new WidgetHubDescription$$special$$inlined$args$1(this, "intent_args_key"));
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetHubDescription$binding$2.INSTANCE, null, 2, null); private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetHubDescription$binding$2.INSTANCE, null, 2, null);
private final LoggingConfig loggingConfig;
private final Lazy validationManager$delegate; private final Lazy validationManager$delegate;
private final Lazy viewModel$delegate; private final Lazy viewModel$delegate;
@ -44,8 +46,9 @@ public final class WidgetHubDescription extends AppFragment {
super(R.layout.widget_hub_description); super(R.layout.widget_hub_description);
WidgetHubDescription$viewModel$2 widgetHubDescription$viewModel$2 = new WidgetHubDescription$viewModel$2(this); WidgetHubDescription$viewModel$2 widgetHubDescription$viewModel$2 = new WidgetHubDescription$viewModel$2(this);
f0 f0Var = new f0(this); f0 f0Var = new f0(this);
this.viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(WidgetDiscordHubsDescriptionViewModel.class), new WidgetHubDescription$appViewModels$$inlined$viewModels$1(f0Var), new h0(widgetHubDescription$viewModel$2)); this.viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(WidgetHubDescriptionViewModel.class), new WidgetHubDescription$appViewModels$$inlined$viewModels$1(f0Var), new h0(widgetHubDescription$viewModel$2));
this.validationManager$delegate = g.lazy(new WidgetHubDescription$validationManager$2(this)); this.validationManager$delegate = g.lazy(new WidgetHubDescription$validationManager$2(this));
this.loggingConfig = new LoggingConfig(false, null, new WidgetHubDescription$loggingConfig$1(this), 3);
} }
public static final /* synthetic */ void access$configureUI(WidgetHubDescription widgetHubDescription, HubDescriptionState hubDescriptionState) { public static final /* synthetic */ void access$configureUI(WidgetHubDescription widgetHubDescription, HubDescriptionState hubDescriptionState) {
@ -84,7 +87,7 @@ public final class WidgetHubDescription extends AppFragment {
private final void maybeAddServer() { private final void maybeAddServer() {
if (getValidationManager().validate(true)) { if (getValidationManager().validate(true)) {
WidgetDiscordHubsDescriptionViewModel viewModel = getViewModel(); WidgetHubDescriptionViewModel viewModel = getViewModel();
long channelId = getArgs().getChannelId(); long channelId = getArgs().getChannelId();
long guildId = getArgs().getGuildId(); long guildId = getArgs().getGuildId();
TextInputEditText textInputEditText = getBinding().f; TextInputEditText textInputEditText = getBinding().f;
@ -101,6 +104,11 @@ public final class WidgetHubDescription extends AppFragment {
return (WidgetHubDescriptionBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]); return (WidgetHubDescriptionBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]);
} }
@Override // com.discord.app.AppFragment, com.discord.app.AppLogger.a
public LoggingConfig getLoggingConfig() {
return this.loggingConfig;
}
public final RadioSelectorItems getSelectorArgs() { public final RadioSelectorItems getSelectorArgs() {
String string = requireContext().getString(R.string.categories); String string = requireContext().getString(R.string.categories);
m.checkNotNullExpressionValue(string, "requireContext().getString(R.string.categories)"); m.checkNotNullExpressionValue(string, "requireContext().getString(R.string.categories)");
@ -119,8 +127,8 @@ public final class WidgetHubDescription extends AppFragment {
return new RadioSelectorItems(string, arrayList); return new RadioSelectorItems(string, arrayList);
} }
public final WidgetDiscordHubsDescriptionViewModel getViewModel() { public final WidgetHubDescriptionViewModel getViewModel() {
return (WidgetDiscordHubsDescriptionViewModel) this.viewModel$delegate.getValue(); return (WidgetHubDescriptionViewModel) this.viewModel$delegate.getValue();
} }
@Override // com.discord.app.AppFragment @Override // com.discord.app.AppFragment

View File

@ -5,12 +5,12 @@ import com.discord.stores.StoreGuilds;
import d0.z.d.o; import d0.z.d.o;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
/* compiled from: WidgetHubDescriptionViewModel.kt */ /* compiled from: WidgetHubDescriptionViewModel.kt */
public final class WidgetDiscordHubsDescriptionViewModel$Companion$observeStores$1 extends o implements Function0<HubDescriptionState> { public final class WidgetHubDescriptionViewModel$Companion$observeStores$1 extends o implements Function0<HubDescriptionState> {
public final /* synthetic */ long $guildId; public final /* synthetic */ long $guildId;
public final /* synthetic */ StoreGuilds $guildStore; public final /* synthetic */ StoreGuilds $guildStore;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDiscordHubsDescriptionViewModel$Companion$observeStores$1(StoreGuilds storeGuilds, long j) { public WidgetHubDescriptionViewModel$Companion$observeStores$1(StoreGuilds storeGuilds, long j) {
super(0); super(0);
this.$guildStore = storeGuilds; this.$guildStore = storeGuilds;
this.$guildId = j; this.$guildId = j;

View File

@ -0,0 +1,26 @@
package com.discord.widgets.hubs;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionDirectoryGuildEntryCreate;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.directory.DirectoryEntry;
import com.discord.models.hubs.DirectoryEntryCategory;
import d0.z.d.o;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetHubDescriptionViewModel.kt */
public final class WidgetHubDescriptionViewModel$addServer$1 extends o implements Function1<DirectoryEntry, TrackNetworkMetadataReceiver> {
public final /* synthetic */ DirectoryEntryCategory $category;
public final /* synthetic */ long $channelId;
public final /* synthetic */ long $guildId;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetHubDescriptionViewModel$addServer$1(long j, long j2, DirectoryEntryCategory directoryEntryCategory) {
super(1);
this.$channelId = j;
this.$guildId = j2;
this.$category = directoryEntryCategory;
}
public final TrackNetworkMetadataReceiver invoke(DirectoryEntry directoryEntry) {
return new TrackNetworkActionDirectoryGuildEntryCreate(Long.valueOf(this.$channelId), Long.valueOf(this.$guildId), Integer.valueOf(this.$category.getKey()));
}
}

View File

@ -7,14 +7,14 @@ import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetHubDescriptionViewModel.kt */ /* compiled from: WidgetHubDescriptionViewModel.kt */
public final class WidgetDiscordHubsDescriptionViewModel$addServer$1 extends o implements Function1<RestCallState<? extends DirectoryEntry>, Unit> { public final class WidgetHubDescriptionViewModel$addServer$2 extends o implements Function1<RestCallState<? extends DirectoryEntry>, Unit> {
public final /* synthetic */ HubDescriptionState $state; public final /* synthetic */ HubDescriptionState $state;
public final /* synthetic */ WidgetDiscordHubsDescriptionViewModel this$0; public final /* synthetic */ WidgetHubDescriptionViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDiscordHubsDescriptionViewModel$addServer$1(WidgetDiscordHubsDescriptionViewModel widgetDiscordHubsDescriptionViewModel, HubDescriptionState hubDescriptionState) { public WidgetHubDescriptionViewModel$addServer$2(WidgetHubDescriptionViewModel widgetHubDescriptionViewModel, HubDescriptionState hubDescriptionState) {
super(1); super(1);
this.this$0 = widgetDiscordHubsDescriptionViewModel; this.this$0 = widgetHubDescriptionViewModel;
this.$state = hubDescriptionState; this.$state = hubDescriptionState;
} }
@ -28,6 +28,6 @@ public final class WidgetDiscordHubsDescriptionViewModel$addServer$1 extends o i
public final void invoke(RestCallState<DirectoryEntry> restCallState) { public final void invoke(RestCallState<DirectoryEntry> restCallState) {
m.checkNotNullParameter(restCallState, "it"); m.checkNotNullParameter(restCallState, "it");
WidgetDiscordHubsDescriptionViewModel.access$updateViewState(this.this$0, HubDescriptionState.copy$default(this.$state, 0, null, null, restCallState, 7, null)); WidgetHubDescriptionViewModel.access$updateViewState(this.this$0, HubDescriptionState.copy$default(this.$state, 0, null, null, restCallState, 7, null));
} }
} }

View File

@ -20,7 +20,7 @@ import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.DefaultConstructorMarker;
import rx.Observable; import rx.Observable;
/* compiled from: WidgetHubDescriptionViewModel.kt */ /* compiled from: WidgetHubDescriptionViewModel.kt */
public final class WidgetDiscordHubsDescriptionViewModel extends AppViewModel<HubDescriptionState> { public final class WidgetHubDescriptionViewModel extends AppViewModel<HubDescriptionState> {
public static final Companion Companion = new Companion(null); public static final Companion Companion = new Companion(null);
private final long guildId; private final long guildId;
private final boolean isEditing; private final boolean isEditing;
@ -28,10 +28,10 @@ public final class WidgetDiscordHubsDescriptionViewModel extends AppViewModel<Hu
private final DirectoryEntryCategory selectedCategory; private final DirectoryEntryCategory selectedCategory;
/* compiled from: WidgetHubDescriptionViewModel.kt */ /* compiled from: WidgetHubDescriptionViewModel.kt */
/* renamed from: com.discord.widgets.hubs.WidgetDiscordHubsDescriptionViewModel$1 reason: invalid class name */ /* renamed from: com.discord.widgets.hubs.WidgetHubDescriptionViewModel$1 reason: invalid class name */
public static final /* synthetic */ class AnonymousClass1 extends a implements Function1<HubDescriptionState, Unit> { public static final /* synthetic */ class AnonymousClass1 extends a implements Function1<HubDescriptionState, Unit> {
public AnonymousClass1(WidgetDiscordHubsDescriptionViewModel widgetDiscordHubsDescriptionViewModel) { public AnonymousClass1(WidgetHubDescriptionViewModel widgetHubDescriptionViewModel) {
super(1, widgetDiscordHubsDescriptionViewModel, WidgetDiscordHubsDescriptionViewModel.class, "handleStoreUpdate", "handleStoreUpdate(Lcom/discord/widgets/hubs/HubDescriptionState;)Lkotlin/Unit;", 8); super(1, widgetHubDescriptionViewModel, WidgetHubDescriptionViewModel.class, "handleStoreUpdate", "handleStoreUpdate(Lcom/discord/widgets/hubs/HubDescriptionState;)Lkotlin/Unit;", 8);
} }
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
@ -44,7 +44,7 @@ public final class WidgetDiscordHubsDescriptionViewModel extends AppViewModel<Hu
public final void invoke(HubDescriptionState hubDescriptionState) { public final void invoke(HubDescriptionState hubDescriptionState) {
m.checkNotNullParameter(hubDescriptionState, "p1"); m.checkNotNullParameter(hubDescriptionState, "p1");
((WidgetDiscordHubsDescriptionViewModel) this.receiver).handleStoreUpdate(hubDescriptionState); ((WidgetHubDescriptionViewModel) this.receiver).handleStoreUpdate(hubDescriptionState);
} }
} }
@ -60,12 +60,12 @@ public final class WidgetDiscordHubsDescriptionViewModel extends AppViewModel<Hu
public final Observable<HubDescriptionState> observeStores(long j, ObservationDeck observationDeck, StoreGuilds storeGuilds) { public final Observable<HubDescriptionState> observeStores(long j, ObservationDeck observationDeck, StoreGuilds storeGuilds) {
m.checkNotNullParameter(observationDeck, "observationDeck"); m.checkNotNullParameter(observationDeck, "observationDeck");
m.checkNotNullParameter(storeGuilds, "guildStore"); m.checkNotNullParameter(storeGuilds, "guildStore");
return ObservationDeck.connectRx$default(observationDeck, new ObservationDeck.UpdateSource[]{storeGuilds}, false, null, null, new WidgetDiscordHubsDescriptionViewModel$Companion$observeStores$1(storeGuilds, j), 14, null); return ObservationDeck.connectRx$default(observationDeck, new ObservationDeck.UpdateSource[]{storeGuilds}, false, null, null, new WidgetHubDescriptionViewModel$Companion$observeStores$1(storeGuilds, j), 14, null);
} }
} }
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDiscordHubsDescriptionViewModel(long j, boolean z2, DirectoryEntryCategory directoryEntryCategory, RestAPI restAPI, Observable<HubDescriptionState> observable) { public WidgetHubDescriptionViewModel(long j, boolean z2, DirectoryEntryCategory directoryEntryCategory, RestAPI restAPI, Observable<HubDescriptionState> observable) {
super(new HubDescriptionState(0, directoryEntryCategory, null, null, 13, null)); super(new HubDescriptionState(0, directoryEntryCategory, null, null, 13, null));
m.checkNotNullParameter(restAPI, "restAPI"); m.checkNotNullParameter(restAPI, "restAPI");
m.checkNotNullParameter(observable, "storeObservable"); m.checkNotNullParameter(observable, "storeObservable");
@ -73,16 +73,16 @@ public final class WidgetDiscordHubsDescriptionViewModel extends AppViewModel<Hu
this.isEditing = z2; this.isEditing = z2;
this.selectedCategory = directoryEntryCategory; this.selectedCategory = directoryEntryCategory;
this.restAPI = restAPI; this.restAPI = restAPI;
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.computationLatest(observable), this, null, 2, null), WidgetDiscordHubsDescriptionViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.computationLatest(observable), this, null, 2, null), WidgetHubDescriptionViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null);
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ WidgetDiscordHubsDescriptionViewModel(long j, boolean z2, DirectoryEntryCategory directoryEntryCategory, RestAPI restAPI, Observable observable, int i, DefaultConstructorMarker defaultConstructorMarker) { public /* synthetic */ WidgetHubDescriptionViewModel(long j, boolean z2, DirectoryEntryCategory directoryEntryCategory, RestAPI restAPI, Observable observable, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(j, z2, directoryEntryCategory, (i & 8) != 0 ? RestAPI.Companion.getApi() : restAPI, (i & 16) != 0 ? Companion.observeStores(j, ObservationDeckProvider.get(), StoreStream.Companion.getGuilds()) : observable); this(j, z2, directoryEntryCategory, (i & 8) != 0 ? RestAPI.Companion.getApi() : restAPI, (i & 16) != 0 ? Companion.observeStores(j, ObservationDeckProvider.get(), StoreStream.Companion.getGuilds()) : observable);
} }
public static final /* synthetic */ void access$updateViewState(WidgetDiscordHubsDescriptionViewModel widgetDiscordHubsDescriptionViewModel, HubDescriptionState hubDescriptionState) { public static final /* synthetic */ void access$updateViewState(WidgetHubDescriptionViewModel widgetHubDescriptionViewModel, HubDescriptionState hubDescriptionState) {
widgetDiscordHubsDescriptionViewModel.updateViewState(hubDescriptionState); widgetHubDescriptionViewModel.updateViewState(hubDescriptionState);
} }
public final void addServer(long j, long j2, String str) { public final void addServer(long j, long j2, String str) {
@ -90,7 +90,7 @@ public final class WidgetDiscordHubsDescriptionViewModel extends AppViewModel<Hu
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_DESCRIPTION); m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_DESCRIPTION);
HubDescriptionState viewState = getViewState(); HubDescriptionState viewState = getViewState();
if (viewState != null && (selectedCategory = viewState.getSelectedCategory()) != null) { if (viewState != null && (selectedCategory = viewState.getSelectedCategory()) != null) {
RestCallStateKt.executeRequest(this.isEditing ? this.restAPI.modifyServerInHub(j, j2, new RestAPIParams.AddServerBody(str, selectedCategory.getKey())) : this.restAPI.addServerToHub(j, j2, new RestAPIParams.AddServerBody(str, selectedCategory.getKey())), new WidgetDiscordHubsDescriptionViewModel$addServer$1(this, viewState)); RestCallStateKt.executeRequest(this.isEditing ? this.restAPI.modifyServerInHub(j, j2, new RestAPIParams.AddServerBody(str, selectedCategory.getKey())) : RestCallStateKt.logNetworkAction(this.restAPI.addServerToHub(j, j2, new RestAPIParams.AddServerBody(str, selectedCategory.getKey())), WidgetHubDescriptionViewModel.class, new WidgetHubDescriptionViewModel$addServer$1(j, j2, selectedCategory)), new WidgetHubDescriptionViewModel$addServer$2(this, viewState));
} }
} }

View File

@ -1,6 +1,6 @@
package com.discord.widgets.hubs; package com.discord.widgets.hubs;
import com.discord.analytics.generated.events.impression.TrackImpressionHubWaitlistSignup; import com.discord.analytics.generated.events.impression.TrackImpressionHubEmailSignup;
import com.discord.api.science.AnalyticsSchema; import com.discord.api.science.AnalyticsSchema;
import d0.z.d.o; import d0.z.d.o;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
@ -15,6 +15,6 @@ public final class WidgetHubEmailFlow$loggingConfig$1 extends o implements Funct
@Override // kotlin.jvm.functions.Function0 @Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */ /* renamed from: invoke */
public final AnalyticsSchema mo1invoke() { public final AnalyticsSchema mo1invoke() {
return new TrackImpressionHubWaitlistSignup(); return new TrackImpressionHubEmailSignup();
} }
} }

View File

@ -5,7 +5,7 @@ import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetHubEmailFlow.kt */ /* compiled from: WidgetHubEmailFlow.kt */
public final class WidgetHubEmailFlow$onViewBoundOrOnResume$1 extends o implements Function1<DiscordHubEmailState, Unit> { public final class WidgetHubEmailFlow$onViewBoundOrOnResume$1 extends o implements Function1<HubEmailState, Unit> {
public final /* synthetic */ WidgetHubEmailFlow this$0; public final /* synthetic */ WidgetHubEmailFlow this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -17,14 +17,14 @@ public final class WidgetHubEmailFlow$onViewBoundOrOnResume$1 extends o implemen
/* Return type fixed from 'java.lang.Object' to match base method */ /* 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] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(DiscordHubEmailState discordHubEmailState) { public /* bridge */ /* synthetic */ Unit invoke(HubEmailState hubEmailState) {
invoke(discordHubEmailState); invoke(hubEmailState);
return Unit.a; return Unit.a;
} }
public final void invoke(DiscordHubEmailState discordHubEmailState) { public final void invoke(HubEmailState hubEmailState) {
WidgetHubEmailFlow widgetHubEmailFlow = this.this$0; WidgetHubEmailFlow widgetHubEmailFlow = this.this$0;
m.checkNotNullExpressionValue(discordHubEmailState, "viewState"); m.checkNotNullExpressionValue(hubEmailState, "viewState");
WidgetHubEmailFlow.access$updateView(widgetHubEmailFlow, discordHubEmailState); WidgetHubEmailFlow.access$updateView(widgetHubEmailFlow, hubEmailState);
} }
} }

View File

@ -19,14 +19,14 @@ import kotlin.jvm.functions.Function1;
public final class WidgetHubEmailFlow$updateView$4 extends o implements Function1<Success<? extends EmailVerification>, Unit> { public final class WidgetHubEmailFlow$updateView$4 extends o implements Function1<Success<? extends EmailVerification>, Unit> {
public final /* synthetic */ Context $context; public final /* synthetic */ Context $context;
public final /* synthetic */ String $email; public final /* synthetic */ String $email;
public final /* synthetic */ DiscordHubEmailState $state; public final /* synthetic */ HubEmailState $state;
public final /* synthetic */ WidgetHubEmailFlow this$0; public final /* synthetic */ WidgetHubEmailFlow this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetHubEmailFlow$updateView$4(WidgetHubEmailFlow widgetHubEmailFlow, DiscordHubEmailState discordHubEmailState, Context context, String str) { public WidgetHubEmailFlow$updateView$4(WidgetHubEmailFlow widgetHubEmailFlow, HubEmailState hubEmailState, Context context, String str) {
super(1); super(1);
this.this$0 = widgetHubEmailFlow; this.this$0 = widgetHubEmailFlow;
this.$state = discordHubEmailState; this.$state = hubEmailState;
this.$context = context; this.$context = context;
this.$email = str; this.$email = str;
} }

View File

@ -4,7 +4,7 @@ import com.discord.app.AppViewModel;
import d0.z.d.o; import d0.z.d.o;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
/* compiled from: WidgetHubEmailFlow.kt */ /* compiled from: WidgetHubEmailFlow.kt */
public final class WidgetHubEmailFlow$viewModel$2 extends o implements Function0<AppViewModel<DiscordHubEmailState>> { public final class WidgetHubEmailFlow$viewModel$2 extends o implements Function0<AppViewModel<HubEmailState>> {
public static final WidgetHubEmailFlow$viewModel$2 INSTANCE = new WidgetHubEmailFlow$viewModel$2(); public static final WidgetHubEmailFlow$viewModel$2 INSTANCE = new WidgetHubEmailFlow$viewModel$2();
public WidgetHubEmailFlow$viewModel$2() { public WidgetHubEmailFlow$viewModel$2() {
@ -13,7 +13,7 @@ public final class WidgetHubEmailFlow$viewModel$2 extends o implements Function0
@Override // kotlin.jvm.functions.Function0 @Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */ /* renamed from: invoke */
public final AppViewModel<DiscordHubEmailState> mo1invoke() { public final AppViewModel<HubEmailState> mo1invoke() {
return new DiscordHubEmailViewModel(null, false, 3, null); return new WidgetHubEmailViewModel(null, false, 3, null);
} }
} }

View File

@ -60,7 +60,7 @@ public final class WidgetHubEmailFlow extends AppFragment {
this.activityResultHandler = registerForActivityResult; this.activityResultHandler = registerForActivityResult;
WidgetHubEmailFlow$viewModel$2 widgetHubEmailFlow$viewModel$2 = WidgetHubEmailFlow$viewModel$2.INSTANCE; WidgetHubEmailFlow$viewModel$2 widgetHubEmailFlow$viewModel$2 = WidgetHubEmailFlow$viewModel$2.INSTANCE;
f0 f0Var = new f0(this); f0 f0Var = new f0(this);
this.viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(DiscordHubEmailViewModel.class), new WidgetHubEmailFlow$appViewModels$$inlined$viewModels$1(f0Var), new h0(widgetHubEmailFlow$viewModel$2)); this.viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(WidgetHubEmailViewModel.class), new WidgetHubEmailFlow$appViewModels$$inlined$viewModels$1(f0Var), new h0(widgetHubEmailFlow$viewModel$2));
this.validationManager$delegate = g.lazy(new WidgetHubEmailFlow$validationManager$2(this)); this.validationManager$delegate = g.lazy(new WidgetHubEmailFlow$validationManager$2(this));
this.loggingConfig = new LoggingConfig(false, null, WidgetHubEmailFlow$loggingConfig$1.INSTANCE, 3); this.loggingConfig = new LoggingConfig(false, null, WidgetHubEmailFlow$loggingConfig$1.INSTANCE, 3);
} }
@ -77,12 +77,12 @@ public final class WidgetHubEmailFlow extends AppFragment {
return widgetHubEmailFlow.getEmail(); return widgetHubEmailFlow.getEmail();
} }
public static final /* synthetic */ DiscordHubEmailViewModel access$getViewModel$p(WidgetHubEmailFlow widgetHubEmailFlow) { public static final /* synthetic */ WidgetHubEmailViewModel access$getViewModel$p(WidgetHubEmailFlow widgetHubEmailFlow) {
return widgetHubEmailFlow.getViewModel(); return widgetHubEmailFlow.getViewModel();
} }
public static final /* synthetic */ void access$updateView(WidgetHubEmailFlow widgetHubEmailFlow, DiscordHubEmailState discordHubEmailState) { public static final /* synthetic */ void access$updateView(WidgetHubEmailFlow widgetHubEmailFlow, HubEmailState hubEmailState) {
widgetHubEmailFlow.updateView(discordHubEmailState); widgetHubEmailFlow.updateView(hubEmailState);
} }
public static final /* synthetic */ void access$verifyEmail(WidgetHubEmailFlow widgetHubEmailFlow) { public static final /* synthetic */ void access$verifyEmail(WidgetHubEmailFlow widgetHubEmailFlow) {
@ -107,21 +107,21 @@ public final class WidgetHubEmailFlow extends AppFragment {
return (ValidationManager) this.validationManager$delegate.getValue(); return (ValidationManager) this.validationManager$delegate.getValue();
} }
private final DiscordHubEmailViewModel getViewModel() { private final WidgetHubEmailViewModel getViewModel() {
return (DiscordHubEmailViewModel) this.viewModel$delegate.getValue(); return (WidgetHubEmailViewModel) this.viewModel$delegate.getValue();
} }
private final void updateView(DiscordHubEmailState discordHubEmailState) { private final void updateView(HubEmailState hubEmailState) {
String school; String school;
Context context = getContext(); Context context = getContext();
if (context != null) { if (context != null) {
m.checkNotNullExpressionValue(context, "context ?: return"); m.checkNotNullExpressionValue(context, "context ?: return");
EmailVerification invoke = discordHubEmailState.getVerifyEmailAsync().invoke(); EmailVerification invoke = hubEmailState.getVerifyEmailAsync().invoke();
int i = 0; int i = 0;
boolean z2 = invoke != null && invoke.b(); boolean z2 = invoke != null && invoke.b();
boolean z3 = !(discordHubEmailState.getVerifyEmailAsync() instanceof Success) && discordHubEmailState.getWaitlistResult() == null; boolean z3 = !(hubEmailState.getVerifyEmailAsync() instanceof Success) && hubEmailState.getWaitlistResult() == null;
EmailVerification invoke2 = discordHubEmailState.getVerifyEmailAsync().invoke(); EmailVerification invoke2 = hubEmailState.getVerifyEmailAsync().invoke();
boolean z4 = (invoke2 != null && !invoke2.b()) || discordHubEmailState.getWaitlistResult() != null; boolean z4 = (invoke2 != null && !invoke2.b()) || hubEmailState.getWaitlistResult() != null;
TextInputEditText textInputEditText = getBinding().f1857c.f193c; TextInputEditText textInputEditText = getBinding().f1857c.f193c;
m.checkNotNullExpressionValue(textInputEditText, "binding.discordHubEmailI…aderDescriptionEmailInput"); m.checkNotNullExpressionValue(textInputEditText, "binding.discordHubEmailI…aderDescriptionEmailInput");
String valueOf = String.valueOf(textInputEditText.getText()); String valueOf = String.valueOf(textInputEditText.getText());
@ -146,7 +146,7 @@ public final class WidgetHubEmailFlow extends AppFragment {
NestedScrollView nestedScrollView3 = z4Var.a; NestedScrollView nestedScrollView3 = z4Var.a;
m.checkNotNullExpressionValue(nestedScrollView3, "binding.discordHubWaitlist.root"); m.checkNotNullExpressionValue(nestedScrollView3, "binding.discordHubWaitlist.root");
nestedScrollView3.setVisibility(z4 ? 0 : 8); nestedScrollView3.setVisibility(z4 ? 0 : 8);
HubWaitlistResult waitlistResult = discordHubEmailState.getWaitlistResult(); HubWaitlistResult waitlistResult = hubEmailState.getWaitlistResult();
if (!(waitlistResult == null || (school = waitlistResult.getSchool()) == null)) { if (!(waitlistResult == null || (school = waitlistResult.getSchool()) == null)) {
TextView textView2 = getBinding().f.b; TextView textView2 = getBinding().f.b;
m.checkNotNullExpressionValue(textView2, "binding.discordHubWaitlist.hubWaitlistDescription"); m.checkNotNullExpressionValue(textView2, "binding.discordHubWaitlist.hubWaitlistDescription");
@ -160,8 +160,8 @@ public final class WidgetHubEmailFlow extends AppFragment {
} }
loadingButton.setVisibility(i); loadingButton.setVisibility(i);
getBinding().e.setText(z4 ? getString(R.string.hub_add_server_confirmation_button) : getString(R.string.hub_email_connection_content_button)); getBinding().e.setText(z4 ? getString(R.string.hub_add_server_confirmation_button) : getString(R.string.hub_email_connection_content_button));
getBinding().e.setIsLoading(discordHubEmailState.getVerifyEmailAsync() instanceof Loading); getBinding().e.setIsLoading(hubEmailState.getVerifyEmailAsync() instanceof Loading);
RestCallStateKt.handleResponse$default(discordHubEmailState.getVerifyEmailAsync(), context, null, null, new WidgetHubEmailFlow$updateView$4(this, discordHubEmailState, context, valueOf), 6, null); RestCallStateKt.handleResponse$default(hubEmailState.getVerifyEmailAsync(), context, null, null, new WidgetHubEmailFlow$updateView$4(this, hubEmailState, context, valueOf), 6, null);
} }
} }
@ -188,7 +188,7 @@ public final class WidgetHubEmailFlow extends AppFragment {
@Override // com.discord.app.AppFragment @Override // com.discord.app.AppFragment
public void onViewBoundOrOnResume() { public void onViewBoundOrOnResume() {
super.onViewBoundOrOnResume(); super.onViewBoundOrOnResume();
Observable<DiscordHubEmailState> r = getViewModel().observeViewState().r(); Observable<HubEmailState> r = getViewModel().observeViewState().r();
m.checkNotNullExpressionValue(r, "viewModel\n .obser… .distinctUntilChanged()"); m.checkNotNullExpressionValue(r, "viewModel\n .obser… .distinctUntilChanged()");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle(r, this), WidgetHubEmailFlow.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetHubEmailFlow$onViewBoundOrOnResume$1(this), 62, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle(r, this), WidgetHubEmailFlow.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetHubEmailFlow$onViewBoundOrOnResume$1(this), 62, (Object) null);
} }

View File

@ -0,0 +1,22 @@
package com.discord.widgets.hubs;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionHubEmailVerifySend;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.hubs.EmailVerification;
import d0.z.d.o;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetHubEmailViewModel.kt */
public final class WidgetHubEmailViewModel$onGuildClicked$1 extends o implements Function1<EmailVerification, TrackNetworkMetadataReceiver> {
public static final WidgetHubEmailViewModel$onGuildClicked$1 INSTANCE = new WidgetHubEmailViewModel$onGuildClicked$1();
public WidgetHubEmailViewModel$onGuildClicked$1() {
super(1);
}
public final TrackNetworkMetadataReceiver invoke(EmailVerification emailVerification) {
if (emailVerification != null) {
return new TrackNetworkActionHubEmailVerifySend(Boolean.valueOf(emailVerification.b()));
}
return null;
}
}

View File

@ -6,14 +6,14 @@ import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: DiscordHubEmailViewModel.kt */ /* compiled from: WidgetHubEmailViewModel.kt */
public final class DiscordHubEmailViewModel$submitEmail$2 extends o implements Function1<RestCallState<? extends EmailVerification>, Unit> { public final class WidgetHubEmailViewModel$onGuildClicked$2 extends o implements Function1<RestCallState<? extends EmailVerification>, Unit> {
public final /* synthetic */ DiscordHubEmailViewModel this$0; public final /* synthetic */ WidgetHubEmailViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public DiscordHubEmailViewModel$submitEmail$2(DiscordHubEmailViewModel discordHubEmailViewModel) { public WidgetHubEmailViewModel$onGuildClicked$2(WidgetHubEmailViewModel widgetHubEmailViewModel) {
super(1); super(1);
this.this$0 = discordHubEmailViewModel; this.this$0 = widgetHubEmailViewModel;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
@ -26,7 +26,7 @@ public final class DiscordHubEmailViewModel$submitEmail$2 extends o implements F
public final void invoke(RestCallState<EmailVerification> restCallState) { public final void invoke(RestCallState<EmailVerification> restCallState) {
m.checkNotNullParameter(restCallState, "it"); m.checkNotNullParameter(restCallState, "it");
DiscordHubEmailViewModel discordHubEmailViewModel = this.this$0; WidgetHubEmailViewModel widgetHubEmailViewModel = this.this$0;
DiscordHubEmailViewModel.access$updateViewState(discordHubEmailViewModel, DiscordHubEmailState.copy$default(DiscordHubEmailViewModel.access$requireViewState(discordHubEmailViewModel), null, null, restCallState, 3, null)); WidgetHubEmailViewModel.access$updateViewState(widgetHubEmailViewModel, HubEmailState.copy$default(WidgetHubEmailViewModel.access$requireViewState(widgetHubEmailViewModel), null, null, restCallState, 3, null));
} }
} }

View File

@ -5,11 +5,11 @@ import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.hubs.EmailVerification; import com.discord.api.hubs.EmailVerification;
import d0.z.d.o; import d0.z.d.o;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: DiscordHubEmailViewModel.kt */ /* compiled from: WidgetHubEmailViewModel.kt */
public final class DiscordHubEmailViewModel$submitEmail$1 extends o implements Function1<EmailVerification, TrackNetworkMetadataReceiver> { public final class WidgetHubEmailViewModel$submitEmail$1 extends o implements Function1<EmailVerification, TrackNetworkMetadataReceiver> {
public static final DiscordHubEmailViewModel$submitEmail$1 INSTANCE = new DiscordHubEmailViewModel$submitEmail$1(); public static final WidgetHubEmailViewModel$submitEmail$1 INSTANCE = new WidgetHubEmailViewModel$submitEmail$1();
public DiscordHubEmailViewModel$submitEmail$1() { public WidgetHubEmailViewModel$submitEmail$1() {
super(1); super(1);
} }

View File

@ -6,14 +6,14 @@ import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: DiscordHubEmailViewModel.kt */ /* compiled from: WidgetHubEmailViewModel.kt */
public final class DiscordHubEmailViewModel$onGuildClicked$2 extends o implements Function1<RestCallState<? extends EmailVerification>, Unit> { public final class WidgetHubEmailViewModel$submitEmail$2 extends o implements Function1<RestCallState<? extends EmailVerification>, Unit> {
public final /* synthetic */ DiscordHubEmailViewModel this$0; public final /* synthetic */ WidgetHubEmailViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public DiscordHubEmailViewModel$onGuildClicked$2(DiscordHubEmailViewModel discordHubEmailViewModel) { public WidgetHubEmailViewModel$submitEmail$2(WidgetHubEmailViewModel widgetHubEmailViewModel) {
super(1); super(1);
this.this$0 = discordHubEmailViewModel; this.this$0 = widgetHubEmailViewModel;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
@ -26,7 +26,7 @@ public final class DiscordHubEmailViewModel$onGuildClicked$2 extends o implement
public final void invoke(RestCallState<EmailVerification> restCallState) { public final void invoke(RestCallState<EmailVerification> restCallState) {
m.checkNotNullParameter(restCallState, "it"); m.checkNotNullParameter(restCallState, "it");
DiscordHubEmailViewModel discordHubEmailViewModel = this.this$0; WidgetHubEmailViewModel widgetHubEmailViewModel = this.this$0;
DiscordHubEmailViewModel.access$updateViewState(discordHubEmailViewModel, DiscordHubEmailState.copy$default(DiscordHubEmailViewModel.access$requireViewState(discordHubEmailViewModel), null, null, restCallState, 3, null)); WidgetHubEmailViewModel.access$updateViewState(widgetHubEmailViewModel, HubEmailState.copy$default(WidgetHubEmailViewModel.access$requireViewState(widgetHubEmailViewModel), null, null, restCallState, 3, null));
} }
} }

View File

@ -10,34 +10,34 @@ import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.z.d.m; import d0.z.d.m;
import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: DiscordHubEmailViewModel.kt */ /* compiled from: WidgetHubEmailViewModel.kt */
public final class DiscordHubEmailViewModel extends AppViewModel<DiscordHubEmailState> { public final class WidgetHubEmailViewModel extends AppViewModel<HubEmailState> {
private final boolean multiDomainEnabled; private final boolean multiDomainEnabled;
private final RestAPI restAPI; private final RestAPI restAPI;
public DiscordHubEmailViewModel() { public WidgetHubEmailViewModel() {
this(null, false, 3, null); this(null, false, 3, null);
} }
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public DiscordHubEmailViewModel(RestAPI restAPI, boolean z2) { public WidgetHubEmailViewModel(RestAPI restAPI, boolean z2) {
super(new DiscordHubEmailState(null, null, null, 7, null)); super(new HubEmailState(null, null, null, 7, null));
m.checkNotNullParameter(restAPI, "restAPI"); m.checkNotNullParameter(restAPI, "restAPI");
this.restAPI = restAPI; this.restAPI = restAPI;
this.multiDomainEnabled = z2; this.multiDomainEnabled = z2;
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ DiscordHubEmailViewModel(RestAPI restAPI, boolean z2, int i, DefaultConstructorMarker defaultConstructorMarker) { public /* synthetic */ WidgetHubEmailViewModel(RestAPI restAPI, boolean z2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? RestAPI.Companion.getApi() : restAPI, (i & 2) != 0 ? GrowthTeamFeatures.INSTANCE.isMultiDomainEnabled() : z2); this((i & 1) != 0 ? RestAPI.Companion.getApi() : restAPI, (i & 2) != 0 ? GrowthTeamFeatures.INSTANCE.isMultiDomainEnabled() : z2);
} }
public static final /* synthetic */ DiscordHubEmailState access$requireViewState(DiscordHubEmailViewModel discordHubEmailViewModel) { public static final /* synthetic */ HubEmailState access$requireViewState(WidgetHubEmailViewModel widgetHubEmailViewModel) {
return discordHubEmailViewModel.requireViewState(); return widgetHubEmailViewModel.requireViewState();
} }
public static final /* synthetic */ void access$updateViewState(DiscordHubEmailViewModel discordHubEmailViewModel, DiscordHubEmailState discordHubEmailState) { public static final /* synthetic */ void access$updateViewState(WidgetHubEmailViewModel widgetHubEmailViewModel, HubEmailState hubEmailState) {
discordHubEmailViewModel.updateViewState(discordHubEmailState); widgetHubEmailViewModel.updateViewState(hubEmailState);
} }
public final boolean getMultiDomainEnabled() { public final boolean getMultiDomainEnabled() {
@ -50,24 +50,24 @@ public final class DiscordHubEmailViewModel extends AppViewModel<DiscordHubEmail
public final void onGuildClicked(long j, String str) { public final void onGuildClicked(long j, String str) {
m.checkNotNullParameter(str, NotificationCompat.CATEGORY_EMAIL); m.checkNotNullParameter(str, NotificationCompat.CATEGORY_EMAIL);
RestCallStateKt.executeRequest(RestCallStateKt.logNetworkAction(ObservableExtensionsKt.ui$default(this.restAPI.verifyEmail(new RestAPIParams.VerifyEmail(str, Long.valueOf(j), this.multiDomainEnabled)), this, null, 2, null), DiscordHubEmailViewModel.class, DiscordHubEmailViewModel$onGuildClicked$1.INSTANCE), new DiscordHubEmailViewModel$onGuildClicked$2(this)); RestCallStateKt.executeRequest(RestCallStateKt.logNetworkAction(ObservableExtensionsKt.ui$default(this.restAPI.verifyEmail(new RestAPIParams.VerifyEmail(str, Long.valueOf(j), this.multiDomainEnabled)), this, null, 2, null), WidgetHubEmailViewModel.class, WidgetHubEmailViewModel$onGuildClicked$1.INSTANCE), new WidgetHubEmailViewModel$onGuildClicked$2(this));
} }
public final void resetEmail() { public final void resetEmail() {
DiscordHubEmailState viewState = getViewState(); HubEmailState viewState = getViewState();
m.checkNotNull(viewState); m.checkNotNull(viewState);
updateViewState(DiscordHubEmailState.copy$default(viewState, null, null, Default.INSTANCE, 3, null)); updateViewState(HubEmailState.copy$default(viewState, null, null, Default.INSTANCE, 3, null));
} }
public final void setHubWaitlistResult(HubWaitlistResult hubWaitlistResult) { public final void setHubWaitlistResult(HubWaitlistResult hubWaitlistResult) {
m.checkNotNullParameter(hubWaitlistResult, "waitlistResult"); m.checkNotNullParameter(hubWaitlistResult, "waitlistResult");
DiscordHubEmailState viewState = getViewState(); HubEmailState viewState = getViewState();
m.checkNotNull(viewState); m.checkNotNull(viewState);
updateViewState(DiscordHubEmailState.copy$default(viewState, null, hubWaitlistResult, null, 5, null)); updateViewState(HubEmailState.copy$default(viewState, null, hubWaitlistResult, null, 5, null));
} }
public final void submitEmail(String str) { public final void submitEmail(String str) {
m.checkNotNullParameter(str, NotificationCompat.CATEGORY_EMAIL); m.checkNotNullParameter(str, NotificationCompat.CATEGORY_EMAIL);
RestCallStateKt.executeRequest(RestCallStateKt.logNetworkAction(ObservableExtensionsKt.ui$default(this.restAPI.verifyEmail(new RestAPIParams.VerifyEmail(str, null, this.multiDomainEnabled, 2, null)), this, null, 2, null), DiscordHubEmailViewModel.class, DiscordHubEmailViewModel$submitEmail$1.INSTANCE), new DiscordHubEmailViewModel$submitEmail$2(this)); RestCallStateKt.executeRequest(RestCallStateKt.logNetworkAction(ObservableExtensionsKt.ui$default(this.restAPI.verifyEmail(new RestAPIParams.VerifyEmail(str, null, this.multiDomainEnabled, 2, null)), this, null, 2, null), WidgetHubEmailViewModel.class, WidgetHubEmailViewModel$submitEmail$1.INSTANCE), new WidgetHubEmailViewModel$submitEmail$2(this));
} }
} }

View File

@ -24,7 +24,7 @@ import kotlin.Lazy;
import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.KProperty; import kotlin.reflect.KProperty;
/* compiled from: WidgetGuildTemplates.kt */ /* compiled from: WidgetGuildTemplates.kt */
public final class WidgetGuildTemplates extends AppFragment { public class WidgetGuildTemplates extends AppFragment {
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.W(WidgetGuildTemplates.class, "binding", "getBinding()Lcom/discord/databinding/WidgetNuxGuildTemplateBinding;", 0)}; public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.W(WidgetGuildTemplates.class, "binding", "getBinding()Lcom/discord/databinding/WidgetNuxGuildTemplateBinding;", 0)};
public static final Companion Companion = new Companion(null); public static final Companion Companion = new Companion(null);
private final GuildTemplatesAdapter adapter = new GuildTemplatesAdapter(new WidgetGuildTemplates$adapter$1(this)); private final GuildTemplatesAdapter adapter = new GuildTemplatesAdapter(new WidgetGuildTemplates$adapter$1(this));

View File

@ -0,0 +1,20 @@
package com.discord.widgets.nux;
import com.discord.analytics.generated.events.impression.TrackImpressionHubCreateGuildTemplate;
import com.discord.api.science.AnalyticsSchema;
import d0.z.d.o;
import kotlin.jvm.functions.Function0;
/* compiled from: WidgetGuildTemplates.kt */
public final class WidgetHubGuildTemplates$loggingConfig$1 extends o implements Function0<AnalyticsSchema> {
public static final WidgetHubGuildTemplates$loggingConfig$1 INSTANCE = new WidgetHubGuildTemplates$loggingConfig$1();
public WidgetHubGuildTemplates$loggingConfig$1() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final AnalyticsSchema mo1invoke() {
return new TrackImpressionHubCreateGuildTemplate();
}
}

View File

@ -0,0 +1,12 @@
package com.discord.widgets.nux;
import com.discord.app.LoggingConfig;
/* compiled from: WidgetGuildTemplates.kt */
public final class WidgetHubGuildTemplates extends WidgetGuildTemplates {
private final LoggingConfig loggingConfig = new LoggingConfig(false, null, WidgetHubGuildTemplates$loggingConfig$1.INSTANCE, 3);
@Override // com.discord.app.AppFragment, com.discord.app.AppLogger.a
public LoggingConfig getLoggingConfig() {
return this.loggingConfig;
}
}

View File

@ -321,7 +321,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi
TextView textView = binding.f; TextView textView = binding.f;
m.checkNotNullExpressionValue(textView, "appInfoHeader"); m.checkNotNullExpressionValue(textView, "appInfoHeader");
String string = getString(R.string.app_information); String string = getString(R.string.app_information);
textView.setText(string + " - 88.4 - Alpha (88204)"); textView.setText(string + " - 88.5 - Alpha (88205)");
binding.f1964z.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this)); binding.f1964z.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this));
binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE); binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE); binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE);

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