341 lines
14 KiB
Smali
341 lines
14 KiB
Smali
.class final Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetSettingsAccount.kt"
|
|
|
|
# interfaces
|
|
.implements Landroid/view/View$OnClickListener;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->configureUI(Lcom/discord/models/domain/ModelUser;)V
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x18
|
|
name = null
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final synthetic $user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
.field final synthetic this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;Lcom/discord/models/domain/ModelUser;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->$user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final onClick(Landroid/view/View;)V
|
|
.locals 10
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getState$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f0a050b
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/utilities/stateful/StatefulViews;->hasChanged(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getAccountPassword$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Landroid/widget/EditText;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/CharSequence;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p1, 0x1
|
|
|
|
:goto_1
|
|
if-eqz p1, :cond_2
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getAccountPasswordWrap$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
const v1, 0x7f120b1b
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/CharSequence;
|
|
|
|
invoke-virtual {p1, v0}, Lcom/google/android/material/textfield/TextInputLayout;->setError(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getAccountPasswordWrap$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/google/android/material/textfield/TextInputLayout;->requestFocus()Z
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
iget-object p1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getAccountPasswordWrap$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Lcom/google/android/material/textfield/TextInputLayout;->setError(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getState$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {v1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getAccountAvatar$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Landroid/widget/ImageView;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/widget/ImageView;->getId()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p1, v1}, Lcom/discord/utilities/stateful/StatefulViews;->hasChanged(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
sget-object p1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApiSerializeNulls()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
sget-object p1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_2
|
|
new-instance v9, Lcom/discord/restapi/RestAPIParams$UserInfo;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {v1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getState$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {v2}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getAccountAvatar$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Landroid/widget/ImageView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Landroid/widget/ImageView;->getId()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v1, v2, v0}, Lcom/discord/utilities/stateful/StatefulViews;->get(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v2, v0
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getState$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {v1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getAccountEmail$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Landroid/widget/EditText;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/widget/EditText;->getId()I
|
|
|
|
move-result v1
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->$user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getEmail()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v1, v3}, Lcom/discord/utilities/stateful/StatefulViews;->get(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v3, v0
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getAccountPassword$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Landroid/widget/EditText;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getState$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {v1}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getAccountUsername$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Landroid/widget/EditText;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/widget/EditText;->getId()I
|
|
|
|
move-result v1
|
|
|
|
iget-object v6, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->$user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v0, v1, v6}, Lcom/discord/utilities/stateful/StatefulViews;->get(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v6, v0
|
|
|
|
check-cast v6, Ljava/lang/String;
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getNotifications()Lcom/discord/stores/StoreNotifications;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreNotifications;->getPushToken()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v1, v9
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/restapi/RestAPIParams$UserInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, v9}, Lcom/discord/utilities/rest/RestAPI;->patchUser(Lcom/discord/restapi/RestAPIParams$UserInfo;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {}, Lcom/discord/app/g;->dt()Lrx/Observable$Transformer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
check-cast v0, Lcom/discord/app/AppComponent;
|
|
|
|
invoke-static {v0}, Lcom/discord/app/g;->a(Lcom/discord/app/AppComponent;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount;->access$getDimmer$p(Lcom/discord/widgets/settings/account/WidgetSettingsAccount;)Lcom/discord/utilities/dimmer/DimmerView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/discord/app/g;->a(Lcom/discord/utilities/dimmer/DimmerView;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7$1;
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7$1;-><init>(Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;)V
|
|
|
|
check-cast v0, Lrx/functions/Action1;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/settings/account/WidgetSettingsAccount$configureUI$7;->this$0:Lcom/discord/widgets/settings/account/WidgetSettingsAccount;
|
|
|
|
check-cast v1, Lcom/discord/app/AppFragment;
|
|
|
|
invoke-static {v0, v1}, Lcom/discord/app/g;->a(Lrx/functions/Action1;Lcom/discord/app/AppFragment;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|