203 lines
6.9 KiB
Smali
203 lines
6.9 KiB
Smali
|
.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
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
if-eqz p1, :cond_1
|
||
|
|
||
|
if-eqz p5, :cond_0
|
||
|
|
||
|
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
|
||
|
|
||
|
:cond_0
|
||
|
const-string p1, "analyticLocation"
|
||
|
|
||
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
|
||
|
:cond_1
|
||
|
const-string p1, "defaultGuildNameFormat"
|
||
|
|
||
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public create(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
||
|
.locals 9
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"<T:",
|
||
|
"Landroidx/lifecycle/ViewModel;",
|
||
|
">(",
|
||
|
"Ljava/lang/Class<",
|
||
|
"TT;>;)TT;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
if-eqz p1, :cond_3
|
||
|
|
||
|
new-instance p1, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel;
|
||
|
|
||
|
iget-object v1, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->defaultGuildNameFormat:Ljava/lang/String;
|
||
|
|
||
|
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
|
||
|
move-object v3, v0
|
||
|
|
||
|
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;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
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;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
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
|
||
|
|
||
|
const/4 v5, 0x1
|
||
|
|
||
|
invoke-virtual {v0, v5}, Lrx/Observable;->c(I)Lrx/Observable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget-object v5, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->guildTemplateCode:Ljava/lang/String;
|
||
|
|
||
|
if-nez v5, :cond_1
|
||
|
|
||
|
sget-object v5, Lcom/discord/stores/StoreGuildTemplates$GuildTemplateState$None;->INSTANCE:Lcom/discord/stores/StoreGuildTemplates$GuildTemplateState$None;
|
||
|
|
||
|
new-instance v6, Lg0/m/e/j;
|
||
|
|
||
|
invoke-direct {v6, v5}, Lg0/m/e/j;-><init>(Ljava/lang/Object;)V
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_1
|
||
|
sget-object v5, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
||
|
|
||
|
invoke-virtual {v5}, Lcom/discord/stores/StoreStream$Companion;->getGuildTemplates()Lcom/discord/stores/StoreGuildTemplates;
|
||
|
|
||
|
move-result-object v5
|
||
|
|
||
|
iget-object v6, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->guildTemplateCode:Ljava/lang/String;
|
||
|
|
||
|
invoke-virtual {v5, v6}, Lcom/discord/stores/StoreGuildTemplates;->observeGuildTemplate(Ljava/lang/String;)Lrx/Observable;
|
||
|
|
||
|
move-result-object v6
|
||
|
|
||
|
:goto_1
|
||
|
sget-object v5, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory$create$1;->INSTANCE:Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory$create$1;
|
||
|
|
||
|
if-eqz v5, :cond_2
|
||
|
|
||
|
new-instance v7, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$sam$rx_functions_Func2$0;
|
||
|
|
||
|
invoke-direct {v7, v5}, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$sam$rx_functions_Func2$0;-><init>(Lkotlin/jvm/functions/Function2;)V
|
||
|
|
||
|
move-object v5, v7
|
||
|
|
||
|
:cond_2
|
||
|
check-cast v5, Lrx/functions/Func2;
|
||
|
|
||
|
invoke-static {v0, v6, v5}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
|
||
|
|
||
|
move-result-object v5
|
||
|
|
||
|
const-string v0, "Observable.combineLatest\u2026 ::StoreState\n )"
|
||
|
|
||
|
invoke-static {v5, v0}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
iget-boolean v6, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->showChannelPrompt:Z
|
||
|
|
||
|
iget-object v7, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->analyticLocation:Ljava/lang/String;
|
||
|
|
||
|
iget-object v8, p0, Lcom/discord/widgets/guilds/create/WidgetGuildCreateViewModel$Factory;->customTitle:Ljava/lang/String;
|
||
|
|
||
|
move-object v0, p1
|
||
|
|
||
|
invoke-direct/range {v0 .. v8}, 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
|
||
|
|
||
|
return-object p1
|
||
|
|
||
|
:cond_3
|
||
|
const-string p1, "modelClass"
|
||
|
|
||
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
||
|
|
||
|
const/4 p1, 0x0
|
||
|
|
||
|
throw p1
|
||
|
.end method
|