63 lines
3.6 KiB
Java
63 lines
3.6 KiB
Java
package com.discord.widgets.channels.settings;
|
|
|
|
import android.content.Context;
|
|
import android.view.View;
|
|
import com.discord.api.thread.ThreadMember;
|
|
import com.discord.restapi.RestAPIParams;
|
|
import com.discord.stores.StoreStream;
|
|
import com.discord.utilities.rest.RestAPI;
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
import com.discord.widgets.channels.settings.WidgetThreadNotificationSettings;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetThreadNotificationSettings.kt */
|
|
public final class WidgetThreadNotificationSettings$configureNotificationRadio$1 implements View.OnClickListener {
|
|
public final /* synthetic */ WidgetThreadNotificationSettings.Model $model;
|
|
public final /* synthetic */ int $threadMemberFlag;
|
|
public final /* synthetic */ WidgetThreadNotificationSettings this$0;
|
|
|
|
/* compiled from: WidgetThreadNotificationSettings.kt */
|
|
/* renamed from: com.discord.widgets.channels.settings.WidgetThreadNotificationSettings$configureNotificationRadio$1$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function1<ThreadMember, Unit> {
|
|
public final /* synthetic */ Context $context;
|
|
public final /* synthetic */ WidgetThreadNotificationSettings$configureNotificationRadio$1 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(WidgetThreadNotificationSettings$configureNotificationRadio$1 widgetThreadNotificationSettings$configureNotificationRadio$1, Context context) {
|
|
super(1);
|
|
this.this$0 = widgetThreadNotificationSettings$configureNotificationRadio$1;
|
|
this.$context = context;
|
|
}
|
|
|
|
/* 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(ThreadMember threadMember) {
|
|
invoke(threadMember);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(ThreadMember threadMember) {
|
|
m.checkNotNullParameter(threadMember, "threadMember");
|
|
c.a.d.o.g(this.$context, 2131887330, 0, null, 12);
|
|
StoreStream.Companion.getAnalytics().onThreadNotificationSettingsUpdated(this.this$0.$model.getChannel().h(), this.this$0.$model.getChannel().r(), this.this$0.$model.getNotificationSetting(), threadMember.a());
|
|
}
|
|
}
|
|
|
|
public WidgetThreadNotificationSettings$configureNotificationRadio$1(WidgetThreadNotificationSettings widgetThreadNotificationSettings, int i, WidgetThreadNotificationSettings.Model model) {
|
|
this.this$0 = widgetThreadNotificationSettings;
|
|
this.$threadMemberFlag = i;
|
|
this.$model = model;
|
|
}
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
m.checkNotNullExpressionValue(view, "it");
|
|
Context context = view.getContext();
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().updateThreadMemberSettings(this.$model.getChannel().h(), new RestAPIParams.ThreadMemberSettings(this.$threadMemberFlag)), false, 1, null), this.this$0, null, 2, null), this.this$0.getClass(), context, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this, context), 60, (Object) null);
|
|
}
|
|
}
|