1274 lines
34 KiB
Smali
1274 lines
34 KiB
Smali
.class public final Lcom/discord/stores/StorePermissions;
|
|
.super Lcom/discord/stores/Store;
|
|
.source "StorePermissions.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
# instance fields
|
|
.field private isDirty:Z
|
|
|
|
.field private final permissionsForChannel:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final permissionsForChannelByGuildPublisher:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final permissionsForChannelPublisher:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final permissionsForGuild:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final permissionsForGuildPublisher:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
.field private final storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
.field private final storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreGuilds;)V
|
|
.locals 1
|
|
|
|
const-string v0, "storeUser"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "storeChannels"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "storeGuilds"
|
|
|
|
invoke-static {p3, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StorePermissions;->storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StorePermissions;->storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
iput-object p3, p0, Lcom/discord/stores/StorePermissions;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuild:Ljava/util/Map;
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p2}, Ljava/util/HashMap;-><init>()V
|
|
|
|
const-string p3, "STORE_GUILD_PERMISSIONS_V3"
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuildPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p2}, Ljava/util/HashMap;-><init>()V
|
|
|
|
const-string p3, "STORE_CHANNEL_PERMISSIONS_V3"
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannelPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p2}, Ljava/util/HashMap;-><init>()V
|
|
|
|
const-string p3, "STORE_CHANNEL_PERMISSIONS_BY_GUILD_V3"
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannelByGuildPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final computeChannelPermissions(JLjava/lang/Iterable;)Ljava/util/Map;
|
|
.locals 16
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J",
|
|
"Ljava/lang/Iterable<",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;)",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
iget-object v1, v0, Lcom/discord/stores/StorePermissions;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
iget-object v1, v1, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
invoke-static/range {p1 .. p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
invoke-static {}, Lkotlin/a/ab;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
return-object v1
|
|
|
|
:cond_0
|
|
iget-object v2, v0, Lcom/discord/stores/StorePermissions;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
iget-object v2, v2, Lcom/discord/stores/StoreGuilds;->guildMembersComputed:Ljava/util/Map;
|
|
|
|
invoke-static/range {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;
|
|
|
|
iget-object v3, v0, Lcom/discord/stores/StorePermissions;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
iget-object v3, v3, Lcom/discord/stores/StoreGuilds;->guildRoles:Ljava/util/Map;
|
|
|
|
invoke-static/range {p1 .. p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
move-object v12, v3
|
|
|
|
check-cast v12, Ljava/util/Map;
|
|
|
|
const/16 v3, 0xa
|
|
|
|
move-object/from16 v4, p3
|
|
|
|
invoke-static {v4, v3}, Lkotlin/a/l;->a(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v3}, Lkotlin/a/ab;->cW(I)I
|
|
|
|
move-result v3
|
|
|
|
const/16 v5, 0x10
|
|
|
|
invoke-static {v3, v5}, Lkotlin/ranges/b;->ab(II)I
|
|
|
|
move-result v3
|
|
|
|
new-instance v5, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v5, v3}, Ljava/util/LinkedHashMap;-><init>(I)V
|
|
|
|
move-object v13, v5
|
|
|
|
check-cast v13, Ljava/util/Map;
|
|
|
|
invoke-interface/range {p3 .. p3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v14
|
|
|
|
:goto_0
|
|
invoke-interface {v14}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
invoke-interface {v14}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
move-object v15, v3
|
|
|
|
check-cast v15, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-virtual {v15}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
const v3, 0x7ff7fcff
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/stores/StorePermissions;->getMeId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuild;->getOwnerId()J
|
|
|
|
move-result-wide v7
|
|
|
|
invoke-virtual {v15}, Lcom/discord/models/domain/ModelChannel;->getPermissionOverwrites()Ljava/util/Map;
|
|
|
|
move-result-object v11
|
|
|
|
move-wide/from16 v5, p1
|
|
|
|
move-object v9, v2
|
|
|
|
move-object v10, v12
|
|
|
|
invoke-static/range {v3 .. v11}, Lcom/discord/utilities/permissions/PermissionUtils;->computePermissions(JJJLjava/util/Map;Ljava/util/Map;Ljava/util/Map;)I
|
|
|
|
move-result v3
|
|
|
|
:goto_1
|
|
invoke-virtual {v15}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v4, v3}, Lkotlin/q;->m(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v4, v3, Lkotlin/Pair;->first:Ljava/lang/Object;
|
|
|
|
iget-object v3, v3, Lkotlin/Pair;->second:Ljava/lang/Object;
|
|
|
|
invoke-interface {v13, v4, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return-object v13
|
|
.end method
|
|
|
|
.method private final getMeId()J
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreUser;->me:Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser$Me;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
|
|
:cond_0
|
|
const-wide/16 v0, 0x0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method private final updateGuildPermissions(J)V
|
|
.locals 12
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StorePermissions;->getMeId()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreChannels;->getChannels()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2}, 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;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
iget-object v1, p0, Lcom/discord/stores/StorePermissions;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
iget-object v1, v1, Lcom/discord/stores/StoreGuilds;->guilds:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
iget-object v2, p0, Lcom/discord/stores/StorePermissions;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
iget-object v2, v2, Lcom/discord/stores/StoreGuilds;->guildMembersComputed: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
|
|
|
|
move-object v9, v2
|
|
|
|
check-cast v9, Ljava/util/Map;
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StorePermissions;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
iget-object v2, v2, 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
|
|
|
|
move-object v10, v2
|
|
|
|
check-cast v10, Ljava/util/Map;
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StorePermissions;->getMeId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuild;->getOwnerId()J
|
|
|
|
move-result-wide v7
|
|
|
|
const/4 v11, 0x0
|
|
|
|
move-wide v5, p1
|
|
|
|
invoke-static/range {v3 .. v11}, Lcom/discord/utilities/permissions/PermissionUtils;->computePermissions(JJJLjava/util/Map;Ljava/util/Map;Ljava/util/Map;)I
|
|
|
|
move-result v1
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuild: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/lang/Integer;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v2
|
|
|
|
if-eq v2, v1, :cond_4
|
|
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuild:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v2, v4, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iput-boolean v3, p0, Lcom/discord/stores/StorePermissions;->isDirty:Z
|
|
|
|
:cond_4
|
|
invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Iterable;
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/discord/stores/StorePermissions;->computeChannelPermissions(JLjava/lang/Iterable;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map;
|
|
|
|
invoke-static {v1, v0}, Lkotlin/jvm/internal/k;->n(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
xor-int/2addr v1, v3
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v1, p1, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iput-boolean v3, p0, Lcom/discord/stores/StorePermissions;->isDirty:Z
|
|
|
|
:cond_5
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getForChannel(J)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StorePermissions;->getForChannels()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StorePermissions$getForChannel$1;
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StorePermissions$getForChannel$1;-><init>(J)V
|
|
|
|
check-cast v1, Lrx/functions/b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->e(Lrx/functions/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->Fo()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "forChannels\n .map\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getForChannels()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannelPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getForChannels(J)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StorePermissions;->getForChannelsByGuild()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StorePermissions$getForChannels$1;
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StorePermissions$getForChannels$1;-><init>(J)V
|
|
|
|
check-cast v1, Lrx/functions/b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->e(Lrx/functions/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->Fo()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "forChannelsByGuild\n \u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getForChannelsByGuild()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannelByGuildPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getForGuild(J)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuildPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StorePermissions$getForGuild$1;
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StorePermissions$getForGuild$1;-><init>(J)V
|
|
|
|
check-cast v1, Lrx/functions/b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->e(Lrx/functions/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->Fo()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "permissionsForGuildPubli\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getPermissionsForChannel$app_productionExternalRelease()Ljava/util/Map;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getPermissionsForGuild$app_productionExternalRelease()Ljava/util/Map;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuild:Ljava/util/Map;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handleChannelCreated(Lcom/discord/models/domain/ModelChannel;)V
|
|
.locals 5
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const-string v0, "channel"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StorePermissions;->getMeId()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getGuildId()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, 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
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
invoke-static {}, Lkotlin/a/ab;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_1
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
invoke-static {p1}, Lkotlin/a/l;->aV(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/Iterable;
|
|
|
|
invoke-direct {p0, v0, v1, p1}, Lcom/discord/stores/StorePermissions;->computeChannelPermissions(JLjava/lang/Iterable;)Ljava/util/Map;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v2, p1}, Lkotlin/a/ab;->a(Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v3, v0, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StorePermissions;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleChannelDeleted(Lcom/discord/models/domain/ModelChannel;)V
|
|
.locals 6
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const-string v0, "channel"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getGuildId()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, 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
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
invoke-static {}, Lkotlin/a/ab;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_0
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "$this$minus"
|
|
|
|
invoke-static {v2, v1}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v2}, Lkotlin/a/ab;->r(Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
invoke-static {v1}, Lkotlin/a/ab;->s(Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v3, v0, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StorePermissions;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleConnectionOpen()V
|
|
.locals 9
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuild:Ljava/util/Map;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->clear()V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->clear()V
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StorePermissions;->getMeId()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreChannels;->getChannels()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Iterable;
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
check-cast v1, Ljava/util/Collection;
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
const/4 v5, 0x1
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
move-object v6, v4
|
|
|
|
check-cast v6, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v6
|
|
|
|
cmp-long v8, v6, v2
|
|
|
|
if-eqz v8, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v5, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v5, :cond_1
|
|
|
|
invoke-interface {v1, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
check-cast v1, Ljava/util/List;
|
|
|
|
check-cast v1, Ljava/lang/Iterable;
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_2
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-direct {p0, v1, v2}, Lcom/discord/stores/StorePermissions;->updateGuildPermissions(J)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
iput-boolean v5, p0, Lcom/discord/stores/StorePermissions;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleGuildAdd(Lcom/discord/models/domain/ModelGuild;)V
|
|
.locals 2
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const-string v0, "guild"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StorePermissions;->updateGuildPermissions(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleGuildMemberAdd(Lcom/discord/models/domain/ModelGuildMember;)V
|
|
.locals 5
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const-string v0, "member"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StorePermissions;->getMeId()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StorePermissions;->getMeId()J
|
|
|
|
move-result-wide v2
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getGuildId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StorePermissions;->updateGuildPermissions(J)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleGuildRemove(Lcom/discord/models/domain/ModelGuild;)V
|
|
.locals 3
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const-string v0, "guild"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuild:Ljava/util/Map;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StorePermissions;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleGuildRoleAdd(Lcom/discord/models/domain/ModelGuildRole$Payload;)V
|
|
.locals 2
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const-string v0, "role"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StorePermissions;->updateGuildPermissions(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleGuildRoleRemove(Lcom/discord/models/domain/ModelGuildRole$Payload;)V
|
|
.locals 2
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const-string v0, "role"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StorePermissions;->updateGuildPermissions(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onDispatchEnded()V
|
|
.locals 8
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StorePermissions;->isDirty:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuildPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StorePermissions;->permissionsForGuild:Ljava/util/Map;
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
const/4 v2, 0x2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v0, v1, v4, v2, v3}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannel: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 v2
|
|
|
|
:goto_0
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/util/Map$Entry;
|
|
|
|
invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/util/Map;
|
|
|
|
move-object v7, v1
|
|
|
|
check-cast v7, Ljava/util/Map;
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v7, v5, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-object v5, v0
|
|
|
|
check-cast v5, Ljava/util/Map;
|
|
|
|
invoke-interface {v5, v3}, Ljava/util/Map;->putAll(Ljava/util/Map;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-object v2, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannelPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
invoke-virtual {v2, v0, v3}, Lcom/discord/utilities/persister/Persister;->set(Ljava/lang/Object;Z)Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StorePermissions;->permissionsForChannelByGuildPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0, v1, v3}, Lcom/discord/utilities/persister/Persister;->set(Ljava/lang/Object;Z)Ljava/lang/Object;
|
|
|
|
iput-boolean v4, p0, Lcom/discord/stores/StorePermissions;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|