2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "WidgetGuildCreateViewModel.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Landroidx/lifecycle/ViewModelProvider$Factory;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = "Factory"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final analyticLocation:Ljava/lang/String;
|
|
|
|
|
|
|
|
.field public final customTitle:Ljava/lang/String;
|
|
|
|
|
|
|
|
.field public final defaultGuildNameFormat:Ljava/lang/String;
|
|
|
|
|
|
|
|
.field public final guildTemplateCode:Ljava/lang/String;
|
|
|
|
|
|
|
|
.field public final showChannelPrompt:Z
|
|
|
|
|
|
|
|
.field public final stockGuildTemplate:Lcom/discord/widgets/guilds/create/StockGuildTemplate;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Ljava/lang/String;Lcom/discord/widgets/guilds/create/StockGuildTemplate;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;)V
|
|
|
|
.locals 1
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "defaultGuildNameFormat"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "analyticLocation"
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-static {p5, v0}, Lc0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->defaultGuildNameFormat:Ljava/lang/String;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->stockGuildTemplate:Lcom/discord/widgets/guilds/create/StockGuildTemplate;
|
|
|
|
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->guildTemplateCode:Ljava/lang/String;
|
|
|
|
|
|
|
|
iput-boolean p4, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->showChannelPrompt:Z
|
|
|
|
|
|
|
|
iput-object p5, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->analyticLocation:Ljava/lang/String;
|
|
|
|
|
|
|
|
iput-object p6, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->customTitle:Ljava/lang/String;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public create(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 10
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<T:",
|
|
|
|
"Landroidx/lifecycle/ViewModel;",
|
|
|
|
">(",
|
|
|
|
"Ljava/lang/Class<",
|
|
|
|
"TT;>;)TT;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "modelClass"
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->defaultGuildNameFormat:Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->stockGuildTemplate:Lcom/discord/widgets/guilds/create/StockGuildTemplate;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget-object v0, Lcom/discord/widgets/guilds/create/StockGuildTemplate;->CREATE:Lcom/discord/widgets/guilds/create/StockGuildTemplate;
|
|
|
|
|
|
|
|
:goto_0
|
2020-09-16 23:45:23 +00:00
|
|
|
move-object v4, v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result-object v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getGuildSelected()Lcom/discord/stores/StoreGuildSelected;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result-object v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUsers()Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUser;->observeMe()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const/4 v1, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->V(I)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->guildTemplateCode:Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-nez v1, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
sget-object v1, Lcom/discord/stores/StoreGuildTemplates$GuildTemplateState$None;->INSTANCE:Lcom/discord/stores/StoreGuildTemplates$GuildTemplateState$None;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
new-instance v6, Ll0/l/e/j;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-direct {v6, v1}, Ll0/l/e/j;-><init>(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
2020-09-16 23:45:23 +00:00
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getGuildTemplates()Lcom/discord/stores/StoreGuildTemplates;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v6, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->guildTemplateCode:Ljava/lang/String;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-virtual {v1, v6}, Lcom/discord/stores/StoreGuildTemplates;->observeGuildTemplate(Ljava/lang/String;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
:goto_1
|
2020-09-16 23:45:23 +00:00
|
|
|
sget-object v1, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory$create$1;->INSTANCE:Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory$create$1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-eqz v1, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v7, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$sam$rx_functions_Func2$0;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-direct {v7, v1}, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$sam$rx_functions_Func2$0;-><init>(Lkotlin/jvm/functions/Function2;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-object v1, v7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_2
|
2020-09-16 23:45:23 +00:00
|
|
|
check-cast v1, Lrx/functions/Func2;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {v0, v6, v1}, Lrx/Observable;->j(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result-object v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "Observable.combineLatest\u2026 ::StoreState\n )"
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
invoke-static {v6, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
iget-boolean v7, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->showChannelPrompt:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
iget-object v8, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->analyticLocation:Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
iget-object v9, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->customTitle:Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-object v1, p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-direct/range {v1 .. v9}, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel;-><init>(Ljava/lang/String;Lcom/discord/utilities/rest/RestAPI;Lcom/discord/widgets/guilds/create/StockGuildTemplate;Lcom/discord/stores/StoreGuildSelected;Lrx/Observable;ZLjava/lang/String;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|