1237 lines
33 KiB
Smali
1237 lines
33 KiB
Smali
.class public final Lcom/discord/stores/StoreMessageAck;
|
|
.super Lcom/discord/stores/Store;
|
|
.source "StoreMessageAck.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/stores/StoreMessageAck$PendingAck;,
|
|
Lcom/discord/stores/StoreMessageAck$Ack;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final acks:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreMessageAck$Ack;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final acksSubject:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreMessageAck$Ack;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public acksUpdated:Z
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public final stream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStream;Lcom/discord/stores/Dispatcher;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMessageAck;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreMessageAck;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMessageAck;->acks:Ljava/util/HashMap;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Ljava/util/HashMap;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageAck;->acks:Ljava/util/HashMap;
|
|
|
|
invoke-direct {p2, v0}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
const-string v0, "MOST_RECENT_ACKS_V3"
|
|
|
|
invoke-direct {p1, v0, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMessageAck;->acksSubject:Lcom/discord/utilities/persister/Persister;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "dispatcher"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "stream"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreMessageAck;)Lcom/discord/stores/Dispatcher;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreMessageAck;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getStream$p(Lcom/discord/stores/StoreMessageAck;)Lcom/discord/stores/StoreStream;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreMessageAck;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$internalAck(Lcom/discord/stores/StoreMessageAck;Lcom/discord/models/domain/ModelChannel;ZZ)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreMessageAck;->internalAck(Lcom/discord/models/domain/ModelChannel;ZZ)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$postPendingAck(Lcom/discord/stores/StoreMessageAck;Lrx/Observable;I)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreMessageAck;->postPendingAck(Lrx/Observable;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$updateAcks(Lcom/discord/stores/StoreMessageAck;JLcom/discord/stores/StoreMessageAck$Ack;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreMessageAck;->updateAcks(JLcom/discord/stores/StoreMessageAck$Ack;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic ack$default(Lcom/discord/stores/StoreMessageAck;JZZILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p5, 0x4
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p4, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3, p4}, Lcom/discord/stores/StoreMessageAck;->ack(JZZ)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic ackGuild$default(Lcom/discord/stores/StoreMessageAck;Landroid/content/Context;JLkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p5, 0x4
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
sget-object p4, Lcom/discord/stores/StoreMessageAck$ackGuild$1;->INSTANCE:Lcom/discord/stores/StoreMessageAck$ackGuild$1;
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3, p4}, Lcom/discord/stores/StoreMessageAck;->ackGuild(Landroid/content/Context;JLkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getPendingAck(Lrx/Observable;ZZ)Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Long;",
|
|
">;ZZ)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/stores/StoreMessageAck$PendingAck;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreMessageAck$getPendingAck$1;
|
|
|
|
invoke-direct {v0, p3}, Lcom/discord/stores/StoreMessageAck$getPendingAck$1;-><init>(Z)V
|
|
|
|
new-instance p3, Lcom/discord/stores/StoreMessageAck$getPendingAck$2;
|
|
|
|
invoke-direct {p3, p0, p2, v0}, Lcom/discord/stores/StoreMessageAck$getPendingAck$2;-><init>(Lcom/discord/stores/StoreMessageAck;ZLcom/discord/stores/StoreMessageAck$getPendingAck$1;)V
|
|
|
|
invoke-virtual {p1, p3}, Lrx/Observable;->k(Lg0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "switchMap { channelId ->\u2026gAck.EMPTY)\n }\n }"
|
|
|
|
invoke-static {p1, p2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private final internalAck(Lcom/discord/models/domain/ModelChannel;ZZ)V
|
|
.locals 7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lg0/m/e/j;
|
|
|
|
invoke-direct {v0, p1}, Lg0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
const-string p1, "Observable.just(channel.id)"
|
|
|
|
invoke-static {v0, p1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, v0, p2, p3}, Lcom/discord/stores/StoreMessageAck;->getPendingAck(Lrx/Observable;ZZ)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x1
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->takeSingleUntilTimeout$default(Lrx/Observable;JZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
const/4 p3, 0x1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-static {p0, p1, p2, p3, v0}, Lcom/discord/stores/StoreMessageAck;->postPendingAck$default(Lcom/discord/stores/StoreMessageAck;Lrx/Observable;IILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final postPendingAck(Lrx/Observable;I)V
|
|
.locals 11
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/stores/StoreMessageAck$PendingAck;",
|
|
">;I)V"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreMessageAck$postPendingAck$1;
|
|
|
|
invoke-direct {v0, p0, p2}, Lcom/discord/stores/StoreMessageAck$postPendingAck$1;-><init>(Lcom/discord/stores/StoreMessageAck;I)V
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreMessageAck$postPendingAck$2;->INSTANCE:Lcom/discord/stores/StoreMessageAck$postPendingAck$2;
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->c(Lg0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v1, "filter { it != PendingAck.EMPTY }"
|
|
|
|
invoke-static {p2, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v3
|
|
|
|
new-instance v8, Lcom/discord/stores/StoreMessageAck$postPendingAck$3;
|
|
|
|
invoke-direct {v8, v0}, Lcom/discord/stores/StoreMessageAck$postPendingAck$3;-><init>(Lcom/discord/stores/StoreMessageAck$postPendingAck$1;)V
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/16 v9, 0x1e
|
|
|
|
const/4 v10, 0x0
|
|
|
|
invoke-static/range {v2 .. v10}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic postPendingAck$default(Lcom/discord/stores/StoreMessageAck;Lrx/Observable;IILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreMessageAck;->postPendingAck(Lrx/Observable;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final updateAcks(JLcom/discord/stores/StoreMessageAck$Ack;)V
|
|
.locals 4
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageAck;->acks:Ljava/util/HashMap;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessageAck$Ack;->getMessageId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p3}, Lcom/discord/stores/StoreMessageAck$Ack;->getMessageId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v1, v2}, Lcom/discord/models/domain/ModelMessage;->compare(Ljava/lang/Long;Ljava/lang/Long;)I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
invoke-virtual {p3}, Lcom/discord/stores/StoreMessageAck$Ack;->isLockedAck()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessageAck$Ack;->isLockedAck()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageAck;->acks:Ljava/util/HashMap;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, p1, p3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreMessageAck;->acksUpdated:Z
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final ack(JZZ)V
|
|
.locals 8
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageAck;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v7, Lcom/discord/stores/StoreMessageAck$ack$1;
|
|
|
|
move-object v1, v7
|
|
|
|
move-object v2, p0
|
|
|
|
move-wide v3, p1
|
|
|
|
move v5, p3
|
|
|
|
move v6, p4
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreMessageAck$ack$1;-><init>(Lcom/discord/stores/StoreMessageAck;JZZ)V
|
|
|
|
invoke-virtual {v0, v7}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final ackGuild(Landroid/content/Context;JLkotlin/jvm/functions/Function0;)V
|
|
.locals 11
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
"J",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
sget-object v1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p2, p3}, Lcom/discord/utilities/rest/RestAPI;->ackGuild(J)Lrx/Observable;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 p3, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p2, p3, v1, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v5, 0x0
|
|
|
|
new-instance v6, Lcom/discord/stores/StoreMessageAck$ackGuild$2;
|
|
|
|
invoke-direct {v6, p4}, Lcom/discord/stores/StoreMessageAck$ackGuild$2;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/16 v9, 0x34
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const-string v4, "REST: ackGuild"
|
|
|
|
move-object v3, p1
|
|
|
|
invoke-static/range {v2 .. v10}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Landroid/content/Context;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "onSuccess"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final get()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreMessageAck$Ack;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageAck;->acksSubject:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final get(J)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/stores/StoreMessageAck$Ack;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreMessageAck;->get()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreMessageAck$get$1;
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StoreMessageAck$get$1;-><init>(J)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(Lg0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "get()\n .map { i\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {p1, p2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getAcks$app_productionDiscordExternalRelease()Ljava/util/HashMap;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreMessageAck$Ack;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageAck;->acks:Ljava/util/HashMap;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handleChannelSelected()V
|
|
.locals 11
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessageAck;->acks:Ljava/util/HashMap;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map$Entry;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v4, v1
|
|
|
|
check-cast v4, Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessageAck;->acks:Ljava/util/HashMap;
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
const-wide/16 v5, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x3
|
|
|
|
const/4 v10, 0x0
|
|
|
|
invoke-static/range {v4 .. v10}, Lcom/discord/stores/StoreMessageAck$Ack;->copy$default(Lcom/discord/stores/StoreMessageAck$Ack;JZZILjava/lang/Object;)Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreMessageAck;->acksUpdated:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
.locals 14
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_b
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getReadState()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "payload.readState"
|
|
|
|
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/16 v1, 0xa
|
|
|
|
invoke-static {v0, v1}, Le/k/a/c/e/p/e;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Ly/q/l;->mapCapacity(I)I
|
|
|
|
move-result v1
|
|
|
|
const/16 v2, 0x10
|
|
|
|
if-ge v1, v2, :cond_0
|
|
|
|
const/16 v1, 0x10
|
|
|
|
:cond_0
|
|
new-instance v2, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v2, v1}, Ljava/util/LinkedHashMap;-><init>(I)V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelReadState;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelReadState;->getChannelId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
new-instance v5, Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
invoke-direct {v5, v1, v3, v3}, Lcom/discord/stores/StoreMessageAck$Ack;-><init>(Lcom/discord/models/domain/ModelReadState;ZZ)V
|
|
|
|
invoke-interface {v2, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-static {v2}, Ly/q/l;->toMutableMap(Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getGuilds()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "payload.guilds"
|
|
|
|
invoke-static {v1, v2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_2
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-eqz v2, :cond_a
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
const-string v5, "guild"
|
|
|
|
invoke-static {v2, v5}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelGuild;->getMembers()Ljava/util/Map;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getMe()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v7, "payload.me"
|
|
|
|
invoke-static {v6, v7}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v5, v6}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/models/domain/ModelGuildMember;
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelGuildMember;->getJoinedAt()J
|
|
|
|
move-result-wide v5
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const-wide/16 v5, 0x0
|
|
|
|
:goto_1
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelGuild;->getChannels()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v7, "guild.channels"
|
|
|
|
invoke-static {v2, v7}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v7, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_4
|
|
:goto_2
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v8
|
|
|
|
const-string v9, "channel"
|
|
|
|
if-eqz v8, :cond_6
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v8
|
|
|
|
move-object v10, v8
|
|
|
|
check-cast v10, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-static {v10, v9}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v10}, Lcom/discord/models/domain/ModelChannel;->isGuildTextyChannel()Z
|
|
|
|
move-result v9
|
|
|
|
if-eqz v9, :cond_5
|
|
|
|
invoke-virtual {v10}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v9
|
|
|
|
invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-interface {v0, v9}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v9
|
|
|
|
if-nez v9, :cond_5
|
|
|
|
const/4 v9, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
const/4 v9, 0x0
|
|
|
|
:goto_3
|
|
if-eqz v9, :cond_4
|
|
|
|
invoke-interface {v7, v8}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v7}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v7
|
|
|
|
:cond_7
|
|
:goto_4
|
|
invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_9
|
|
|
|
invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v8
|
|
|
|
move-object v10, v8
|
|
|
|
check-cast v10, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-static {v10, v9}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v10}, Lcom/discord/models/domain/ModelChannel;->getLastMessageId()J
|
|
|
|
move-result-wide v10
|
|
|
|
const/16 v12, 0x16
|
|
|
|
ushr-long/2addr v10, v12
|
|
|
|
const-wide v12, 0x14aa2cab000L
|
|
|
|
add-long/2addr v10, v12
|
|
|
|
cmp-long v12, v10, v5
|
|
|
|
if-gez v12, :cond_8
|
|
|
|
const/4 v10, 0x1
|
|
|
|
goto :goto_5
|
|
|
|
:cond_8
|
|
const/4 v10, 0x0
|
|
|
|
:goto_5
|
|
if-eqz v10, :cond_7
|
|
|
|
invoke-interface {v2, v8}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_4
|
|
|
|
:cond_9
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_6
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-static {v4, v9}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
new-instance v6, Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelChannel;->getLastMessageId()J
|
|
|
|
move-result-wide v7
|
|
|
|
invoke-direct {v6, v7, v8, v3, v3}, Lcom/discord/stores/StoreMessageAck$Ack;-><init>(JZZ)V
|
|
|
|
invoke-interface {v0, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_6
|
|
|
|
:cond_a
|
|
iget-object p1, p0, Lcom/discord/stores/StoreMessageAck;->acks:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {p1, v0}, Ljava/util/HashMap;->putAll(Ljava/util/Map;)V
|
|
|
|
iput-boolean v4, p0, Lcom/discord/stores/StoreMessageAck;->acksUpdated:Z
|
|
|
|
return-void
|
|
|
|
:cond_b
|
|
const-string p1, "payload"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final handleMessageAck(Lcom/discord/models/domain/ModelReadState;)V
|
|
.locals 4
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelReadState;->getChannelId()J
|
|
|
|
move-result-wide v0
|
|
|
|
new-instance v2, Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {v2, p1, v3, v3}, Lcom/discord/stores/StoreMessageAck$Ack;-><init>(Lcom/discord/models/domain/ModelReadState;ZZ)V
|
|
|
|
invoke-direct {p0, v0, v1, v2}, Lcom/discord/stores/StoreMessageAck;->updateAcks(JLcom/discord/stores/StoreMessageAck$Ack;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "readState"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final handleMessageCreate(Lcom/discord/models/domain/ModelMessage;)V
|
|
.locals 5
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessage;->getAuthor()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "message.author"
|
|
|
|
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreMessageAck;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreStream;->getUsers$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreUser;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreUser;->getMeInternal$app_productionDiscordExternalRelease()Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessage;->getChannelId()J
|
|
|
|
move-result-wide v0
|
|
|
|
new-instance v2, Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessage;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
const/4 p1, 0x0
|
|
|
|
invoke-direct {v2, v3, v4, p1, p1}, Lcom/discord/stores/StoreMessageAck$Ack;-><init>(JZZ)V
|
|
|
|
invoke-direct {p0, v0, v1, v2}, Lcom/discord/stores/StoreMessageAck;->updateAcks(JLcom/discord/stores/StoreMessageAck$Ack;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "message"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public init(Landroid/content/Context;)V
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/stores/Store;->init(Landroid/content/Context;)V
|
|
|
|
sget-object p1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreStream$Companion;->getChannelsSelected()Lcom/discord/stores/StoreChannelsSelected;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreChannelsSelected;->getId()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreMessageAck$init$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreMessageAck$init$1;-><init>(Lcom/discord/stores/StoreMessageAck;)V
|
|
|
|
invoke-virtual {p1, v1}, Lrx/Observable;->k(Lg0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "StoreStream\n .get\u2026 0L\n }\n }"
|
|
|
|
invoke-static {p1, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-wide/16 v1, 0x1f4
|
|
|
|
sget-object v3, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {p1, v1, v2, v3}, Lrx/Observable;->b(JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "StoreStream\n .get\u20260, TimeUnit.MILLISECONDS)"
|
|
|
|
invoke-static {p1, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {p0, p1, v1, v1}, Lcom/discord/stores/StoreMessageAck;->getPendingAck(Lrx/Observable;ZZ)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-static {p0, p1, v1, v2, v0}, Lcom/discord/stores/StoreMessageAck;->postPendingAck$default(Lcom/discord/stores/StoreMessageAck;Lrx/Observable;IILjava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final markUnread(JJ)V
|
|
.locals 13
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMessages()Lcom/discord/stores/StoreMessages;
|
|
|
|
move-result-object v0
|
|
|
|
move-wide v5, p1
|
|
|
|
invoke-virtual {v0, p1, p2}, Lcom/discord/stores/StoreMessages;->get(J)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreMessageAck$markUnread$1;->INSTANCE:Lcom/discord/stores/StoreMessageAck$markUnread$1;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->c(Lg0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "StoreStream\n .get\u2026ilter { it.isNotEmpty() }"
|
|
|
|
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const-wide/16 v2, 0xa
|
|
|
|
invoke-static {v0, v2, v3, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->takeSingleUntilTimeout(Lrx/Observable;JZ)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-class v7, Lcom/discord/stores/StoreMessageAck;
|
|
|
|
new-instance v10, Lcom/discord/stores/StoreMessageAck$markUnread$2;
|
|
|
|
move-object v1, v10
|
|
|
|
move-object v2, p0
|
|
|
|
move-wide/from16 v3, p3
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreMessageAck$markUnread$2;-><init>(Lcom/discord/stores/StoreMessageAck;JJ)V
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/16 v11, 0x1e
|
|
|
|
const/4 v12, 0x0
|
|
|
|
move-object v4, v0
|
|
|
|
move-object v5, v7
|
|
|
|
move-object v7, v1
|
|
|
|
invoke-static/range {v4 .. v12}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDispatchEnded()V
|
|
.locals 5
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreMessageAck;->acksUpdated:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreMessageAck;->acksUpdated:Z
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessageAck;->acksSubject:Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance v2, Ljava/util/HashMap;
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreMessageAck;->acks:Ljava/util/HashMap;
|
|
|
|
invoke-direct {v2, v3}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
const/4 v3, 0x2
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v1, v2, v0, v3, v4}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|