2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreVoiceStates;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "StoreVoiceStates.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final dirtyGuildIds:Ljava/util/HashSet;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashSet<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public myUserId:Ljava/lang/Long;
|
|
|
|
|
|
|
|
.field public sessionId:Ljava/lang/String;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
.field public final stream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public final voiceStates:Ljava/util/HashMap;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelVoice$State;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public voiceStatesSnapshot:Ljava/util/HashMap;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelVoice$State;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final voiceStatesSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/SerializedSubject<",
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelVoice$State;",
|
|
|
|
">;>;",
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelVoice$State;",
|
|
|
|
">;>;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2020-08-04 06:02:43 +00:00
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStream;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreVoiceStates;->stream:Lcom/discord/stores/StoreStream;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
new-instance p1, Ljava/util/HashMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-direct {p1, v0}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStatesSnapshot:Ljava/util/HashMap;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
move-result-object p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-direct {v0, p1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStatesSubject:Lrx/subjects/SerializedSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
new-instance p1, Ljava/util/HashSet;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-direct {p1}, Ljava/util/HashSet;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreVoiceStates;->dirtyGuildIds:Ljava/util/HashSet;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
2020-08-04 06:02:43 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "stream"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final clear()V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->dirtyGuildIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/HashMap;->keySet()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashSet;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/HashMap;->clear()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
.method private final notifyVoiceStatesUpdated()V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->handleVoiceStatesUpdated()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.method private final updateVoiceState(Lcom/discord/models/domain/ModelVoice$State;Ljava/lang/Long;)V
|
|
|
|
.locals 9
|
2020-08-04 06:02:43 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->getGuildId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->getUserId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->getSessionId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreVoiceStates;->sessionId:Ljava/lang/String;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p2, v4}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
xor-int/2addr p2, v4
|
|
|
|
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreVoiceStates;->myUserId:Ljava/lang/Long;
|
|
|
|
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v5
|
|
|
|
|
|
|
|
cmp-long p2, v2, v5
|
|
|
|
|
|
|
|
if-nez p2, :cond_2
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreVoiceStates;->dirtyGuildIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
iget-object v5, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
iget-object v7, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
invoke-virtual {v7, v8}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
|
|
|
check-cast v7, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
if-eqz v7, :cond_3
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
new-instance v7, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v7}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->isRemoveSignal()Z
|
|
|
|
|
|
|
|
move-result v8
|
|
|
|
|
|
|
|
if-eqz v8, :cond_4
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v7, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
invoke-virtual {v7, v8}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
check-cast v8, Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, v8}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v8
|
|
|
|
|
|
|
|
xor-int/2addr v8, v4
|
|
|
|
|
|
|
|
if-eqz v8, :cond_5
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {v7, p2, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
const-string p1, "(voiceStates[voiceStateG\u2026 = true\n }\n }"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v7, p1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v5, v6, v7}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
if-eqz v4, :cond_6
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreVoiceStates;->dirtyGuildIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreVoiceStates;->notifyVoiceStatesUpdated()V
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
:cond_6
|
|
|
|
:goto_4
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic updateVoiceState$default(Lcom/discord/stores/StoreVoiceStates;Lcom/discord/models/domain/ModelVoice$State;Ljava/lang/Long;ILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreVoiceStates;->updateVoiceState(Lcom/discord/models/domain/ModelVoice$State;Ljava/lang/Long;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final get(J)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelVoice$State;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStatesSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreVoiceStates$get$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StoreVoiceStates$get$1;-><init>(J)V
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
const-string p2, "voiceStatesSubject\n \u2026Id, ModelVoice.State>() }"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
const-string p2, "voiceStatesSubject\n \u2026 .distinctUntilChanged()"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final get(JJ)Lrx/Observable;
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(JJ)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelVoice$State;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/stores/StoreVoiceStates;->get(J)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance p2, Lcom/discord/stores/StoreVoiceStates$get$2;
|
|
|
|
|
|
|
|
invoke-direct {p2, p3, p4}, Lcom/discord/stores/StoreVoiceStates$get$2;-><init>(J)V
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->U(Lr0/k/b;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "get(guildId)\n .\u2026 .distinctUntilChanged()"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getMediaStatesBlocking()Ljava/util/Map;
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelVoice$State;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleAuthToken(Ljava/lang/String;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreVoiceStates;->clear()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getSessionId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->sessionId:Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getMe()Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "payload.me"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->myUserId:Ljava/lang/Long;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreVoiceStates;->clear()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getGuilds()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "payload.guilds"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
|
|
|
|
const-string v1, "guild"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getVoiceStates()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
const-string v3, "voiceState"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v2, v3}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-direct {p0, v2, v3}, Lcom/discord/stores/StoreVoiceStates;->updateVoiceState(Lcom/discord/models/domain/ModelVoice$State;Ljava/lang/Long;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "payload"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleGuildAdd(Lcom/discord/models/domain/ModelGuild;)V
|
|
|
|
.locals 4
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getVoiceStates()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
const-string v2, "voiceState"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v1, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-direct {p0, v1, v2}, Lcom/discord/stores/StoreVoiceStates;->updateVoiceState(Lcom/discord/models/domain/ModelVoice$State;Ljava/lang/Long;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "guild"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleGuildRemove(Lcom/discord/models/domain/ModelGuild;)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->dirtyGuildIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "guild"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleVoiceStateUpdate(Lcom/discord/models/domain/ModelVoice$State;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
invoke-static {p0, p1, v0, v1, v0}, Lcom/discord/stores/StoreVoiceStates;->updateVoiceState$default(Lcom/discord/stores/StoreVoiceStates;Lcom/discord/models/domain/ModelVoice$State;Ljava/lang/Long;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2020-08-18 03:20:31 +00:00
|
|
|
const-string p1, "voiceState"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onDispatchEnded()V
|
|
|
|
.locals 6
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->dirtyGuildIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/HashSet;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/HashMap;->size()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(I)V
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreVoiceStates;->dirtyGuildIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()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
|
|
|
|
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStates:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
new-instance v3, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v3, v4}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
invoke-interface {v0, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStatesSnapshot:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_1
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreVoiceStates;->dirtyGuildIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-nez v3, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-string v4, "it.key"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v3, v4}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const-string v4, "it.value"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v2, v4}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v0, v3, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStatesSnapshot:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreVoiceStates;->voiceStatesSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iget-object v1, v1, Lrx/subjects/SerializedSubject;->e:Lr0/n/c;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-virtual {v1, v0}, Lr0/n/c;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreVoiceStates;->dirtyGuildIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/HashSet;->clear()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|