304 lines
8.4 KiB
Smali
304 lines
8.4 KiB
Smali
.class public final LWidgetRemoteAuthViewModel;
|
|
.super Le/a/b/c0;
|
|
.source "WidgetRemoteAuthViewModel.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
LWidgetRemoteAuthViewModel$ViewState;,
|
|
LWidgetRemoteAuthViewModel$c;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Le/a/b/c0<",
|
|
"LWidgetRemoteAuthViewModel$ViewState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final e:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/lang/String;Lcom/discord/utilities/rest/RestAPI;)V
|
|
.locals 10
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
sget-object v1, LWidgetRemoteAuthViewModel$ViewState$c;->a:LWidgetRemoteAuthViewModel$ViewState$c;
|
|
|
|
invoke-direct {p0, v1}, Le/a/b/c0;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object p2, p0, LWidgetRemoteAuthViewModel;->e:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, LWidgetRemoteAuthViewModel;->d:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-static {p1}, Ly/a0/p;->isBlank(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
sget-object p1, LWidgetRemoteAuthViewModel$ViewState$a;->a:LWidgetRemoteAuthViewModel$ViewState$a;
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object p2, p0, LWidgetRemoteAuthViewModel;->e:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
new-instance v1, Lcom/discord/restapi/RestAPIParams$RemoteAuthInitialize;
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/restapi/RestAPIParams$RemoteAuthInitialize;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p2, v1}, Lcom/discord/utilities/rest/RestAPI;->postRemoteAuthInitialize(Lcom/discord/restapi/RestAPIParams$RemoteAuthInitialize;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn(Lrx/Observable;Z)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x2
|
|
|
|
invoke-static {p1, p0, v0, p2, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-class v2, LWidgetRemoteAuthViewModel;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
new-instance v7, LWidgetRemoteAuthViewModel$a;
|
|
|
|
invoke-direct {v7, p0}, LWidgetRemoteAuthViewModel$a;-><init>(LWidgetRemoteAuthViewModel;)V
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v5, LWidgetRemoteAuthViewModel$b;
|
|
|
|
invoke-direct {v5, p0}, LWidgetRemoteAuthViewModel$b;-><init>(LWidgetRemoteAuthViewModel;)V
|
|
|
|
const/16 v8, 0x16
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "restAPI"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "fingerprint"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a()V
|
|
.locals 13
|
|
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v0, v0, LWidgetRemoteAuthViewModel$ViewState$b;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, LWidgetRemoteAuthViewModel;->e:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
new-instance v1, Lcom/discord/restapi/RestAPIParams$RemoteAuthCancel;
|
|
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
check-cast v2, LWidgetRemoteAuthViewModel$ViewState$b;
|
|
|
|
iget-object v2, v2, LWidgetRemoteAuthViewModel$ViewState$b;->a:Ljava/lang/String;
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/restapi/RestAPIParams$RemoteAuthCancel;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/rest/RestAPI;->postRemoteAuthCancel(Lcom/discord/restapi/RestAPIParams$RemoteAuthCancel;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const-class v5, LWidgetRemoteAuthViewModel;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
sget-object v10, LWidgetRemoteAuthViewModel$d;->d:LWidgetRemoteAuthViewModel$d;
|
|
|
|
const/16 v11, 0x1e
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static/range {v4 .. v12}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v0, Ly/l;
|
|
|
|
const-string v1, "null cannot be cast to non-null type WidgetRemoteAuthViewModel.ViewState.Loaded"
|
|
|
|
invoke-direct {v0, v1}, Ly/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final a(Z)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, LWidgetRemoteAuthViewModel;->d:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final b()V
|
|
.locals 13
|
|
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v0, v0, LWidgetRemoteAuthViewModel$ViewState$b;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, LWidgetRemoteAuthViewModel;->e:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
new-instance v1, Lcom/discord/restapi/RestAPIParams$RemoteAuthFinish;
|
|
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
check-cast v2, LWidgetRemoteAuthViewModel$ViewState$b;
|
|
|
|
iget-object v2, v2, LWidgetRemoteAuthViewModel$ViewState$b;->a:Ljava/lang/String;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {v1, v3, v2}, Lcom/discord/restapi/RestAPIParams$RemoteAuthFinish;-><init>(ZLjava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/rest/RestAPI;->postRemoteAuthFinish(Lcom/discord/restapi/RestAPIParams$RemoteAuthFinish;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn(Lrx/Observable;Z)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const-class v5, LWidgetRemoteAuthViewModel;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
new-instance v10, LWidgetRemoteAuthViewModel$e;
|
|
|
|
invoke-direct {v10, p0}, LWidgetRemoteAuthViewModel$e;-><init>(LWidgetRemoteAuthViewModel;)V
|
|
|
|
const/4 v9, 0x0
|
|
|
|
new-instance v8, LWidgetRemoteAuthViewModel$f;
|
|
|
|
invoke-direct {v8, p0}, LWidgetRemoteAuthViewModel$f;-><init>(LWidgetRemoteAuthViewModel;)V
|
|
|
|
const/16 v11, 0x16
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static/range {v4 .. v12}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v0, Ly/l;
|
|
|
|
const-string v1, "null cannot be cast to non-null type WidgetRemoteAuthViewModel.ViewState.Loaded"
|
|
|
|
invoke-direct {v0, v1}, Ly/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|