2019-07-24 11:27:29 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreExpandedGuildFolders;
|
|
|
|
.super Lcom/discord/stores/Store;
|
|
|
|
.source "StoreExpandedGuildFolders.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-11-20 22:09:14 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public isDirty:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final openFolderIds:Ljava/util/HashSet;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashSet<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final openFoldersPersister: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/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-11-20 22:09:14 +00:00
|
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 2
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance p1, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->openFolderIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
|
|
|
|
|
|
|
|
const-string v1, "CACHE_KEY_OPEN_FOLDERS"
|
|
|
|
|
|
|
|
invoke-direct {p1, v1, v0}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->openFoldersPersister:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "dispatcher"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final closeFolder(J)V
|
|
|
|
.locals 2
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreExpandedGuildFolders$closeFolder$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreExpandedGuildFolders$closeFolder$1;-><init>(Lcom/discord/stores/StoreExpandedGuildFolders;J)V
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final get()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->openFoldersPersister:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleFolderClosed(J)V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->openFolderIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Collection;->remove(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleFolderOpened(J)V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->openFolderIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public init(Landroid/content/Context;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->openFolderIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->openFoldersPersister:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Ljava/util/HashSet;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "context"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public onDispatchEnded()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 5
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->isDirty:Z
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->openFoldersPersister:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->openFolderIds:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)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;
|
|
|
|
|
|
|
|
iput-boolean v4, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->isDirty:Z
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final openFolder(J)V
|
|
|
|
.locals 2
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExpandedGuildFolders;->dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreExpandedGuildFolders$openFolder$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreExpandedGuildFolders$openFolder$1;-><init>(Lcom/discord/stores/StoreExpandedGuildFolders;J)V
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|