forked from Juby210/discord-jadx
66 lines
3.1 KiB
Java
66 lines
3.1 KiB
Java
package com.discord.widgets.guilds.profile;
|
|
|
|
import android.view.View;
|
|
import androidx.fragment.app.FragmentManager;
|
|
import b.a.y.c0;
|
|
import com.discord.widgets.guilds.profile.WidgetChangeGuildIdentityViewModel;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import java.util.List;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetChangeGuildIdentity.kt */
|
|
public final class WidgetChangeGuildIdentity$configureAvatar$2 implements View.OnClickListener {
|
|
public final /* synthetic */ List $avatarSheetOptions;
|
|
public final /* synthetic */ WidgetChangeGuildIdentityViewModel.ViewState.Loaded $viewState;
|
|
public final /* synthetic */ WidgetChangeGuildIdentity this$0;
|
|
|
|
/* compiled from: WidgetChangeGuildIdentity.kt */
|
|
/* renamed from: com.discord.widgets.guilds.profile.WidgetChangeGuildIdentity$configureAvatar$2$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function1<Integer, Unit> {
|
|
public final /* synthetic */ WidgetChangeGuildIdentity$configureAvatar$2 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(WidgetChangeGuildIdentity$configureAvatar$2 widgetChangeGuildIdentity$configureAvatar$2) {
|
|
super(1);
|
|
this.this$0 = widgetChangeGuildIdentity$configureAvatar$2;
|
|
}
|
|
|
|
/* 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) {
|
|
if (i == 0) {
|
|
WidgetChangeGuildIdentity widgetChangeGuildIdentity = this.this$0.this$0;
|
|
WidgetChangeGuildIdentity.access$setImageSelectedResult$p(widgetChangeGuildIdentity, WidgetChangeGuildIdentity.access$getAvatarSelectedResult$p(widgetChangeGuildIdentity));
|
|
this.this$0.this$0.openMediaChooser();
|
|
} else if (i == 1) {
|
|
WidgetChangeGuildIdentity.access$getViewModel$p(this.this$0.this$0).updateAvatar(null);
|
|
}
|
|
}
|
|
}
|
|
|
|
public WidgetChangeGuildIdentity$configureAvatar$2(WidgetChangeGuildIdentity widgetChangeGuildIdentity, WidgetChangeGuildIdentityViewModel.ViewState.Loaded loaded, List list) {
|
|
this.this$0 = widgetChangeGuildIdentity;
|
|
this.$viewState = loaded;
|
|
this.$avatarSheetOptions = list;
|
|
}
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
if (this.$viewState.getShouldUpsell()) {
|
|
WidgetChangeGuildIdentity.access$navigateToUpsellModal(this.this$0);
|
|
return;
|
|
}
|
|
c0.a aVar = c0.k;
|
|
FragmentManager childFragmentManager = this.this$0.getChildFragmentManager();
|
|
m.checkNotNullExpressionValue(childFragmentManager, "childFragmentManager");
|
|
aVar.a(childFragmentManager, "", this.$avatarSheetOptions, false, new AnonymousClass1(this));
|
|
}
|
|
}
|