discord-jadx/app/src/main/java/com/discord/widgets/stage/settings/WidgetStageSettings$configureStageUI$5.java
2021-07-24 04:37:17 +02:00

132 lines
6.6 KiB
Java

package com.discord.widgets.stage.settings;
import android.graphics.Typeface;
import android.text.style.ForegroundColorSpan;
import android.view.View;
import com.discord.i18n.Hook;
import com.discord.i18n.RenderContext;
import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.font.FontUtils;
import com.discord.utilities.spans.TypefaceSpanCompat;
import com.discord.widgets.channels.WidgetChannelSelector;
import com.discord.widgets.stage.settings.WidgetStageSettingsViewModel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
/* compiled from: WidgetStageSettings.kt */
public final class WidgetStageSettings$configureStageUI$5 extends o implements Function1<RenderContext, Unit> {
public final /* synthetic */ WidgetStageSettingsViewModel.ViewState.Stage $viewState;
public final /* synthetic */ WidgetStageSettings this$0;
/* compiled from: WidgetStageSettings.kt */
/* renamed from: com.discord.widgets.stage.settings.WidgetStageSettings$configureStageUI$5$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<Hook, Unit> {
public final /* synthetic */ WidgetStageSettings$configureStageUI$5 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(WidgetStageSettings$configureStageUI$5 widgetStageSettings$configureStageUI$5) {
super(1);
this.this$0 = widgetStageSettings$configureStageUI$5;
}
/* 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(Hook hook) {
invoke(hook);
return Unit.a;
}
public final void invoke(Hook hook) {
m.checkNotNullParameter(hook, "$receiver");
Typeface themedFont = FontUtils.INSTANCE.getThemedFont(this.this$0.this$0.requireContext(), 2130969326);
if (themedFont != null) {
hook.a.add(new TypefaceSpanCompat(themedFont));
}
hook.a.add(new ForegroundColorSpan(ColorCompat.getThemedColor(this.this$0.this$0.getContext(), 2130969872)));
}
}
/* compiled from: WidgetStageSettings.kt */
/* renamed from: com.discord.widgets.stage.settings.WidgetStageSettings$configureStageUI$5$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function1<Hook, Unit> {
public final /* synthetic */ WidgetStageSettings$configureStageUI$5 this$0;
/* compiled from: WidgetStageSettings.kt */
/* renamed from: com.discord.widgets.stage.settings.WidgetStageSettings$configureStageUI$5$2$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function2<String, View, Unit> {
public final /* synthetic */ AnonymousClass2 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(AnonymousClass2 r1) {
super(2);
this.this$0 = r1;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(String str, View view) {
invoke(str, view);
return Unit.a;
}
public final void invoke(String str, View view) {
m.checkNotNullParameter(str, "<anonymous parameter 0>");
m.checkNotNullParameter(view, "<anonymous parameter 1>");
WidgetChannelSelector.Companion companion = WidgetChannelSelector.Companion;
WidgetStageSettings$configureStageUI$5 widgetStageSettings$configureStageUI$5 = this.this$0.this$0;
WidgetChannelSelector.Companion.launchForInactiveStages$default(companion, widgetStageSettings$configureStageUI$5.this$0, widgetStageSettings$configureStageUI$5.$viewState.getChannel().f(), "REQUEST_KEY_STAGE_CHANNEL", false, 0, 24, null);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(WidgetStageSettings$configureStageUI$5 widgetStageSettings$configureStageUI$5) {
super(1);
this.this$0 = widgetStageSettings$configureStageUI$5;
}
/* 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(Hook hook) {
invoke(hook);
return Unit.a;
}
public final void invoke(Hook hook) {
m.checkNotNullParameter(hook, "$receiver");
Typeface themedFont = FontUtils.INSTANCE.getThemedFont(this.this$0.this$0.requireContext(), 2130969326);
if (themedFont != null) {
hook.a.add(new TypefaceSpanCompat(themedFont));
}
hook.a.add(new ForegroundColorSpan(ColorCompat.getThemedColor(this.this$0.this$0.getContext(), 2130968986)));
AnonymousClass2 r0 = new AnonymousClass2(this);
m.checkNotNullParameter(r0, "onClick");
hook.f2030c = new Hook.a(null, r0);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetStageSettings$configureStageUI$5(WidgetStageSettings widgetStageSettings, WidgetStageSettingsViewModel.ViewState.Stage stage) {
super(1);
this.this$0 = widgetStageSettings;
this.$viewState = stage;
}
/* 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(RenderContext renderContext) {
invoke(renderContext);
return Unit.a;
}
public final void invoke(RenderContext renderContext) {
m.checkNotNullParameter(renderContext, "$receiver");
renderContext.a("stageHook", new AnonymousClass1(this));
renderContext.a("changeHook", new AnonymousClass2(this));
}
}