2019-07-31 00:08:31 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreApplication;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "StoreApplication.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/stores/StoreApplication$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final Companion:Lcom/discord/stores/StoreApplication$Companion;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public static final LOADING_SENTINEL:Lcom/discord/models/domain/ModelApplication;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final applicationSubject:Lrx/subjects/BehaviorSubject;
|
2019-07-31 00:08:31 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelApplication;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final applications:Ljava/util/HashMap;
|
2019-07-31 00:08:31 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelApplication;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public isDirty:Z
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static constructor <clinit>()V
|
2019-10-17 03:51:45 +00:00
|
|
|
.locals 12
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreApplication$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreApplication$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreApplication;->Companion:Lcom/discord/stores/StoreApplication$Companion;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/models/domain/ModelApplication;
|
|
|
|
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
|
|
|
const-string v5, ""
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
2019-10-01 19:53:14 +00:00
|
|
|
const/4 v9, 0x0
|
|
|
|
|
2019-10-17 03:51:45 +00:00
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
const/4 v11, 0x0
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
move-object v2, v0
|
|
|
|
|
2019-10-17 03:51:45 +00:00
|
|
|
invoke-direct/range {v2 .. v11}, Lcom/discord/models/domain/ModelApplication;-><init>(JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreApplication;->LOADING_SENTINEL:Lcom/discord/models/domain/ModelApplication;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplication;->dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplication;->applications:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreApplication;->applications:Ljava/util/HashMap;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreApplication;->applicationSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
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-31 00:08:31 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$clearSentinel(Lcom/discord/stores/StoreApplication;J)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreApplication;->clearSentinel(J)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getApplications$p(Lcom/discord/stores/StoreApplication;)Ljava/util/HashMap;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreApplication;->applications:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreApplication;)Lcom/discord/stores/Dispatcher;
|
|
|
|
.locals 0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreApplication;->dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
return-object p0
|
2019-07-31 00:08:31 +00:00
|
|
|
.end method
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
.method public static final synthetic access$getLOADING_SENTINEL$cp()Lcom/discord/models/domain/ModelApplication;
|
|
|
|
.locals 1
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
sget-object v0, Lcom/discord/stores/StoreApplication;->LOADING_SENTINEL:Lcom/discord/models/domain/ModelApplication;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
return-object v0
|
2019-07-31 00:08:31 +00:00
|
|
|
.end method
|
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
.method public static final synthetic access$handleFetchResult(Lcom/discord/stores/StoreApplication;JLcom/discord/models/domain/ModelApplication;)V
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 0
|
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreApplication;->handleFetchResult(JLcom/discord/models/domain/ModelApplication;)V
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$isDirty$p(Lcom/discord/stores/StoreApplication;)Z
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-boolean p0, p0, Lcom/discord/stores/StoreApplication;->isDirty:Z
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$setDirty$p(Lcom/discord/stores/StoreApplication;Z)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreApplication;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final clearSentinel(J)V
|
2019-08-01 23:08:43 +00:00
|
|
|
.locals 3
|
2019-07-31 00:08:31 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplication;->applications:Ljava/util/HashMap;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
move-result-object v1
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
move-result-object v0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelApplication;
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
sget-object v2, Lcom/discord/stores/StoreApplication;->LOADING_SENTINEL:Lcom/discord/models/domain/ModelApplication;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {v0, v2}, Lw/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
move-result v2
|
|
|
|
|
|
|
|
xor-int/2addr v2, v1
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreApplication;->applications:Ljava/util/HashMap;
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
invoke-interface {v1, p1, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
:cond_0
|
|
|
|
iput-boolean v1, p0, Lcom/discord/stores/StoreApplication;->isDirty:Z
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_0
|
2019-07-31 00:08:31 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final fetchIfNonexisting(J)V
|
|
|
|
.locals 2
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplication;->dispatcher:Lcom/discord/stores/Dispatcher;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreApplication$fetchIfNonexisting$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreApplication$fetchIfNonexisting$1;-><init>(Lcom/discord/stores/StoreApplication;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-31 00:08:31 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
.method private final handleFetchResult(JLcom/discord/models/domain/ModelApplication;)V
|
|
|
|
.locals 1
|
2019-07-31 00:08:31 +00:00
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
if-nez p3, :cond_0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreApplication;->clearSentinel(J)V
|
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
goto :goto_0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplication;->applications:Ljava/util/HashMap;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
invoke-interface {v0, p1, p3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-08-01 23:08:43 +00:00
|
|
|
:goto_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreApplication;->isDirty:Z
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final get(Ljava/lang/Long;)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
")",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/models/domain/ModelApplication;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
new-instance v0, Le0/m/e/j;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-direct {v0, p1}, Le0/m/e/j;-><init>(Ljava/lang/Object;)V
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const-string p1, "Observable.just(null)"
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {v0, p1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
return-object v0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StoreApplication;->fetchIfNonexisting(J)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplication;->applicationSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreApplication$get$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/stores/StoreApplication$get$1;-><init>(Ljava/lang/Long;)V
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(Le0/l/i;)Lrx/Observable;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "applicationSubject\n \u2026 .distinctUntilChanged()"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1, v0}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public onDispatchEnded()V
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreApplication;->isDirty:Z
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreApplication;->applicationSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreApplication;->applications:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreApplication;->isDirty:Z
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|