670 lines
20 KiB
Smali
670 lines
20 KiB
Smali
.class public final Lcom/discord/stores/StoreGuildSelected;
|
|
.super Lcom/discord/stores/Store;
|
|
.source "StoreGuildSelected.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/stores/StoreGuildSelected$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/stores/StoreGuildSelected$Companion;
|
|
|
|
.field public static final MAX_SAVED_GUILD_IDS:I = 0x5
|
|
|
|
.field public static final UNSELECTED:J
|
|
|
|
|
|
# instance fields
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public final id:Lrx/Observable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final mostRecent:Lrx/Observable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public selectedGuildId:J
|
|
|
|
.field public final selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/collections/LeastRecentlyAddedSet<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final selectedGuildIdsCache:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Lcom/discord/utilities/collections/LeastRecentlyAddedSet<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public selectedGuildIdsDirty:Z
|
|
|
|
.field public final selectedGuildIdsSubject:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final stream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreGuildSelected$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreGuildSelected$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreGuildSelected;->Companion:Lcom/discord/stores/StoreGuildSelected$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStream;Lcom/discord/stores/Dispatcher;)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGuildSelected;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreGuildSelected;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance p1, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
const/4 p2, 0x5
|
|
|
|
const/4 v1, 0x2
|
|
|
|
invoke-direct {p1, p2, v0, v1, v0}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;-><init>(ILjava/util/LinkedHashSet;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
iget-object p2, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
const-string v0, "STORE_GUILD_SELECTED_V5"
|
|
|
|
invoke-direct {p1, v0, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-static {}, Lrx/subjects/BehaviorSubject;->e0()Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
const-string p2, "selectedGuildIdsSubject"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "selectedGuildIdsSubject\n\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGuildSelected;->mostRecent:Lrx/Observable;
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreGuildSelected$id$1;->INSTANCE:Lcom/discord/stores/StoreGuildSelected$id$1;
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->C(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "mostRecent\n .map { it.first() }"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "mostRecent\n .map { \u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGuildSelected;->id:Lrx/Observable;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "dispatcher"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "stream"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getSelectedGuildIds$p(Lcom/discord/stores/StoreGuildSelected;)Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getSelectedGuildIdsDirty$p(Lcom/discord/stores/StoreGuildSelected;)Z
|
|
.locals 0
|
|
|
|
iget-boolean p0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsDirty:Z
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getStream$p(Lcom/discord/stores/StoreGuildSelected;)Lcom/discord/stores/StoreStream;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreGuildSelected;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$setSelectedGuildIdsDirty$p(Lcom/discord/stores/StoreGuildSelected;Z)V
|
|
.locals 0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic set$default(Lcom/discord/stores/StoreGuildSelected;JLrx/functions/Action0;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p4, p4, 0x2
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/stores/StoreGuildSelected;->set(JLrx/functions/Action0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final dispatchSampleGuildIdSelected(J)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreGuildSelected$dispatchSampleGuildIdSelected$1;
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreGuildSelected$dispatchSampleGuildIdSelected$1;-><init>(Lcom/discord/stores/StoreGuildSelected;J)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final get()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->id:Lrx/Observable;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreGuildSelected$get$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreGuildSelected$get$1;-><init>(Lcom/discord/stores/StoreGuildSelected;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->S(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "id\n .switchMap { se\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getId()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->id:Lrx/Observable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getMostRecent()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->mostRecent:Lrx/Observable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSelectedGuildId()J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildId:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
.locals 3
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
new-instance v2, Lcom/discord/stores/StoreGuildSelected$handleConnectionOpen$1;
|
|
|
|
invoke-direct {v2, p1}, Lcom/discord/stores/StoreGuildSelected$handleConnectionOpen$1;-><init>(Lcom/discord/models/domain/ModelPayload;)V
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
invoke-static {v1, v2, p1}, Lf/i/a/b/i1/e;->e0(Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;Z)Z
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsDirty:Z
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "$this$removeAll"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "payload"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final handleGuildRemove(Lcom/discord/models/domain/ModelGuild;)V
|
|
.locals 3
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
invoke-virtual {p1}, 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 p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->remove(Ljava/lang/Object;)Z
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsDirty:Z
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "guild"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final handlePreLogout()V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->clear()V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleSamplePremiumGuildSelected(J)V
|
|
.locals 6
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-wide v1, p1
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreGuildSelected;->set$default(Lcom/discord/stores/StoreGuildSelected;JLrx/functions/Action0;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public init(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/stores/Store;->init(Landroid/content/Context;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->clear()V
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsCache: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}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->addAll(Ljava/util/Collection;)Z
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsDirty:Z
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onDispatchEnded()V
|
|
.locals 9
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsDirty:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
invoke-static {v0}, Lj0/i/l;->last(Ljava/lang/Iterable;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
iput-wide v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildId:J
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getAnalytics()Lcom/discord/stores/StoreAnalytics;
|
|
|
|
move-result-object v0
|
|
|
|
iget-wide v1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildId:J
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/stores/StoreAnalytics;->trackGuildViewed(J)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getLurking$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreLurking;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreLurking;->getLurkingGuildIds$app_productionDiscordExternalRelease()Ljava/util/ArrayList;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-direct {v1, v3, v4, v2, v4}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;-><init>(ILjava/util/LinkedHashSet;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
new-instance v4, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_2
|
|
:goto_0
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
const/4 v6, 0x1
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
move-object v7, v5
|
|
|
|
check-cast v7, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v7}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v7
|
|
|
|
invoke-static {v7, v8}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v0, v7}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v7
|
|
|
|
xor-int/2addr v6, v7
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
invoke-virtual {v1, v4}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->addAll(Ljava/util/Collection;)Z
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0, v1, v6}, Lcom/discord/utilities/persister/Persister;->set(Ljava/lang/Object;Z)Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIds:Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
|
|
invoke-static {v1}, Lj0/i/l;->reversed(Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
iput-boolean v3, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildIdsDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final set(J)V
|
|
.locals 6
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-wide v1, p1
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreGuildSelected;->set$default(Lcom/discord/stores/StoreGuildSelected;JLrx/functions/Action0;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final set(JLrx/functions/Action0;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGuildSelected;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreGuildSelected$set$1;
|
|
|
|
invoke-direct {v1, p0, p1, p2, p3}, Lcom/discord/stores/StoreGuildSelected$set$1;-><init>(Lcom/discord/stores/StoreGuildSelected;JLrx/functions/Action0;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setSelectedGuildId(J)V
|
|
.locals 0
|
|
|
|
iput-wide p1, p0, Lcom/discord/stores/StoreGuildSelected;->selectedGuildId:J
|
|
|
|
return-void
|
|
.end method
|