discord-jadx/app/src/main/java/com/discord/widgets/settings/profile/WidgetSettingsUserProfile$c...

132 lines
6.9 KiB
Java

package com.discord.widgets.settings.profile;
import android.content.Context;
import androidx.fragment.app.FragmentManager;
import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.widgets.settings.profile.SettingsUserProfileViewModel;
import com.discord.widgets.settings.profile.WidgetEditProfileBannerSheet;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import rx.Observable;
/* compiled from: WidgetSettingsUserProfile.kt */
public final class WidgetSettingsUserProfile$configureBannerSelect$2 extends o implements Function0<Unit> {
public final /* synthetic */ SettingsUserProfileViewModel.ViewState.Loaded $viewState;
public final /* synthetic */ WidgetSettingsUserProfile this$0;
/* compiled from: WidgetSettingsUserProfile.kt */
/* renamed from: com.discord.widgets.settings.profile.WidgetSettingsUserProfile$configureBannerSelect$2$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<String, Unit> {
public final /* synthetic */ WidgetSettingsUserProfile$configureBannerSelect$2 this$0;
/* compiled from: WidgetSettingsUserProfile.kt */
/* renamed from: com.discord.widgets.settings.profile.WidgetSettingsUserProfile$configureBannerSelect$2$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
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) {
super(0);
this.this$0 = r1;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
WidgetSettingsUserProfile widgetSettingsUserProfile = this.this$0.this$0.this$0;
WidgetSettingsUserProfile.access$setImageSelectedResult$p(widgetSettingsUserProfile, WidgetSettingsUserProfile.access$getBannerSelectedResult$p(widgetSettingsUserProfile));
this.this$0.this$0.this$0.openMediaChooser();
}
}
/* compiled from: WidgetSettingsUserProfile.kt */
/* renamed from: com.discord.widgets.settings.profile.WidgetSettingsUserProfile$configureBannerSelect$2$1$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function0<Unit> {
public final /* synthetic */ AnonymousClass1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(AnonymousClass1 r1) {
super(0);
this.this$0 = r1;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
WidgetSettingsUserProfile.access$getViewModel$p(this.this$0.this$0.this$0).updateBannerImage(null);
}
}
/* compiled from: WidgetSettingsUserProfile.kt */
/* renamed from: com.discord.widgets.settings.profile.WidgetSettingsUserProfile$configureBannerSelect$2$1$3 reason: invalid class name */
public static final class AnonymousClass3 extends o implements Function1<Integer, Unit> {
public final /* synthetic */ AnonymousClass1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass3(AnonymousClass1 r1) {
super(1);
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] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Integer num) {
invoke(num);
return Unit.a;
}
public final void invoke(Integer num) {
String str;
if (num != null) {
str = ColorCompat.INSTANCE.getColorHexFromColorInt(num.intValue());
} else {
str = null;
}
WidgetSettingsUserProfile.access$getViewModel$p(this.this$0.this$0.this$0).updateBannerColor(str);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(WidgetSettingsUserProfile$configureBannerSelect$2 widgetSettingsUserProfile$configureBannerSelect$2) {
super(1);
this.this$0 = widgetSettingsUserProfile$configureBannerSelect$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(String str) {
invoke(str);
return Unit.a;
}
public final void invoke(String str) {
WidgetEditProfileBannerSheet.Companion companion = WidgetEditProfileBannerSheet.Companion;
m.checkNotNullExpressionValue(str, "avatarRepresentativeColorHex");
String nonDefaultColorPreviewHex = this.this$0.$viewState.getNonDefaultColorPreviewHex();
FragmentManager parentFragmentManager = this.this$0.this$0.getParentFragmentManager();
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
companion.show(str, nonDefaultColorPreviewHex, parentFragmentManager, new AnonymousClass1(this), new AnonymousClass2(this), new AnonymousClass3(this));
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetSettingsUserProfile$configureBannerSelect$2(WidgetSettingsUserProfile widgetSettingsUserProfile, SettingsUserProfileViewModel.ViewState.Loaded loaded) {
super(0);
this.this$0 = widgetSettingsUserProfile;
this.$viewState = loaded;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
Observable K = WidgetSettingsUserProfile.access$getAvatarRepresentativeColorHexSubject$p(this.this$0).Z(1).K();
m.checkNotNullExpressionValue(K, "avatarRepresentativeColo… .onBackpressureLatest()");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle(K, this.this$0), this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null);
}
}