3309 lines
89 KiB
Smali
3309 lines
89 KiB
Smali
.class public Lcom/discord/stores/StoreGuilds;
|
|
.super Ljava/lang/Object;
|
|
.source "StoreGuilds.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/stores/StoreGuilds$Actions;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final emptyComputedMap:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Computed;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field private final collector:Lcom/discord/stores/StoreStreamCollector;
|
|
|
|
.field final guildHasRole:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final guildHasRolePublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_preference/MGPreferenceRx",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Boolean;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final guildJoinedAt:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final guildJoinedAtPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_preference/MGPreferenceRx",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final guildLargeIds:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final guildLargeIdsPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_preference/MGPreferenceRx",
|
|
"<",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final guildMembers:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final guildMembersComputed:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Computed;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final guildMembersComputedPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_preference/MGPreferenceRx",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Computed;",
|
|
">;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final guildRoles:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildRole;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final guildRolesPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_preference/MGPreferenceRx",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildRole;",
|
|
">;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final guilds:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final guildsPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_preference/MGPreferenceRx",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final guildsUnavailable:Ljava/util/Set;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Set",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final guildsUnavailablePublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_preference/MGPreferenceRx",
|
|
"<",
|
|
"Ljava/util/Set",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.prologue
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreGuilds;->emptyComputedMap:Ljava/util/Map;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStreamCollector;)V
|
|
.locals 3
|
|
.param p1, "collector" # Lcom/discord/stores/StoreStreamCollector;
|
|
|
|
.prologue
|
|
const/16 v2, 0x7530
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildHasRole:Ljava/util/Map;
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildJoinedAt:Ljava/util/Map;
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIds:Ljava/util/List;
|
|
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailable:Ljava/util/Set;
|
|
|
|
const-string v0, "STORE_GUILDS_V5"
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->create(Ljava/lang/String;Ljava/lang/Object;I)Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildsPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const-string v0, "STORE_GUILD_MEMBERS_COMPUTED_V5"
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->create(Ljava/lang/String;Ljava/lang/Object;I)Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputedPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const-string v0, "STORE_GUILD_ROLES_V4"
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->create(Ljava/lang/String;Ljava/lang/Object;I)Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildRolesPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const-string v0, "STORE_GUILD_HAS_ROLE_V4"
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->create(Ljava/lang/String;Ljava/lang/Object;I)Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildHasRolePublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const-string v0, "STORE_GUILD_JOINED_AT_V4"
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->create(Ljava/lang/String;Ljava/lang/Object;I)Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildJoinedAtPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const-string v0, "STORE_GUILDS_LARGE_V4"
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->create(Ljava/lang/String;Ljava/lang/Object;I)Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIdsPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
invoke-static {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->create(Ljava/lang/String;Ljava/lang/Object;)Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailablePublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGuilds;->collector:Lcom/discord/stores/StoreStreamCollector;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$0(JLjava/util/Map;)Lcom/discord/models/domain/ModelGuild;
|
|
.locals 2
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/stores/StoreGuilds;->lambda$get$143(JLjava/util/Map;)Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$1(JLjava/util/Map;)Ljava/util/Map;
|
|
.locals 2
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/stores/StoreGuilds;->lambda$getComputed$144(JLjava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$2(Ljava/util/Collection;Ljava/util/Map;)Ljava/util/Map;
|
|
.locals 1
|
|
|
|
invoke-static {p0, p1}, Lcom/discord/stores/StoreGuilds;->lambda$getComputed$146(Ljava/util/Collection;Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$3(JLjava/util/Map;)Ljava/util/Map;
|
|
.locals 2
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/stores/StoreGuilds;->lambda$getRoles$147(JLjava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$4(Ljava/util/List;Ljava/util/List;Ljava/util/Set;)Ljava/util/List;
|
|
.locals 1
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/stores/StoreGuilds;->lambda$getLargeOrUnsyncedIds$149(Ljava/util/List;Ljava/util/List;Ljava/util/Set;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$5(JLjava/util/Map;)Ljava/lang/Boolean;
|
|
.locals 2
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/stores/StoreGuilds;->lambda$getHasRole$150(JLjava/util/Map;)Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$6(JLjava/util/Map;)Ljava/lang/Long;
|
|
.locals 2
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/stores/StoreGuilds;->lambda$getJoinedAt$151(JLjava/util/Map;)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$7(Ljava/util/List;Ljava/util/List;Ljava/lang/Long;)Z
|
|
.locals 1
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/stores/StoreGuilds;->lambda$null$148(Ljava/util/List;Ljava/util/List;Ljava/lang/Long;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$8(Ljava/util/Collection;Ljava/util/Map$Entry;)Z
|
|
.locals 1
|
|
|
|
invoke-static {p0, p1}, Lcom/discord/stores/StoreGuilds;->lambda$null$145(Ljava/util/Collection;Ljava/util/Map$Entry;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private handleGuild(Lcom/discord/models/domain/ModelGuild;ZZ)V
|
|
.locals 6
|
|
.param p1, "guild" # Lcom/discord/models/domain/ModelGuild;
|
|
.param p2, "remove" # Z
|
|
.param p3, "update" # Z
|
|
|
|
.prologue
|
|
const/4 v3, 0x0
|
|
|
|
.local v3, "updated":Z
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
.local v0, "guildId":J
|
|
if-eqz p2, :cond_2
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
if-eqz p3, :cond_1
|
|
|
|
invoke-direct {p0, v3}, Lcom/discord/stores/StoreGuilds;->updateGuilds(Z)V
|
|
|
|
:cond_1
|
|
return-void
|
|
|
|
:cond_2
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-static {v4, p1}, Lcom/discord/models/domain/ModelGuild;->createPartial(Lcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/ModelGuild;)Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v2
|
|
|
|
.local v2, "merged":Lcom/discord/models/domain/ModelGuild;
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2, v4}, Lcom/discord/models/domain/ModelGuild;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v4, v5, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private handleGuildLargeIds(JZZZ)V
|
|
.locals 3
|
|
.param p1, "guildId" # J
|
|
.param p3, "isLarge" # Z
|
|
.param p4, "remove" # Z
|
|
.param p5, "update" # Z
|
|
|
|
.prologue
|
|
const/4 v0, 0x0
|
|
|
|
.local v0, "updated":Z
|
|
if-eqz p4, :cond_2
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIds:Ljava/util/List;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIds:Ljava/util/List;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
if-eqz p5, :cond_1
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreGuilds;->updateGuildLargeIds(Z)V
|
|
|
|
:cond_1
|
|
return-void
|
|
|
|
:cond_2
|
|
if-eqz p3, :cond_3
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIds:Ljava/util/List;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIds:Ljava/util/List;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIds:Ljava/util/List;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIds:Ljava/util/List;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private handleGuildMembers(JJLjava/util/Collection;ZZ)Z
|
|
.locals 11
|
|
.param p1, "guildId" # J
|
|
.param p3, "removedGuildMemberUserId" # J
|
|
.param p6, "remove" # Z
|
|
.param p7, "update" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(JJ",
|
|
"Ljava/util/Collection",
|
|
"<",
|
|
"Lcom/discord/models/domain/ModelGuildMember;",
|
|
">;ZZ)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p5, "members":Ljava/util/Collection;, "Ljava/util/Collection<Lcom/discord/models/domain/ModelGuildMember;>;"
|
|
const/4 v2, 0x0
|
|
|
|
.local v2, "updated":Z
|
|
const/4 v3, 0x0
|
|
|
|
.local v3, "updatedComputed":Z
|
|
if-eqz p6, :cond_5
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
cmp-long v6, p3, v6
|
|
|
|
if-lez v6, :cond_3
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_0
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
if-eqz p7, :cond_2
|
|
|
|
invoke-direct {p0, v3}, Lcom/discord/stores/StoreGuilds;->updateGuildMemberComputed(Z)V
|
|
|
|
:cond_2
|
|
return v2
|
|
|
|
:cond_3
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_4
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_4
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
if-eqz p5, :cond_1
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_6
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
new-instance v8, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v8}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-interface {v6, v7, v8}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_6
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_7
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
new-instance v8, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v8}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-interface {v6, v7, v8}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_7
|
|
invoke-interface/range {p5 .. p5}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v7
|
|
|
|
:cond_8
|
|
:goto_1
|
|
invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelGuildMember;
|
|
|
|
.local v1, "member":Lcom/discord/models/domain/ModelGuildMember;
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v6
|
|
|
|
if-eqz v6, :cond_8
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
.local v4, "userId":J
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_9
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v1, v6}, Lcom/discord/models/domain/ModelGuildMember;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_a
|
|
|
|
:cond_9
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:cond_a
|
|
new-instance v0, Lcom/discord/models/domain/ModelGuildMember$Computed;
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getRoles()Ljava/util/List;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getNick()Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-direct {v0, v6, v8, v9}, Lcom/discord/models/domain/ModelGuildMember$Computed;-><init>(Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)V
|
|
|
|
.local v0, "computed":Lcom/discord/models/domain/ModelGuildMember$Computed;
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_b
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v0, v6}, Lcom/discord/models/domain/ModelGuildMember$Computed;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_8
|
|
|
|
:cond_b
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-interface {v6, v8, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto/16 :goto_1
|
|
.end method
|
|
|
|
.method private handleGuildMembersChunks(Ljava/util/List;)V
|
|
.locals 11
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Chunk;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p1, "chunks":Ljava/util/List;, "Ljava/util/List<Lcom/discord/models/domain/ModelGuildMember$Chunk;>;"
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
.local v9, "updated":Z
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v10
|
|
|
|
:goto_0
|
|
invoke-interface {v10}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v10}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuildMember$Chunk;
|
|
|
|
.local v0, "chunk":Lcom/discord/models/domain/ModelGuildMember$Chunk;
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildMember$Chunk;->getGuildId()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildMember$Chunk;->getMembers()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
move-object v1, p0
|
|
|
|
move v8, v7
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildMembers(JJLjava/util/Collection;ZZ)Z
|
|
|
|
move-result v9
|
|
|
|
goto :goto_0
|
|
|
|
.end local v0 # "chunk":Lcom/discord/models/domain/ModelGuildMember$Chunk;
|
|
:cond_0
|
|
if-eqz v9, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreGuilds;->updateGuildMemberComputed(Z)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private handleGuildMembersMap(JJLjava/util/Map;ZZ)V
|
|
.locals 9
|
|
.param p1, "guildId" # J
|
|
.param p3, "removedGuildMemberUserId" # J
|
|
.param p6, "remove" # Z
|
|
.param p7, "update" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(JJ",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember;",
|
|
">;ZZ)V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p5, "members":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildMember;>;"
|
|
if-eqz p5, :cond_0
|
|
|
|
invoke-interface {p5}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v6
|
|
|
|
:goto_0
|
|
move-object v1, p0
|
|
|
|
move-wide v2, p1
|
|
|
|
move-wide v4, p3
|
|
|
|
move v7, p6
|
|
|
|
move/from16 v8, p7
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildMembers(JJLjava/util/Collection;ZZ)Z
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v6, 0x0
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private handleGuildRoleSingle(JJLcom/discord/models/domain/ModelGuildRole;ZZ)V
|
|
.locals 9
|
|
.param p1, "guildId" # J
|
|
.param p3, "roleId" # J
|
|
.param p5, "role" # Lcom/discord/models/domain/ModelGuildRole;
|
|
.param p6, "remove" # Z
|
|
.param p7, "update" # Z
|
|
|
|
.prologue
|
|
invoke-static {p5}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
move-object v1, p0
|
|
|
|
move-wide v2, p1
|
|
|
|
move-wide v4, p3
|
|
|
|
move v7, p6
|
|
|
|
move/from16 v8, p7
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildRoles(JJLjava/util/List;ZZ)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private handleGuildRoles(JJLjava/util/List;ZZ)V
|
|
.locals 7
|
|
.param p1, "guildId" # J
|
|
.param p3, "deletedRoleId" # J
|
|
.param p6, "remove" # Z
|
|
.param p7, "update" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(JJ",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Lcom/discord/models/domain/ModelGuildRole;",
|
|
">;ZZ)V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p5, "roles":Ljava/util/List;, "Ljava/util/List<Lcom/discord/models/domain/ModelGuildRole;>;"
|
|
const/4 v1, 0x0
|
|
|
|
.local v1, "updated":Z
|
|
if-eqz p6, :cond_3
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v2, p3, v2
|
|
|
|
if-lez v2, :cond_2
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
if-eqz p7, :cond_1
|
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreGuilds;->updateRoles(Z)V
|
|
|
|
:cond_1
|
|
return-void
|
|
|
|
:cond_2
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
new-instance v4, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v4}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-interface {v2, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_4
|
|
if-eqz p5, :cond_1
|
|
|
|
invoke-interface {p5}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:cond_5
|
|
:goto_1
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
.local v0, "role":Lcom/discord/models/domain/ModelGuildRole;
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v2, v4}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/models/domain/ModelGuildRole;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_5
|
|
|
|
:cond_6
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v2, v4, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_1
|
|
.end method
|
|
|
|
.method private handleGuildUnavailable(JZZ)V
|
|
.locals 3
|
|
.param p1, "guildId" # J
|
|
.param p3, "unavailable" # Z
|
|
.param p4, "remove" # Z
|
|
|
|
.prologue
|
|
const/4 v0, 0x0
|
|
|
|
.local v0, "updated":Z
|
|
if-eqz p4, :cond_1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailable:Ljava/util/Set;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailable:Ljava/util/Set;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreGuilds;->updateGuildsUnavailable(Z)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
if-nez p3, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailable:Ljava/util/Set;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailable:Ljava/util/Set;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private handleHasRoleAndJoinedAt(JLjava/util/Map;Z)V
|
|
.locals 9
|
|
.param p1, "guildId" # J
|
|
.param p4, "update" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember;",
|
|
">;Z)V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p3, "members":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildMember;>;"
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->collector:Lcom/discord/stores/StoreStreamCollector;
|
|
|
|
iget-object v4, v4, Lcom/discord/stores/StoreStreamCollector;->users:Lcom/discord/stores/StoreUser;
|
|
|
|
iget-object v3, v4, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
.local v3, "user":Lcom/discord/models/domain/ModelUser;
|
|
if-nez v3, :cond_1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_1
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {p3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelGuildMember;
|
|
|
|
.local v1, "me":Lcom/discord/models/domain/ModelGuildMember;
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getRoles()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
.local v2, "roles":Ljava/util/List;, "Ljava/util/List<Ljava/lang/Long;>;"
|
|
if-eqz v2, :cond_5
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->size()I
|
|
|
|
move-result v4
|
|
|
|
if-lez v4, :cond_5
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.local v0, "hasRole":Z
|
|
:goto_1
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guildHasRole:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guildHasRole:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/lang/Boolean;
|
|
|
|
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/Boolean;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_3
|
|
|
|
:cond_2
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guildHasRole:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guildHasRolePublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
new-instance v5, Ljava/util/HashMap;
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreGuilds;->guildHasRole:Ljava/util/Map;
|
|
|
|
invoke-direct {v5, v6}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-virtual {v4, v5}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->set(Ljava/lang/Object;)V
|
|
|
|
:cond_3
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guildJoinedAt:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_4
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guildJoinedAt:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/lang/Long;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getJoinedAtMillis()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/Long;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
:cond_4
|
|
iget-object v4, p0, Lcom/discord/stores/StoreGuilds;->guildJoinedAt:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildMember;->getJoinedAtMillis()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreGuilds;->updateJoinedAt()V
|
|
|
|
goto/16 :goto_0
|
|
|
|
.end local v0 # "hasRole":Z
|
|
:cond_5
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_1
|
|
.end method
|
|
|
|
.method private static synthetic lambda$get$143(JLjava/util/Map;)Lcom/discord/models/domain/ModelGuild;
|
|
.locals 2
|
|
.param p2, "guilds" # Ljava/util/Map;
|
|
|
|
.prologue
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static synthetic lambda$getComputed$144(JLjava/util/Map;)Ljava/util/Map;
|
|
.locals 2
|
|
.param p2, "computed" # Ljava/util/Map;
|
|
|
|
.prologue
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
:goto_0
|
|
return-object v0
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/discord/stores/StoreGuilds;->emptyComputedMap:Ljava/util/Map;
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private static synthetic lambda$getComputed$146(Ljava/util/Collection;Ljava/util/Map;)Ljava/util/Map;
|
|
.locals 2
|
|
.param p1, "members" # Ljava/util/Map;
|
|
|
|
.prologue
|
|
invoke-static {p1}, Lcom/annimon/stream/Stream;->of(Ljava/util/Map;)Lcom/annimon/stream/Stream;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Lcom/discord/stores/StoreGuilds$$Lambda$10;->lambdaFactory$(Ljava/util/Collection;)Lcom/annimon/stream/function/Predicate;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/annimon/stream/Stream;->filter(Lcom/annimon/stream/function/Predicate;)Lcom/annimon/stream/Stream;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/discord/utilities/app/AppCollectors;->toMap()Lcom/annimon/stream/Collector;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/annimon/stream/Stream;->collect(Lcom/annimon/stream/Collector;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static synthetic lambda$getHasRole$150(JLjava/util/Map;)Ljava/lang/Boolean;
|
|
.locals 2
|
|
.param p2, "hasRole" # Ljava/util/Map;
|
|
|
|
.prologue
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Boolean;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static synthetic lambda$getJoinedAt$151(JLjava/util/Map;)Ljava/lang/Long;
|
|
.locals 2
|
|
.param p2, "joinedAt" # Ljava/util/Map;
|
|
|
|
.prologue
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Long;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static synthetic lambda$getLargeOrUnsyncedIds$149(Ljava/util/List;Ljava/util/List;Ljava/util/Set;)Ljava/util/List;
|
|
.locals 2
|
|
.param p0, "syncedGuildIds" # Ljava/util/List;
|
|
.param p1, "largeGuildIds" # Ljava/util/List;
|
|
.param p2, "guildIds" # Ljava/util/Set;
|
|
|
|
.prologue
|
|
invoke-static {p2}, Lcom/annimon/stream/Stream;->of(Ljava/lang/Iterable;)Lcom/annimon/stream/Stream;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p0}, Lcom/discord/stores/StoreGuilds$$Lambda$9;->lambdaFactory$(Ljava/util/List;Ljava/util/List;)Lcom/annimon/stream/function/Predicate;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/annimon/stream/Stream;->filter(Lcom/annimon/stream/function/Predicate;)Lcom/annimon/stream/Stream;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/annimon/stream/Collectors;->toList()Lcom/annimon/stream/Collector;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/annimon/stream/Stream;->collect(Lcom/annimon/stream/Collector;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static synthetic lambda$getRoles$147(JLjava/util/Map;)Ljava/util/Map;
|
|
.locals 2
|
|
.param p2, "roles" # Ljava/util/Map;
|
|
|
|
.prologue
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static synthetic lambda$null$145(Ljava/util/Collection;Ljava/util/Map$Entry;)Z
|
|
.locals 1
|
|
.param p1, "member" # Ljava/util/Map$Entry;
|
|
|
|
.prologue
|
|
invoke-interface {p1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p0, v0}, Ljava/util/Collection;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private static synthetic lambda$null$148(Ljava/util/List;Ljava/util/List;Ljava/lang/Long;)Z
|
|
.locals 1
|
|
.param p2, "guildId" # Ljava/lang/Long;
|
|
|
|
.prologue
|
|
invoke-interface {p0, p2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-interface {p1, p2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
:goto_0
|
|
return v0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private updateGuildLargeIds(Z)V
|
|
.locals 2
|
|
.param p1, "updated" # Z
|
|
|
|
.prologue
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIds:Ljava/util/List;
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
.local v0, "shallowCopy":Ljava/util/List;, "Ljava/util/List<Ljava/lang/Long;>;"
|
|
invoke-static {v0}, Ljava/util/Collections;->sort(Ljava/util/List;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIdsPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
invoke-virtual {v1, v0}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->set(Ljava/lang/Object;)V
|
|
|
|
.end local v0 # "shallowCopy":Ljava/util/List;, "Ljava/util/List<Ljava/lang/Long;>;"
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private updateGuildMemberComputed(Z)V
|
|
.locals 6
|
|
.param p1, "updated" # Z
|
|
|
|
.prologue
|
|
if-eqz p1, :cond_1
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
.local v1, "shallowCopy":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/Long;Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildMember$Computed;>;>;"
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-interface {v2}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:goto_0
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Map$Entry;
|
|
|
|
.local v0, "entry":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/Long;Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildMember$Computed;>;>;"
|
|
invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
new-instance v5, Ljava/util/HashMap;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
invoke-direct {v5, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-interface {v1, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
.end local v0 # "entry":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/Long;Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildMember$Computed;>;>;"
|
|
:cond_0
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputedPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
invoke-virtual {v2, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->set(Ljava/lang/Object;)V
|
|
|
|
.end local v1 # "shallowCopy":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/Long;Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildMember$Computed;>;>;"
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private updateGuilds(Z)V
|
|
.locals 3
|
|
.param p1, "updated" # Z
|
|
|
|
.prologue
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildsPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->set(Ljava/lang/Object;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private updateGuildsUnavailable(Z)V
|
|
.locals 3
|
|
.param p1, "updated" # Z
|
|
|
|
.prologue
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailablePublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailable:Ljava/util/Set;
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->set(Ljava/lang/Object;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private updateJoinedAt()V
|
|
.locals 3
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildJoinedAtPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildJoinedAt:Ljava/util/Map;
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->set(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private updateRoles(Z)V
|
|
.locals 6
|
|
.param p1, "updated" # Z
|
|
|
|
.prologue
|
|
if-eqz p1, :cond_1
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
.local v1, "shallowCopy":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/Long;Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildRole;>;>;"
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-interface {v2}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:goto_0
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Map$Entry;
|
|
|
|
.local v0, "entry":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/Long;Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildRole;>;>;"
|
|
invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
new-instance v5, Ljava/util/HashMap;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
invoke-direct {v5, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-interface {v1, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
.end local v0 # "entry":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/Long;Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildRole;>;>;"
|
|
:cond_0
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuilds;->guildRolesPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
invoke-virtual {v2, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->set(Ljava/lang/Object;)V
|
|
|
|
.end local v1 # "shallowCopy":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/Long;Ljava/util/Map<Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildRole;>;>;"
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public get()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildsPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->get(Z)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/discord/utilities/app/AppTransformers;->computation()Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public get(J)Lrx/Observable;
|
|
.locals 3
|
|
.param p1, "guildId" # J
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreGuilds;->get()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/stores/StoreGuilds$$Lambda$1;->lambdaFactory$(J)Lrx/functions/Func1;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->distinctUntilChanged()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getComputed()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Computed;",
|
|
">;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputedPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->get(Z)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/discord/utilities/app/AppTransformers;->computation()Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getComputed(J)Lrx/Observable;
|
|
.locals 3
|
|
.param p1, "guildId" # J
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Computed;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreGuilds;->getComputed()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/stores/StoreGuilds$$Lambda$2;->lambdaFactory$(J)Lrx/functions/Func1;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->distinctUntilChanged()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getComputed(JLjava/util/Collection;)Lrx/Observable;
|
|
.locals 3
|
|
.param p1, "guildId" # J
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J",
|
|
"Ljava/util/Collection",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
">;)",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Computed;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p3, "userIds":Ljava/util/Collection;, "Ljava/util/Collection<Ljava/lang/Long;>;"
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/stores/StoreGuilds;->getComputed(J)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p3}, Lcom/discord/stores/StoreGuilds$$Lambda$3;->lambdaFactory$(Ljava/util/Collection;)Lrx/functions/Func1;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->distinctUntilChanged()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getHasRole()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Boolean;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildHasRolePublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->get(Z)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/discord/utilities/app/AppTransformers;->computation()Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getHasRole(J)Lrx/Observable;
|
|
.locals 3
|
|
.param p1, "guildId" # J
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreGuilds;->getHasRole()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/stores/StoreGuilds$$Lambda$7;->lambdaFactory$(J)Lrx/functions/Func1;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->distinctUntilChanged()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getJoinedAt()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildJoinedAtPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->get(Z)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/discord/utilities/app/AppTransformers;->computationDistinctUntilChanged()Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getJoinedAt(J)Lrx/Observable;
|
|
.locals 3
|
|
.param p1, "guildId" # J
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreGuilds;->getJoinedAt()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/stores/StoreGuilds$$Lambda$8;->lambdaFactory$(J)Lrx/functions/Func1;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->distinctUntilChanged()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getLarge()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIdsPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->get(Z)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/discord/utilities/app/AppTransformers;->computation()Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getLargeOrUnsyncedIds()Lrx/Observable;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->collector:Lcom/discord/stores/StoreStreamCollector;
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreStreamCollector;->guildsSync:Lcom/discord/stores/StoreGuildsSync;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreGuildsSync;->getIds()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreGuilds;->getLarge()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreGuilds;->get()Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreGuilds$$Lambda$5;->lambdaFactory$()Lrx/functions/Func1;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lrx/Observable;->distinctUntilChanged()Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreGuilds$$Lambda$6;->lambdaFactory$()Lrx/functions/Func3;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lrx/Observable;->combineLatest(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func3;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->distinctUntilChanged()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getRoles()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildRole;",
|
|
">;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildRolesPublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->get(Z)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/discord/utilities/app/AppTransformers;->computation()Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getRoles(J)Lrx/Observable;
|
|
.locals 3
|
|
.param p1, "guildId" # J
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildRole;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreGuilds;->getRoles()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/stores/StoreGuilds$$Lambda$4;->lambdaFactory$(J)Lrx/functions/Func1;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->distinctUntilChanged()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getUnavailable()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable",
|
|
"<",
|
|
"Ljava/util/Set",
|
|
"<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailablePublisher:Lcom/discord/utilities/mg_preference/MGPreferenceRx;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/mg_preference/MGPreferenceRx;->get()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/discord/utilities/app/AppTransformers;->computationDistinctUntilChanged()Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
.locals 10
|
|
.param p1, "payload" # Lcom/discord/models/domain/ModelPayload;
|
|
|
|
.prologue
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->clear()V
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->clear()V
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->clear()V
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->clear()V
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildLargeIds:Ljava/util/List;
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->clear()V
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailable:Ljava/util/Set;
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->clear()V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getGuilds()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v9
|
|
|
|
:goto_0
|
|
invoke-interface {v9}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v9}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
.local v0, "guild":Lcom/discord/models/domain/ModelGuild;
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->isUnavailable()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuilds;->guildsUnavailable:Ljava/util/Set;
|
|
|
|
invoke-virtual {v0}, 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-interface {v1, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getRoles()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildRoles(JJLjava/util/List;ZZ)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {p0, v0, v1, v2}, Lcom/discord/stores/StoreGuilds;->handleGuild(Lcom/discord/models/domain/ModelGuild;ZZ)V
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->isLarge()Z
|
|
|
|
move-result v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreGuilds;->handleGuildLargeIds(JZZZ)V
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getMembersMap()Ljava/util/Map;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildMembersMap(JJLjava/util/Map;ZZ)V
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getMembersMap()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-direct {p0, v2, v3, v1, v4}, Lcom/discord/stores/StoreGuilds;->handleHasRoleAndJoinedAt(JLjava/util/Map;Z)V
|
|
|
|
goto :goto_0
|
|
|
|
.end local v0 # "guild":Lcom/discord/models/domain/ModelGuild;
|
|
:cond_1
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreGuilds;->updateGuilds(Z)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreGuilds;->updateRoles(Z)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreGuilds;->updateGuildLargeIds(Z)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreGuilds;->updateGuildMemberComputed(Z)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreGuilds;->updateJoinedAt()V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreGuilds;->updateGuildsUnavailable(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method handleGuildAdd(Lcom/discord/models/domain/ModelGuild;)V
|
|
.locals 9
|
|
.param p1, "guild" # Lcom/discord/models/domain/ModelGuild;
|
|
|
|
.prologue
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->isUnavailable()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {p0, v0, v1, v2, v3}, Lcom/discord/stores/StoreGuilds;->handleGuildUnavailable(JZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->isUnavailable()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getRoles()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildRoles(JJLjava/util/List;ZZ)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, p1, v0, v1}, Lcom/discord/stores/StoreGuilds;->handleGuild(Lcom/discord/models/domain/ModelGuild;ZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->isLarge()Z
|
|
|
|
move-result v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreGuilds;->handleGuildLargeIds(JZZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getMembersMap()Ljava/util/Map;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildMembersMap(JJLjava/util/Map;ZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getMembersMap()Ljava/util/Map;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
invoke-direct {p0, v0, v1, v2, v3}, Lcom/discord/stores/StoreGuilds;->handleHasRoleAndJoinedAt(JLjava/util/Map;Z)V
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method handleGuildMemberAdd(Ljava/util/List;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Chunk;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p1, "chunks":Ljava/util/List;, "Ljava/util/List<Lcom/discord/models/domain/ModelGuildMember$Chunk;>;"
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreGuilds;->handleGuildMembersChunks(Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method handleGuildMemberRemove(Lcom/discord/models/domain/ModelGuildMember;)V
|
|
.locals 9
|
|
.param p1, "member" # Lcom/discord/models/domain/ModelGuildMember;
|
|
|
|
.prologue
|
|
const/4 v7, 0x1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getGuildId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v1, p0
|
|
|
|
move v8, v7
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildMembers(JJLjava/util/Collection;ZZ)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method handleGuildRemove(Lcom/discord/models/domain/ModelGuild;)V
|
|
.locals 9
|
|
.param p1, "guild" # Lcom/discord/models/domain/ModelGuild;
|
|
|
|
.prologue
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->isUnavailable()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
invoke-direct {p0, v0, v1, v2, v3}, Lcom/discord/stores/StoreGuilds;->handleGuildUnavailable(JZZ)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, p1, v0, v1}, Lcom/discord/stores/StoreGuilds;->handleGuild(Lcom/discord/models/domain/ModelGuild;ZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x1
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildRoles(JJLjava/util/List;ZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x1
|
|
|
|
const/4 v6, 0x1
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreGuilds;->handleGuildLargeIds(JZZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x1
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildMembers(JJLjava/util/Collection;ZZ)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method handleGuildRoleAdd(Lcom/discord/models/domain/ModelGuildRole$Payload;)V
|
|
.locals 12
|
|
.param p1, "role" # Lcom/discord/models/domain/ModelGuildRole$Payload;
|
|
|
|
.prologue
|
|
const-wide/16 v4, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getRole()Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v6
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildRoleSingle(JJLcom/discord/models/domain/ModelGuildRole;ZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v10
|
|
|
|
invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map;
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildMembersMap(JJLjava/util/Map;ZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
invoke-direct {p0, v2, v3, v0, v8}, Lcom/discord/stores/StoreGuilds;->handleHasRoleAndJoinedAt(JLjava/util/Map;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method handleGuildRoleRemove(Lcom/discord/models/domain/ModelGuildRole$Payload;)V
|
|
.locals 10
|
|
.param p1, "role" # Lcom/discord/models/domain/ModelGuildRole$Payload;
|
|
|
|
.prologue
|
|
const/4 v7, 0x1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getRole()Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v1, p0
|
|
|
|
move v8, v7
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildRoles(JJLjava/util/List;ZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v1
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v8
|
|
|
|
invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v0, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Ljava/util/Map;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
invoke-direct/range {v0 .. v7}, Lcom/discord/stores/StoreGuilds;->handleGuildMembersMap(JJLjava/util/Map;ZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuilds;->guildMembers:Ljava/util/Map;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
invoke-direct {p0, v2, v3, v0, v7}, Lcom/discord/stores/StoreGuilds;->handleHasRoleAndJoinedAt(JLjava/util/Map;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method handleGuildSynced(Lcom/discord/models/domain/ModelGuild;)V
|
|
.locals 9
|
|
.param p1, "guild" # Lcom/discord/models/domain/ModelGuild;
|
|
|
|
.prologue
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->isLarge()Z
|
|
|
|
move-result v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreGuilds;->handleGuildLargeIds(JZZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getMembersMap()Ljava/util/Map;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/stores/StoreGuilds;->handleGuildMembersMap(JJLjava/util/Map;ZZ)V
|
|
|
|
return-void
|
|
.end method
|