forked from Juby210/discord-jadx
52 lines
2.5 KiB
Java
52 lines
2.5 KiB
Java
package com.discord.widgets.guilds.profile;
|
|
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import com.discord.R;
|
|
import com.discord.widgets.guilds.profile.WidgetChangeGuildIdentityViewModel;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetChangeGuildIdentity.kt */
|
|
public final class WidgetChangeGuildIdentity$onViewBoundOrOnResume$2 extends o implements Function1<WidgetChangeGuildIdentityViewModel.Event, Unit> {
|
|
public final /* synthetic */ WidgetChangeGuildIdentity this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChangeGuildIdentity$onViewBoundOrOnResume$2(WidgetChangeGuildIdentity widgetChangeGuildIdentity) {
|
|
super(1);
|
|
this.this$0 = widgetChangeGuildIdentity;
|
|
}
|
|
|
|
/* 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(WidgetChangeGuildIdentityViewModel.Event event) {
|
|
invoke(event);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(WidgetChangeGuildIdentityViewModel.Event event) {
|
|
m.checkNotNullParameter(event, "event");
|
|
boolean z2 = true;
|
|
if (event instanceof WidgetChangeGuildIdentityViewModel.Event.MemberUpdateFailed) {
|
|
WidgetChangeGuildIdentityViewModel.Event.MemberUpdateFailed memberUpdateFailed = (WidgetChangeGuildIdentityViewModel.Event.MemberUpdateFailed) event;
|
|
String errorMessage = memberUpdateFailed.getErrorMessage();
|
|
if (!(errorMessage == null || errorMessage.length() == 0)) {
|
|
z2 = false;
|
|
}
|
|
if (z2) {
|
|
WidgetChangeGuildIdentity.access$showToast(this.this$0, (int) R.string.change_identity_modal_unknown_error);
|
|
} else {
|
|
WidgetChangeGuildIdentity.access$showToast(this.this$0, memberUpdateFailed.getErrorMessage());
|
|
}
|
|
} else if (event instanceof WidgetChangeGuildIdentityViewModel.Event.MemberUpdateSucceeded) {
|
|
WidgetChangeGuildIdentity.access$showToast(this.this$0, (int) R.string.per_guild_identity_saved);
|
|
WidgetChangeGuildIdentity.access$getDiscardConfirmed$p(this.this$0).set(true);
|
|
FragmentActivity activity = this.this$0.getActivity();
|
|
if (activity != null) {
|
|
activity.onBackPressed();
|
|
}
|
|
}
|
|
}
|
|
}
|