2019-02-04 20:05:16 +00:00
|
|
|
.class public Lcom/discord/stores/StoreUser;
|
2019-02-04 20:08:30 +00:00
|
|
|
.super Lcom/discord/stores/Store;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "StoreUser.java"
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-02-04 20:08:30 +00:00
|
|
|
.field private final collector:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
.field private isMeDirty:Z
|
|
|
|
|
|
|
|
.field private isUsersDirty:Z
|
|
|
|
|
2019-02-04 20:05:16 +00:00
|
|
|
.field me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:08:30 +00:00
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end field
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.field private final meIdPublisher:Lcom/discord/utilities/persister/Persister;
|
2019-02-04 20:05:16 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lcom/discord/utilities/persister/Persister<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.field private final mePublisher:Lcom/discord/utilities/persister/Persister;
|
2019-02-04 20:05:16 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
|
|
"Lcom/discord/models/domain/ModelUser$Me;",
|
2019-02-04 20:05:16 +00:00
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.field private userRequestManager:Lcom/discord/utilities/users/UserRequestManager;
|
|
|
|
|
|
|
|
.field private final users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2019-02-04 20:05:16 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.field private final usersPublisher:Lrx/subjects/Subject;
|
2019-02-04 20:05:16 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lrx/subjects/Subject<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStream;)V
|
|
|
|
.locals 4
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v0, Lcom/discord/utilities/persister/Persister;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string v1, "STORE_USERS_ME_V8"
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object v2, Lcom/discord/models/domain/ModelUser$Me;->EMPTY:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v0, v1, v2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreUser;->mePublisher:Lcom/discord/utilities/persister/Persister;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v0, Lcom/discord/utilities/persister/Persister;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string v1, "STORE_USERS_ME_ID_V4"
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, v2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreUser;->meIdPublisher:Lcom/discord/utilities/persister/Persister;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v0, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v0}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;-><init>()V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->bI(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreUser;->usersPublisher:Lrx/subjects/Subject;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUser;->collector:Lcom/discord/stores/StoreStream;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method private fetchMissing(Ljava/util/Collection;Ljava/util/Set;)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Collection<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v0, Ljava/util/HashSet;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/Long;
|
|
|
|
|
|
|
|
invoke-interface {p2, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreUser;->userRequestManager:Lcom/discord/utilities/users/UserRequestManager;
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/utilities/users/UserRequestManager;->requestUsers(Ljava/util/Collection;)V
|
|
|
|
|
|
|
|
return-void
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public static synthetic lambda$dispatchUsersLoaded$6(Lcom/discord/stores/StoreUser;Ljava/util/List;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->collector:Lcom/discord/stores/StoreStream;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreStream;->handleUserUpdated(Ljava/util/List;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-void
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public static synthetic lambda$get$2(Lcom/discord/stores/StoreUser;ZLjava/util/Collection;Ljava/util/Map;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p3}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, p2, p1}, Lcom/discord/stores/StoreUser;->fetchMissing(Ljava/util/Collection;Ljava/util/Set;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method static synthetic lambda$getMe$4(ZLcom/discord/models/domain/ModelUser$Me;)Ljava/lang/Boolean;
|
|
|
|
.locals 0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-nez p1, :cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz p0, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
goto :goto_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
const/4 p0, 0x0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
goto :goto_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
const/4 p0, 0x1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:goto_1
|
|
|
|
invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method static synthetic lambda$getMeId$5(Ljava/lang/Long;)Ljava/lang/Boolean;
|
|
|
|
.locals 0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz p0, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const/4 p0, 0x1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
goto :goto_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
const/4 p0, 0x0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:goto_0
|
|
|
|
invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-object p0
|
|
|
|
.end method
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method static synthetic lambda$getUser$3(JLjava/util/Map;)Lcom/discord/models/domain/ModelUser;
|
|
|
|
.locals 0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p2, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast p0, Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-object p0
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public static synthetic lambda$init$1(Lcom/discord/stores/StoreUser;Lcom/discord/models/domain/ModelUser;)Lkotlin/Unit;
|
|
|
|
.locals 2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->collector:Lcom/discord/stores/StoreStream;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v1, Lcom/discord/stores/-$$Lambda$StoreUser$6g_zrSD8TzRDaDJ6lTVMtH-9gEM;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/-$$Lambda$StoreUser$6g_zrSD8TzRDaDJ6lTVMtH-9gEM;-><init>(Lcom/discord/stores/StoreUser;Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/StoreStream;->schedule(Lrx/functions/Action0;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:42:43 +00:00
|
|
|
sget-object p1, Lkotlin/Unit;->bbx:Lkotlin/Unit;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-object p1
|
|
|
|
.end method
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public static synthetic lambda$null$0(Lcom/discord/stores/StoreUser;Lcom/discord/models/domain/ModelUser;)V
|
|
|
|
.locals 1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->collector:Lcom/discord/stores/StoreStream;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreStream;->handleUserUpdated(Ljava/util/List;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method private updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
.locals 3
|
2019-02-04 20:08:30 +00:00
|
|
|
.param p1 # Lcom/discord/models/domain/ModelUser;
|
|
|
|
.annotation build Llombok/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz p1, :cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->get(J)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/models/domain/ModelUser;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1, p1}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const/4 p1, 0x1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreUser;->isUsersDirty:Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
|
|
|
|
const-string v0, "user"
|
|
|
|
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public dispatchUsersLoaded(Ljava/util/List;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->collector:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/-$$Lambda$StoreUser$axYiPqfTsRKmNM9jQCvwb5qbAgY;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/-$$Lambda$StoreUser$axYiPqfTsRKmNM9jQCvwb5qbAgY;-><init>(Lcom/discord/stores/StoreUser;Ljava/util/List;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/StoreStream;->schedule(Lrx/functions/Action0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public get(Ljava/util/Collection;)Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Collection<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;)",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const/4 v0, 0x0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p0, p1, v0}, Lcom/discord/stores/StoreUser;->get(Ljava/util/Collection;Z)Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public get(Ljava/util/Collection;Z)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Collection<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;Z)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreUser;->getAll()Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {p1}, Lcom/discord/app/g;->a(Ljava/util/Collection;)Lrx/Observable$Transformer;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {}, Lcom/discord/app/g;->dv()Lrx/Observable$Transformer;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v1, Lcom/discord/stores/-$$Lambda$StoreUser$ugdpR3Ou6U3tE2bmERDIOm3KvYE;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v1, p0, p2, p1}, Lcom/discord/stores/-$$Lambda$StoreUser$ugdpR3Ou6U3tE2bmERDIOm3KvYE;-><init>(Lcom/discord/stores/StoreUser;ZLjava/util/Collection;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/functions/Action1;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getAll()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->usersPublisher:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getMe()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/stores/StoreUser;->getMe(Z)Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public getMe(Z)Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2019-02-04 20:08:30 +00:00
|
|
|
"(Z)",
|
|
|
|
"Lrx/Observable<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->mePublisher:Lcom/discord/utilities/persister/Persister;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v1, Lcom/discord/stores/-$$Lambda$StoreUser$MW8b4FPoq5wAg1XQ3aHDb4wEI9U;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v1, p1}, Lcom/discord/stores/-$$Lambda$StoreUser$MW8b4FPoq5wAg1XQ3aHDb4wEI9U;-><init>(Z)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->b(Lrx/functions/b;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {}, Lcom/discord/app/g;->dw()Lrx/Observable$Transformer;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getMeId()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lrx/Observable<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->meIdPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object v1, Lcom/discord/stores/-$$Lambda$StoreUser$hb4B1acwmLoUsgI3vdjvPC0GOro;->INSTANCE:Lcom/discord/stores/-$$Lambda$StoreUser$hb4B1acwmLoUsgI3vdjvPC0GOro;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->b(Lrx/functions/b;)Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {}, Lcom/discord/app/g;->dw()Lrx/Observable$Transformer;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getUser(J)Lrx/Observable;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 2
|
2019-02-04 20:05:16 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lrx/Observable<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreUser;->getAll()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v1, Lcom/discord/stores/-$$Lambda$StoreUser$IBMvFxSgPZPJ-DutgwBWjRmputo;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/-$$Lambda$StoreUser$IBMvFxSgPZPJ-DutgwBWjRmputo;-><init>(J)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->e(Lrx/functions/b;)Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->Dx()Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method getUserSynchronous(J)Lcom/discord/models/domain/ModelUser;
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, p1, p2}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->get(J)Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast p1, Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-object p1
|
|
|
|
.end method
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public getUsernames(Ljava/util/Collection;)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Collection<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreUser;->getAll()Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object v1, Lcom/discord/stores/-$$Lambda$pLsmgdQtDOgFnpCx9u7ChDy9U1E;->INSTANCE:Lcom/discord/stores/-$$Lambda$pLsmgdQtDOgFnpCx9u7ChDy9U1E;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {p1, v1}, Lcom/discord/app/g;->a(Ljava/util/Collection;Lkotlin/jvm/functions/Function1;)Lrx/Observable$Transformer;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, p1}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-object p1
|
|
|
|
.end method
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method handleAuthToken(Ljava/lang/String;)V
|
|
|
|
.locals 0
|
|
|
|
.param p1 # Ljava/lang/String;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-nez p1, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const/4 p1, 0x1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreUser;->isMeDirty:Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object p1, Lcom/discord/models/domain/ModelUser$Me;->EMPTY:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
return-void
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method handleChannelCreated(Lcom/discord/models/domain/ModelChannel;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getRecipients()Ljava/util/List;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
goto :goto_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
|
|
.locals 6
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->clear()V
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lcom/discord/models/domain/ModelUser$Me;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getMe()Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/models/domain/ModelUser$Me;->merge(Lcom/discord/models/domain/ModelUser;)Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser$Me;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getPrivateChannels()Ljava/util/List;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v1, :cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelChannel;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelChannel;->getRecipients()Ljava/util/List;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:goto_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v2, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelUser;->getId()J
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-wide v4
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v4
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v3, v4, v2}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getRelationships()Ljava/util/List;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_1
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v1, :cond_3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelUserRelationship;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUserRelationship;->getUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v2, :cond_2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUserRelationship;->getUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getId()J
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-wide v3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUserRelationship;->getUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v2, v3, v1}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getGuilds()Ljava/util/List;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_4
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_6
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuild;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getMembers()Ljava/util/Map;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getMembers()Ljava/util/Map;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_5
|
|
|
|
:goto_2
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v1, :cond_4
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelGuildMember;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v2, :cond_5
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getId()J
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-wide v3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v2, v3, v1}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_6
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string v0, "Discovered "
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->size()I
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string v0, " initial users."
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {p1}, Lcom/discord/app/AppLog;->i(Ljava/lang/String;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser$Me;->getId()J
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-wide v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser$Me;->getEmail()Ljava/lang/String;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelUser$Me;->getUsername()Ljava/lang/String;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelUser$Me;->getDiscriminatorWithPadding()Ljava/lang/String;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-static {p1, v0, v1}, Lcom/discord/app/AppLog;->a(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreUser;->isUsersDirty:Z
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreUser;->isMeDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method handleFriendSuggestionCreate(Ljava/util/List;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelFriendSuggestion;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelFriendSuggestion;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelFriendSuggestion;->getSuggestedUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
goto :goto_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method handleGuildAddOrSync(Lcom/discord/models/domain/ModelGuild;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getMembers()Ljava/util/Map;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuildMember;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method handleGuildMemberAdd(Lcom/discord/models/domain/ModelGuildMember;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
|
|
|
|
|
|
|
return-void
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method handleGuildMembersChunks(Ljava/util/List;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:05:16 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Ljava/util/List<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Lcom/discord/models/domain/ModelGuildMember$Chunk;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuildMember$Chunk;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildMember$Chunk;->getMembers()Ljava/util/List;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v1, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelGuildMember;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_1
|
|
|
|
return-void
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method handleMessageCreateOrUpdate(Ljava/util/List;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:05:16 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Ljava/util/List<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Lcom/discord/models/domain/ModelMessage;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelMessage;->getMentions()Ljava/util/List;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v1, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method handleMessagesLoaded(Ljava/util/List;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:05:16 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/stores/StoreMessagesLoader$ChannelChunk;",
|
2019-02-04 20:05:16 +00:00
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v0, Lcom/discord/stores/StoreMessagesLoader$ChannelChunk;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessagesLoader$ChannelChunk;->getMessages()Ljava/util/List;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_1
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v1, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessage;->getAuthor()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, v2}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessage;->getMentions()Ljava/util/List;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v2, :cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, v2}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_2
|
2019-02-04 20:05:16 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method handlePresenceUpdate(Lcom/discord/models/domain/ModelPresence;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
2019-02-04 20:05:16 +00:00
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPresence;->getUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz p1, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method handleUserRelationshipAdd(Lcom/discord/models/domain/ModelUserRelationship;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserRelationship;->getUser()Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method handleUserUpdated(Ljava/util/List;)V
|
|
|
|
.locals 6
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:05:16 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
2019-02-04 20:05:16 +00:00
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelUser;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreUser;->updateUser(Lcom/discord/models/domain/ModelUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v1, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser$Me;->getId()J
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-wide v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-wide v3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
cmp-long v5, v1, v3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-nez v5, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1, v0}, Lcom/discord/models/domain/ModelUser$Me;->merge(Lcom/discord/models/domain/ModelUser;)Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const/4 v0, 0x1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreUser;->isMeDirty:Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method protected init(Landroid/content/Context;)V
|
|
|
|
.locals 1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-super {p0, p1}, Lcom/discord/stores/Store;->init(Landroid/content/Context;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance p1, Lcom/discord/utilities/users/UserRequestManager;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v0, Lcom/discord/stores/-$$Lambda$StoreUser$MZIo40NS5_Uw_24iU1JY9CEtOJM;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v0, p0}, Lcom/discord/stores/-$$Lambda$StoreUser$MZIo40NS5_Uw_24iU1JY9CEtOJM;-><init>(Lcom/discord/stores/StoreUser;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p1, v0}, Lcom/discord/utilities/users/UserRequestManager;-><init>(Lkotlin/jvm/functions/Function1;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUser;->userRequestManager:Lcom/discord/utilities/users/UserRequestManager;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public onDispatchEnded()V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreUser;->isUsersDirty:Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->usersPublisher:Lrx/subjects/Subject;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreUser;->users:Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->fastCopy()Ljava/util/Map;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/Subject;->onNext(Ljava/lang/Object;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreUser;->isMeDirty:Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->mePublisher:Lcom/discord/utilities/persister/Persister;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/persister/Persister;->set(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-nez v0, :cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const-wide/16 v0, 0x0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
goto :goto_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser$Me;->getId()J
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-wide v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:goto_0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUser;->meIdPublisher:Lcom/discord/utilities/persister/Persister;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {v2, v0}, Lcom/discord/utilities/persister/Persister;->set(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_2
|
2019-02-04 20:08:30 +00:00
|
|
|
const/4 v0, 0x0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreUser;->isUsersDirty:Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreUser;->isMeDirty:Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|