discord-jadx/app/src/main/java/com/discord/stores/StoreMessageAck$postPending...

101 lines
4.6 KiB
Java

package com.discord.stores;
import android.content.Context;
import com.discord.restapi.RestAPIParams;
import com.discord.stores.StoreMessageAck;
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;
import rx.Observable;
import rx.functions.Action1;
/* compiled from: StoreMessageAck.kt */
public final class StoreMessageAck$postPendingAck$1 extends o implements Function1<StoreMessageAck.PendingAck, Unit> {
public final /* synthetic */ int $mentionCount;
public final /* synthetic */ StoreMessageAck this$0;
/* compiled from: StoreMessageAck.kt */
/* renamed from: com.discord.stores.StoreMessageAck$postPendingAck$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ StoreMessageAck.Ack $ack;
public final /* synthetic */ long $channelId;
public final /* synthetic */ StoreMessageAck$postPendingAck$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreMessageAck$postPendingAck$1 storeMessageAck$postPendingAck$1, long j, StoreMessageAck.Ack ack) {
super(0);
this.this$0 = storeMessageAck$postPendingAck$1;
this.$channelId = j;
this.$ack = ack;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreMessageAck.access$updateAcks(this.this$0.this$0, this.$channelId, this.$ack);
}
}
/* compiled from: StoreMessageAck.kt */
/* renamed from: com.discord.stores.StoreMessageAck$postPendingAck$1$2 reason: invalid class name */
public static final class AnonymousClass2<T> implements Action1<Void> {
public final /* synthetic */ long $channelId;
public AnonymousClass2(long j) {
this.$channelId = j;
}
public final void call(Void r3) {
StoreStream.Companion.getAnalytics().ackMessage(this.$channelId);
}
}
/* compiled from: StoreMessageAck.kt */
/* renamed from: com.discord.stores.StoreMessageAck$postPendingAck$1$3 reason: invalid class name */
public static final class AnonymousClass3 extends o implements Function1<Void, Unit> {
public static final AnonymousClass3 INSTANCE = new AnonymousClass3();
public AnonymousClass3() {
super(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 r1) {
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreMessageAck$postPendingAck$1(StoreMessageAck storeMessageAck, int i) {
super(1);
this.this$0 = storeMessageAck;
this.$mentionCount = i;
}
/* 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(StoreMessageAck.PendingAck pendingAck) {
invoke(pendingAck);
return Unit.a;
}
public final void invoke(StoreMessageAck.PendingAck pendingAck) {
m.checkNotNullParameter(pendingAck, "pendingAck");
long component1 = pendingAck.component1();
StoreMessageAck.Ack component2 = pendingAck.component2();
StoreMessageAck.access$getDispatcher$p(this.this$0).schedule(new AnonymousClass1(this, component1, component2));
Observable t = ObservableExtensionsKt.restSubscribeOn$default(StoreMessageAck.access$getRestAPI$p(this.this$0).postChannelMessagesAck(component1, Long.valueOf(component2.getMessageId()), new RestAPIParams.ChannelMessagesAck(Boolean.valueOf(component2.isLockedAck()), Integer.valueOf(this.$mentionCount))), false, 1, null).t(new AnonymousClass2(component1));
m.checkNotNullExpressionValue(t, "restAPI\n .postC…).ackMessage(channelId) }");
ObservableExtensionsKt.appSubscribe$default(t, (Context) null, "REST: ack", (Function1) null, AnonymousClass3.INSTANCE, (Function1) null, (Function0) null, (Function0) null, 117, (Object) null);
}
}