discord-jadx/app/src/main/java/com/discord/widgets/channels/settings/WidgetChannelNotificationSe...

78 lines
3.8 KiB
Java

package com.discord.widgets.channels.settings;
import android.view.View;
import c.a.k.b;
import c.d.b.a.a;
import com.discord.models.domain.ModelNotificationSettings;
import com.discord.stores.StoreStream;
import com.discord.views.CheckedSetting;
import com.discord.widgets.channels.settings.WidgetChannelNotificationSettings;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Ref$IntRef;
/* compiled from: WidgetChannelNotificationSettings.kt */
public final class WidgetChannelNotificationSettings$configureNotificationRadios$1 extends o implements Function3<WidgetChannelNotificationSettings.Model, CheckedSetting, Integer, Unit> {
public final /* synthetic */ Ref$IntRef $notificationSetting;
public final /* synthetic */ WidgetChannelNotificationSettings this$0;
/* compiled from: WidgetChannelNotificationSettings.kt */
/* renamed from: com.discord.widgets.channels.settings.WidgetChannelNotificationSettings$configureNotificationRadios$1$1 reason: invalid class name */
public static final class AnonymousClass1 implements View.OnClickListener {
public final /* synthetic */ WidgetChannelNotificationSettings.Model $this_configureNotificationRadio;
public final /* synthetic */ int $type;
public AnonymousClass1(WidgetChannelNotificationSettings.Model model, int i) {
this.$this_configureNotificationRadio = model;
this.$type = i;
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
StoreStream.Companion.getUserGuildSettings().setChannelFrequency(a.x(view, "it", "it.context"), this.$this_configureNotificationRadio.getChannel(), this.$type);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelNotificationSettings$configureNotificationRadios$1(WidgetChannelNotificationSettings widgetChannelNotificationSettings, Ref$IntRef ref$IntRef) {
super(3);
this.this$0 = widgetChannelNotificationSettings;
this.$notificationSetting = ref$IntRef;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function3
public /* bridge */ /* synthetic */ Unit invoke(WidgetChannelNotificationSettings.Model model, CheckedSetting checkedSetting, Integer num) {
invoke(model, checkedSetting, num.intValue());
return Unit.a;
}
public final void invoke(WidgetChannelNotificationSettings.Model model, CheckedSetting checkedSetting, int i) {
m.checkNotNullParameter(model, "$this$configureNotificationRadio");
m.checkNotNullParameter(checkedSetting, "radio");
if (model.isGuildMuted() || model.getChannelIsMuted()) {
checkedSetting.b(2131887290);
} else {
checkedSetting.e(new AnonymousClass1(model, i));
}
boolean z2 = false;
if (!model.isAboveNotifyAllSize() || i != ModelNotificationSettings.FREQUENCY_ALL) {
int i2 = CheckedSetting.i;
checkedSetting.h(null, false);
} else {
CharSequence j = b.j(this.this$0, 2131890924, new Object[0], null, 4);
int i3 = CheckedSetting.i;
checkedSetting.h(j, false);
}
if (this.$notificationSetting.element == i) {
z2 = true;
}
checkedSetting.setButtonAlpha((!z2 || !model.getNotificationSettingIsInherited()) ? 1.0f : 0.3f);
if (z2) {
WidgetChannelNotificationSettings.access$getNotificationSettingsRadioManager$p(this.this$0).a(checkedSetting);
}
}
}