discord-jadx/app/src/main/java/com/discord/stores/StoreAnalytics$onNotificati...

69 lines
2.8 KiB
Java

package com.discord.stores;
import com.discord.api.channel.Channel;
import com.discord.models.domain.ModelNotificationSettings;
import com.discord.utilities.analytics.AnalyticsTracker;
import d0.z.d.m;
import d0.z.d.o;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: StoreAnalytics.kt */
public final class StoreAnalytics$onNotificationSettingsUpdated$1 extends o implements Function0<Unit> {
public final /* synthetic */ Long $channelId;
public final /* synthetic */ ModelNotificationSettings $notifSettings;
public final /* synthetic */ StoreAnalytics this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreAnalytics$onNotificationSettingsUpdated$1(StoreAnalytics storeAnalytics, Long l, ModelNotificationSettings modelNotificationSettings) {
super(0);
this.this$0 = storeAnalytics;
this.$channelId = l;
this.$notifSettings = modelNotificationSettings;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
boolean z2;
Long l = this.$channelId;
Channel channel = null;
if (l != null) {
long longValue = l.longValue();
List<ModelNotificationSettings.ChannelOverride> channelOverrides = this.$notifSettings.getChannelOverrides();
m.checkNotNullExpressionValue(channelOverrides, "notifSettings.channelOverrides");
boolean z3 = true;
if (!(channelOverrides instanceof Collection) || !channelOverrides.isEmpty()) {
Iterator<T> it = channelOverrides.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
ModelNotificationSettings.ChannelOverride channelOverride = (ModelNotificationSettings.ChannelOverride) it.next();
m.checkNotNullExpressionValue(channelOverride, "it");
if (channelOverride.getChannelId() == longValue) {
z2 = true;
continue;
} else {
z2 = false;
continue;
}
if (z2) {
break;
}
}
}
z3 = false;
if (!z3) {
l = null;
}
if (l != null) {
channel = StoreAnalytics.access$getStores$p(this.this$0).getChannels$app_productionBetaRelease().findChannelByIdInternal$app_productionBetaRelease(l.longValue());
}
}
AnalyticsTracker.INSTANCE.notificationSettingsUpdated(this.$notifSettings, channel);
}
}