2019-07-24 11:27:29 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreChannelCategories;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "StoreChannelCategories.kt"
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
# instance fields
|
2020-01-31 00:34:35 +00:00
|
|
|
.field public final channelStore:Lcom/discord/stores/StoreChannels;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final collapsedCategories:Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/HashSet<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final collapsedCategoriesCache:Lcom/discord/utilities/persister/Persister;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/util/HashSet<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
.field public isDirty:Z
|
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
# direct methods
|
2020-02-12 20:59:48 +00:00
|
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/stores/StoreChannels;)V
|
2020-01-28 00:59:01 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
2020-02-12 20:59:48 +00:00
|
|
|
if-eqz p1, :cond_1
|
2020-01-31 00:34:35 +00:00
|
|
|
|
2020-02-12 20:59:48 +00:00
|
|
|
if-eqz p2, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreChannelCategories;->dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-02-12 20:59:48 +00:00
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreChannelCategories;->channelStore:Lcom/discord/stores/StoreChannels;
|
2020-01-31 00:34:35 +00:00
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
2020-01-28 00:59:01 +00:00
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-02-12 20:59:48 +00:00
|
|
|
const-string v0, "STORE_COLLAPSED_CATEGORIES_V1"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-02-12 20:59:48 +00:00
|
|
|
invoke-direct {p1, v0, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategoriesCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_0
|
2020-01-31 00:34:35 +00:00
|
|
|
const-string p1, "channelStore"
|
2020-01-28 00:59:01 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2020-01-28 00:59:01 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
2020-01-31 00:34:35 +00:00
|
|
|
const-string p1, "dispatcher"
|
2020-01-28 00:59:01 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2020-01-28 00:59:01 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
throw v0
|
|
|
|
.end method
|
2020-01-28 00:59:01 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
.method public static final synthetic access$setCollapsedCategoryInternal(Lcom/discord/stores/StoreChannelCategories;JJZ)V
|
|
|
|
.locals 0
|
2020-01-28 00:59:01 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-direct/range {p0 .. p5}, Lcom/discord/stores/StoreChannelCategories;->setCollapsedCategoryInternal(JJZ)V
|
2020-01-28 00:59:01 +00:00
|
|
|
|
|
|
|
return-void
|
2020-01-31 00:34:35 +00:00
|
|
|
.end method
|
2020-01-28 00:59:01 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
.method private final setCollapsedCategoryInternal(JJZ)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result-object v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
if-nez v2, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
new-instance v2, Ljava/util/HashSet;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-direct {v2}, Ljava/util/HashSet;-><init>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
:cond_0
|
|
|
|
check-cast v2, Ljava/util/HashSet;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
if-eqz p5, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v2, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
:cond_1
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result-object p3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v2, p3}, Ljava/util/Collection;->remove(Ljava/lang/Object;)Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-virtual {v2}, Ljava/util/HashSet;->isEmpty()Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result p3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
if-eqz p3, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {p3, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
:cond_2
|
|
|
|
:goto_0
|
|
|
|
const/4 p1, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreChannelCategories;->isDirty:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getChannelCategories(J)Lrx/Observable;
|
|
|
|
.locals 7
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x2
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
move-wide v2, p1
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/stores/StoreChannels;->getForGuild$default(Lcom/discord/stores/StoreChannels;JLjava/lang/Integer;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreChannelCategories$getChannelCategories$1;->INSTANCE:Lcom/discord/stores/StoreChannelCategories$getChannelCategories$1;
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->f(Lg0/l/i;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-08-14 23:59:34 +00:00
|
|
|
const-string p2, "StoreStream\n .g\u2026ilter { it.isCategory } }"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1, p2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-08-14 23:59:34 +00:00
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-08-14 23:59:34 +00:00
|
|
|
const-string p2, "StoreStream\n .g\u2026 .distinctUntilChanged()"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1, p2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getChannelsForCategory$app_productionDiscordExternalRelease(JJ)Ljava/util/List;
|
|
|
|
.locals 4
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(JJ)",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelCategories;->channelStore:Lcom/discord/stores/StoreChannels;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-08-14 23:59:34 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreChannels;->getChannels$app_productionDiscordExternalRelease()Ljava/util/Map;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance p2, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v0, :cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelChannel;->getParentId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
cmp-long v3, v1, p3
|
|
|
|
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p2, v0}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 p2, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_3
|
2019-12-06 03:29:40 +00:00
|
|
|
return-object p2
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getCollapsedCategories(J)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategoriesCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreChannelCategories$getCollapsedCategories$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StoreChannelCategories$getCollapsedCategories$1;-><init>(J)V
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(Lg0/l/i;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
const-string p2, "collapsedCategoriesCache\u2026[guildId] ?: emptySet() }"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1, p2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-08-14 23:59:34 +00:00
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
const-string p2, "collapsedCategoriesCache\u2026 .distinctUntilChanged()"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1, p2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 7
|
2020-01-31 00:34:35 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_6
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/HashMap;->keySet()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getGuilds()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v1, "payload.guilds"
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
const-string v3, "guild"
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {v1, v3}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {v2, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v2
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v2, Ljava/util/HashSet;
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
if-eqz v2, :cond_0
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
new-instance v3, Ljava/util/HashSet;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-direct {v3, v2}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuild;->getChannels()Ljava/util/List;
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const-string v4, "guild.channels"
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {v2, v4}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:goto_1
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
const-string v5, "channel"
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {v4, v5}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {v4}, 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
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {v3, v4}, Ljava/util/HashSet;->remove(Ljava/lang/Object;)Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_2
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Ljava/lang/Long;
|
|
|
|
|
|
|
|
iget-object v4, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v5
|
|
|
|
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v4, v3}, Ljava/util/HashSet;->remove(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashSet;->remove(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto/16 :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/lang/Long;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_5
|
2020-01-31 00:34:35 +00:00
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreChannelCategories;->isDirty:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_6
|
2020-01-31 00:34:35 +00:00
|
|
|
const-string p1, "payload"
|
2019-12-06 03:29:40 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
const/4 p1, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final init()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategoriesCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->putAll(Ljava/util/Map;)V
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreChannelCategories;->isDirty:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
.method public onDispatchEnded()V
|
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreChannelCategories;->isDirty:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
if-nez v0, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
return-void
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
:cond_0
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-virtual {v1}, Ljava/util/HashMap;->size()I
|
|
|
|
|
|
|
|
move-result v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(I)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategories:Ljava/util/HashMap;
|
2019-12-06 03:29:40 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result-object v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_0
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
if-eqz v2, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result-object v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
check-cast v2, Ljava/util/Map$Entry;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result-object v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
move-result-object v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
check-cast v2, Ljava/util/HashSet;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
new-instance v4, Ljava/util/HashSet;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-direct {v4, v2}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-interface {v0, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
:cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreChannelCategories;->collapsedCategoriesCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
invoke-static {v1, v0, v4, v2, v3}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
iput-boolean v4, p0, Lcom/discord/stores/StoreChannelCategories;->isDirty:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
2020-01-31 00:34:35 +00:00
|
|
|
.end method
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
.method public final setCollapsedCategory(JJZ)V
|
|
|
|
.locals 9
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelCategories;->dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-31 00:34:35 +00:00
|
|
|
new-instance v8, Lcom/discord/stores/StoreChannelCategories$setCollapsedCategory$1;
|
|
|
|
|
|
|
|
move-object v1, v8
|
|
|
|
|
|
|
|
move-object v2, p0
|
|
|
|
|
|
|
|
move-wide v3, p1
|
|
|
|
|
|
|
|
move-wide v5, p3
|
|
|
|
|
|
|
|
move v7, p5
|
|
|
|
|
|
|
|
invoke-direct/range {v1 .. v7}, Lcom/discord/stores/StoreChannelCategories$setCollapsedCategory$1;-><init>(Lcom/discord/stores/StoreChannelCategories;JJZ)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v8}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|