forked from Juby210/discord-jadx
92 lines
4.9 KiB
Java
92 lines
4.9 KiB
Java
package com.discord.widgets.settings;
|
|
|
|
import android.content.Context;
|
|
import c0.z.d.m;
|
|
import c0.z.d.o;
|
|
import com.discord.models.domain.Harvest;
|
|
import com.discord.utilities.error.Error;
|
|
import com.discord.utilities.rest.RestAPI;
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetSettingsPrivacy.kt */
|
|
public final class WidgetSettingsPrivacy$onRequestDataClick$3 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ Context $context;
|
|
public final /* synthetic */ WidgetSettingsPrivacy$onRequestDataClick$2 $handleRequestError$2;
|
|
public final /* synthetic */ WidgetSettingsPrivacy$onRequestDataClick$1 $handleRequestSuccess$1;
|
|
public final /* synthetic */ WidgetSettingsPrivacy this$0;
|
|
|
|
/* compiled from: WidgetSettingsPrivacy.kt */
|
|
/* renamed from: com.discord.widgets.settings.WidgetSettingsPrivacy$onRequestDataClick$3$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function1<Error, Unit> {
|
|
public final /* synthetic */ WidgetSettingsPrivacy$onRequestDataClick$3 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(WidgetSettingsPrivacy$onRequestDataClick$3 widgetSettingsPrivacy$onRequestDataClick$3) {
|
|
super(1);
|
|
this.this$0 = widgetSettingsPrivacy$onRequestDataClick$3;
|
|
}
|
|
|
|
/* 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(Error error) {
|
|
invoke(error);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(Error error) {
|
|
m.checkNotNullParameter(error, "it");
|
|
WidgetSettingsPrivacy$onRequestDataClick$2 widgetSettingsPrivacy$onRequestDataClick$2 = this.this$0.$handleRequestError$2;
|
|
Error.Response response = error.getResponse();
|
|
m.checkNotNullExpressionValue(response, "it.response");
|
|
widgetSettingsPrivacy$onRequestDataClick$2.invoke(response.getMessage());
|
|
error.setShowErrorToasts(false);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetSettingsPrivacy.kt */
|
|
/* renamed from: com.discord.widgets.settings.WidgetSettingsPrivacy$onRequestDataClick$3$2 reason: invalid class name */
|
|
public static final class AnonymousClass2 extends o implements Function1<Harvest, Unit> {
|
|
public final /* synthetic */ WidgetSettingsPrivacy$onRequestDataClick$3 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass2(WidgetSettingsPrivacy$onRequestDataClick$3 widgetSettingsPrivacy$onRequestDataClick$3) {
|
|
super(1);
|
|
this.this$0 = widgetSettingsPrivacy$onRequestDataClick$3;
|
|
}
|
|
|
|
/* 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(Harvest harvest) {
|
|
invoke(harvest);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(Harvest harvest) {
|
|
if (harvest != null) {
|
|
this.this$0.$handleRequestSuccess$1.invoke(harvest);
|
|
} else {
|
|
WidgetSettingsPrivacy$onRequestDataClick$2.invoke$default(this.this$0.$handleRequestError$2, null, 1, null);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetSettingsPrivacy$onRequestDataClick$3(WidgetSettingsPrivacy widgetSettingsPrivacy, Context context, WidgetSettingsPrivacy$onRequestDataClick$2 widgetSettingsPrivacy$onRequestDataClick$2, WidgetSettingsPrivacy$onRequestDataClick$1 widgetSettingsPrivacy$onRequestDataClick$1) {
|
|
super(0);
|
|
this.this$0 = widgetSettingsPrivacy;
|
|
this.$context = context;
|
|
this.$handleRequestError$2 = widgetSettingsPrivacy$onRequestDataClick$2;
|
|
this.$handleRequestSuccess$1 = widgetSettingsPrivacy$onRequestDataClick$1;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo17invoke() {
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn(RestAPI.Companion.getApi().requestHarvest(), false)), WidgetSettingsPrivacy.access$getBinding$p(this.this$0).g, 100), this.this$0.getClass(), this.$context, (Function1) null, new AnonymousClass1(this), (Function0) null, (Function0) null, new AnonymousClass2(this), 52, (Object) null);
|
|
}
|
|
}
|