73 lines
3.8 KiB
Java
73 lines
3.8 KiB
Java
|
package com.discord.widgets.chat.list.actions;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.view.View;
|
||
|
import com.discord.app.AppComponent;
|
||
|
import com.discord.models.message.Message;
|
||
|
import com.discord.utilities.rest.RestAPI;
|
||
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
||
|
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: MessageActionDialogs.kt */
|
||
|
public final class MessageActionDialogs$showPinMessageConfirmation$1 extends o implements Function1<View, Unit> {
|
||
|
public final /* synthetic */ AppComponent $appComponent;
|
||
|
public final /* synthetic */ Context $context;
|
||
|
public final /* synthetic */ boolean $isPinned;
|
||
|
public final /* synthetic */ Message $message;
|
||
|
public final /* synthetic */ Function0 $onSuccess;
|
||
|
|
||
|
/* compiled from: MessageActionDialogs.kt */
|
||
|
/* renamed from: com.discord.widgets.chat.list.actions.MessageActionDialogs$showPinMessageConfirmation$1$1 reason: invalid class name */
|
||
|
public static final class AnonymousClass1 extends o implements Function1<Void, Unit> {
|
||
|
public final /* synthetic */ MessageActionDialogs$showPinMessageConfirmation$1 this$0;
|
||
|
|
||
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
||
|
public AnonymousClass1(MessageActionDialogs$showPinMessageConfirmation$1 messageActionDialogs$showPinMessageConfirmation$1) {
|
||
|
super(1);
|
||
|
this.this$0 = messageActionDialogs$showPinMessageConfirmation$1;
|
||
|
}
|
||
|
|
||
|
/* 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(Void r1) {
|
||
|
invoke(r1);
|
||
|
return Unit.a;
|
||
|
}
|
||
|
|
||
|
public final void invoke(Void r5) {
|
||
|
MessageActionDialogs$showPinMessageConfirmation$1 messageActionDialogs$showPinMessageConfirmation$1 = this.this$0;
|
||
|
c.a.d.o.g(messageActionDialogs$showPinMessageConfirmation$1.$context, messageActionDialogs$showPinMessageConfirmation$1.$isPinned ? 2131891338 : 2131891322, 0, null, 12);
|
||
|
this.this$0.$onSuccess.mo1invoke();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
||
|
public MessageActionDialogs$showPinMessageConfirmation$1(Message message, boolean z2, AppComponent appComponent, Context context, Function0 function0) {
|
||
|
super(1);
|
||
|
this.$message = message;
|
||
|
this.$isPinned = z2;
|
||
|
this.$appComponent = appComponent;
|
||
|
this.$context = context;
|
||
|
this.$onSuccess = function0;
|
||
|
}
|
||
|
|
||
|
/* 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(View view) {
|
||
|
invoke(view);
|
||
|
return Unit.a;
|
||
|
}
|
||
|
|
||
|
public final void invoke(View view) {
|
||
|
m.checkNotNullParameter(view, "view");
|
||
|
long channelId = this.$message.getChannelId();
|
||
|
long id2 = this.$message.getId();
|
||
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.$isPinned ? RestAPI.Companion.getApi().deleteChannelPin(channelId, id2) : RestAPI.Companion.getApi().addChannelPin(channelId, id2), false, 1, null), this.$appComponent, null, 2, null), MessageActionDialogs.INSTANCE.getClass(), view.getContext(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 60, (Object) null);
|
||
|
}
|
||
|
}
|