2019-07-24 11:27:29 +00:00
|
|
|
.class public final Lcom/discord/utilities/persister/PersisterConfig;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "PersisterConfig.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final INSTANCE:Lcom/discord/utilities/persister/PersisterConfig;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static constructor <clinit>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/utilities/persister/PersisterConfig;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lcom/discord/utilities/persister/PersisterConfig;-><init>()V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/utilities/persister/PersisterConfig;->INSTANCE:Lcom/discord/utilities/persister/PersisterConfig;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public constructor <init>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getPersistenceStrategy()Lrx/Observable;
|
|
|
|
.locals 4
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/utilities/persister/PersisterConfig;->isNotActive()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget-object v1, Ljava/util/concurrent/TimeUnit;->MINUTES:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v2, v3, v1}, Lrx/Observable;->i(JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/utilities/persister/PersisterConfig$persistenceStrategy$1;->INSTANCE:Lcom/discord/utilities/persister/PersisterConfig$persistenceStrategy$1;
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-virtual {v1, v2}, Lrx/Observable;->f(Lb0/l/i;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Lrx/Observable;->b(Lrx/Observable;Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "Observable\n .merg\u2026 .map { true }\n )"
|
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-static {v0, v1}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final isNotActive()Lrx/Observable;
|
|
|
|
.locals 3
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/miguelgaeta/backgrounded/Backgrounded;->get()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->b(I)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v1, Le/a/b/i;->c:Le/a/b/i;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {v1}, Le/a/b/i;->a()Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/utilities/persister/PersisterConfig$isNotActive$1;->INSTANCE:Lcom/discord/utilities/persister/PersisterConfig$isNotActive$1;
|
|
|
|
|
|
|
|
invoke-static {v0, v1, v2}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2020-01-10 03:40:06 +00:00
|
|
|
.method public final init(Landroid/content/Context;Lcom/discord/utilities/time/Clock;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-10 03:40:06 +00:00
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/persister/Persister;->Companion:Lcom/discord/utilities/persister/Persister$Companion;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/utilities/persister/PersisterConfig$init$1;->INSTANCE:Lcom/discord/utilities/persister/PersisterConfig$init$1;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/persister/Persister$Companion;->setKryoConfig(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/persister/Persister;->Companion:Lcom/discord/utilities/persister/Persister$Companion;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v1, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const-string v2, "[Persister]"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {v1, v2}, Lcom/discord/app/AppLog;->a(Ljava/lang/String;)Lkotlin/jvm/functions/Function3;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/persister/Persister$Companion;->setLogger(Lkotlin/jvm/functions/Function3;)V
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/persister/Persister;->Companion:Lcom/discord/utilities/persister/Persister$Companion;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/utilities/persister/PersisterConfig;->getPersistenceStrategy()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-01-10 03:40:06 +00:00
|
|
|
invoke-virtual {v0, p1, p2, v1}, Lcom/discord/utilities/persister/Persister$Companion;->init(Landroid/content/Context;Lcom/discord/utilities/time/Clock;Lrx/Observable;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_0
|
2020-01-10 03:40:06 +00:00
|
|
|
const-string p1, "clock"
|
2019-12-06 03:29:40 +00:00
|
|
|
|
2019-12-21 01:41:59 +00:00
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
2020-01-10 03:40:06 +00:00
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "context"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
2020-01-10 03:40:06 +00:00
|
|
|
throw v0
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|