discord-jadx/app/src/main/java/com/discord/stores/StoreMessages$deleteMessage...

44 lines
1.9 KiB
Java

package com.discord.stores;
import com.discord.api.message.Message;
import com.discord.models.domain.ModelMessageDelete;
import com.discord.utilities.message.MessageUtils;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: StoreMessages.kt */
public final class StoreMessages$deleteMessage$2 extends o implements Function0<Unit> {
public final /* synthetic */ long $channelId;
public final /* synthetic */ Message $message;
public final /* synthetic */ long $messageId;
public final /* synthetic */ StoreMessages this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreMessages$deleteMessage$2(StoreMessages storeMessages, Message message, long j, long j2) {
super(0);
this.this$0 = storeMessages;
this.$message = message;
this.$channelId = j;
this.$messageId = j2;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
if (MessageUtils.isLocal(this.$message)) {
String B = this.$message.B();
if (B != null) {
StoreMessages.access$getMessageQueue(this.this$0, this.$channelId).cancel(B);
}
StoreMessages.access$handleLocalMessageDelete(this.this$0, this.$message);
Integer M = this.$message.M();
if (M != null && M.intValue() == -2) {
StoreMessages.access$trackFailedLocalMessageResolved(this.this$0, this.$message, FailedMessageResolutionType.DELETED);
}
} else if (MessageUtils.INSTANCE.isEphemeralMessage(this.$message)) {
this.this$0.handleMessageDelete(new ModelMessageDelete(this.$channelId, this.$messageId));
}
StoreMessages.access$getStream$p(this.this$0).handleLocalMessageDelete(this.$message);
}
}