1105 lines
38 KiB
Smali
1105 lines
38 KiB
Smali
.class public Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;
|
|
.super Lcom/discord/app/AppFragment;
|
|
.source "WidgetServerSettingsEditMember.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final INTENT_EXTRA_GUILD_ID:Ljava/lang/String; = "INTENT_EXTRA_GUILD_ID"
|
|
|
|
.field public static final INTENT_EXTRA_USER_ID:Ljava/lang/String; = "INTENT_EXTRA_USER_ID"
|
|
|
|
|
|
# instance fields
|
|
.field public administrativeContainer:Landroid/view/View;
|
|
|
|
.field public banButton:Landroid/widget/TextView;
|
|
|
|
.field public kickButton:Landroid/widget/TextView;
|
|
|
|
.field public nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
.field public rolesAdapter:Lcom/discord/widgets/servers/WidgetServerSettingsEditMemberRolesAdapter;
|
|
|
|
.field public rolesContainer:Landroid/view/View;
|
|
|
|
.field public rolesRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
.field public saveFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
.field public final state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
.field public transferOwnershipButton:Landroid/widget/TextView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 4
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
new-instance v0, Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const v3, 0x7f0a035d
|
|
|
|
aput v3, v1, v2
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/utilities/stateful/StatefulViews;-><init>([I)V
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private changeNickname(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;Ljava/lang/String;)V
|
|
.locals 6
|
|
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-wide v2, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->myId:J
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
invoke-static {}, Lcom/discord/utilities/rest/RestAPI;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
new-instance p1, Lcom/discord/restapi/RestAPIParams$Nick;
|
|
|
|
invoke-direct {p1, p2}, Lcom/discord/restapi/RestAPIParams$Nick;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1, v2, p1}, Lcom/discord/utilities/rest/RestAPI;->changeGuildNickname(JLcom/discord/restapi/RestAPIParams$Nick;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {}, Lf/a/b/s;->e()Lrx/Observable$c;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0}, Lf/a/b/s;->r(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lf/a/o/e/x0;
|
|
|
|
invoke-direct {v0, p0, p2}, Lf/a/o/e/x0;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;Ljava/lang/String;)V
|
|
|
|
invoke-static {v0, p0}, Lf/a/b/s;->o(Lrx/functions/Action1;Lcom/discord/app/AppFragment;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {}, Lcom/discord/utilities/rest/RestAPI;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
iget-object p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {p2}, Lcom/discord/restapi/RestAPIParams$GuildMember;->createWithNick(Ljava/lang/String;)Lcom/discord/restapi/RestAPIParams$GuildMember;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual/range {v0 .. v5}, Lcom/discord/utilities/rest/RestAPI;->changeGuildMember(JJLcom/discord/restapi/RestAPIParams$GuildMember;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {}, Lf/a/b/s;->e()Lrx/Observable$c;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0}, Lf/a/b/s;->r(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lf/a/o/e/n0;
|
|
|
|
invoke-direct {v0, p0, p2}, Lf/a/o/e/n0;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;Ljava/lang/String;)V
|
|
|
|
invoke-static {v0, p0}, Lf/a/b/s;->o(Lrx/functions/Action1;Lcom/discord/app/AppFragment;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private configureUI(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
.locals 8
|
|
|
|
if-eqz p1, :cond_b
|
|
|
|
iget-boolean v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->canManage:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto/16 :goto_3
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->setupActionBar(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->setupNickname(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->setupRoles(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->saveFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
invoke-virtual {v1, v0}, Lcom/discord/utilities/stateful/StatefulViews;->configureSaveActionView(Landroid/view/View;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->saveFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
new-instance v1, Lf/a/o/e/m0;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/m0;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_1
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
iget-object v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->userComputed:Lcom/discord/models/domain/ModelGuildMember$Computed;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/models/domain/ModelUser;->getNickOrUsername(Lcom/discord/models/domain/ModelGuildMember$Computed;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->kickButton:Landroid/widget/TextView;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/16 v4, 0x8
|
|
|
|
const/4 v5, 0x0
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
iget-boolean v6, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->canKick:Z
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
const v6, 0x7f120e94
|
|
|
|
new-array v7, v2, [Ljava/lang/Object;
|
|
|
|
aput-object v0, v7, v5
|
|
|
|
invoke-virtual {p0, v6, v7}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v1, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->kickButton:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v1, v5}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->kickButton:Landroid/widget/TextView;
|
|
|
|
new-instance v6, Lf/a/o/e/w0;
|
|
|
|
invoke-direct {v6, p0, v0, p1}, Lf/a/o/e/w0;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;Ljava/lang/String;Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
|
|
invoke-virtual {v1, v6}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
invoke-virtual {v1, v4}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->kickButton:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v1, v3}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_3
|
|
:goto_0
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->banButton:Landroid/widget/TextView;
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
iget-boolean v6, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->canBan:Z
|
|
|
|
if-eqz v6, :cond_4
|
|
|
|
const v6, 0x7f120290
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
aput-object v0, v2, v5
|
|
|
|
invoke-virtual {p0, v6, v2}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->banButton:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v1, v5}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->banButton:Landroid/widget/TextView;
|
|
|
|
new-instance v2, Lf/a/o/e/t0;
|
|
|
|
invoke-direct {v2, p0, v0, p1}, Lf/a/o/e/t0;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;Ljava/lang/String;Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
|
|
invoke-virtual {v1, v2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
invoke-virtual {v1, v4}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->banButton:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v0, v3}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_5
|
|
:goto_1
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->transferOwnershipButton:Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
iget-boolean v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->canTransferOwnership:Z
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
invoke-virtual {v0, v5}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->transferOwnershipButton:Landroid/widget/TextView;
|
|
|
|
new-instance v1, Lf/a/o/e/o0;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/o0;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
invoke-virtual {v0, v4}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->transferOwnershipButton:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v0, v3}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_7
|
|
:goto_2
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->administrativeContainer:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_a
|
|
|
|
iget-boolean v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->canKick:Z
|
|
|
|
if-nez v1, :cond_8
|
|
|
|
iget-boolean v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->canBan:Z
|
|
|
|
if-nez v1, :cond_8
|
|
|
|
iget-boolean p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->canTransferOwnership:Z
|
|
|
|
if-eqz p1, :cond_9
|
|
|
|
:cond_8
|
|
const/4 v4, 0x0
|
|
|
|
:cond_9
|
|
invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:cond_a
|
|
return-void
|
|
|
|
:cond_b
|
|
:goto_3
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_c
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/app/Activity;->finish()V
|
|
|
|
:cond_c
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic f(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->configureUI(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static launch(JJLandroid/app/Activity;)V
|
|
.locals 2
|
|
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
const-string v1, "INTENT_EXTRA_GUILD_ID"
|
|
|
|
invoke-virtual {v0, v1, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
|
|
|
|
const-string p0, "INTENT_EXTRA_USER_ID"
|
|
|
|
invoke-virtual {v0, p0, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
|
|
|
|
const-class p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;
|
|
|
|
invoke-static {p4, p0, v0}, Lf/a/b/m;->e(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic m(Ljava/lang/Void;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private onNicknameChangeSuccessful(Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->hideKeyboard()V
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const v0, 0x7f121057
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p1, v1, v2
|
|
|
|
invoke-virtual {p0, v0, v1}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const p1, 0x7f121058
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
invoke-static {p0, p1}, Lf/a/b/p;->i(Landroidx/fragment/app/Fragment;Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private setupActionBar(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
.locals 3
|
|
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
iget-object v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->userComputed:Lcom/discord/models/domain/ModelGuildMember$Computed;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/models/domain/ModelUser;->getNickOrUsername(Lcom/discord/models/domain/ModelGuildMember$Computed;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->setActionBarDisplayHomeAsUpEnabled()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
iget-object p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p1, v1, v2
|
|
|
|
const p1, 0x7f120990
|
|
|
|
invoke-virtual {p0, p1, v1}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/app/AppFragment;->setActionBarTitle(Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/app/AppFragment;->setActionBarSubtitle(Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private setupNickname(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->userComputed:Lcom/discord/models/domain/ModelGuildMember$Computed;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildMember$Computed;->getNick()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->userComputed:Lcom/discord/models/domain/ModelGuildMember$Computed;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildMember$Computed;->getNick()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, ""
|
|
|
|
:goto_0
|
|
iget-boolean p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->canChangeNickname:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-virtual {p1, v1}, Lcom/google/android/material/textfield/TextInputLayout;->setEndIconVisible(Z)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-virtual {p1, v2}, Lcom/google/android/material/textfield/TextInputLayout;->setEnabled(Z)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-virtual {p1, v2}, Lcom/google/android/material/textfield/TextInputLayout;->setEndIconVisible(Z)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-virtual {p1, v1}, Lcom/google/android/material/textfield/TextInputLayout;->setEnabled(Z)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-virtual {v1}, Landroid/widget/LinearLayout;->getId()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p1, v1, v0}, Lcom/discord/utilities/stateful/StatefulViews;->put(ILjava/lang/Object;)V
|
|
|
|
:goto_1
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
invoke-virtual {p1}, Landroid/widget/LinearLayout;->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
|
|
|
|
check-cast v0, Ljava/lang/CharSequence;
|
|
|
|
invoke-static {p1, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setText(Lcom/google/android/material/textfield/TextInputLayout;Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method private setupRoles(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesContainer:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->roleItems:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesAdapter:Lcom/discord/widgets/servers/WidgetServerSettingsEditMemberRolesAdapter;
|
|
|
|
iget-object v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->roleItems:Ljava/util/List;
|
|
|
|
new-instance v2, Lf/a/o/e/u0;
|
|
|
|
invoke-direct {v2, p0, p1}, Lf/a/o/e/u0;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;)V
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMemberRolesAdapter;->configure(Ljava/util/List;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesContainer:Landroid/view/View;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesContainer:Landroid/view/View;
|
|
|
|
const/16 v0, 0x8
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public synthetic g(Ljava/lang/String;Ljava/lang/Void;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->onNicknameChangeSuccessful(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d0260
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public synthetic h(Ljava/lang/String;Ljava/lang/Void;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->onNicknameChangeSuccessful(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic i(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-static {p2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getTextOrEmpty(Lcom/google/android/material/textfield/TextInputLayout;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p2, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setText(Lcom/google/android/material/textfield/TextInputLayout;Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-static {p2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getTextOrEmpty(Lcom/google/android/material/textfield/TextInputLayout;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->changeNickname(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic j(Ljava/lang/String;Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;Landroid/view/View;)V
|
|
.locals 6
|
|
|
|
iget-object p3, p2, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
iget-object p2, p2, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getParentFragmentManager()Landroidx/fragment/app/FragmentManager;
|
|
|
|
move-result-object v5
|
|
|
|
move-object v0, p1
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/widgets/user/WidgetKickUser;->launch(Ljava/lang/String;JJLandroidx/fragment/app/FragmentManager;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic k(Ljava/lang/String;Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;Landroid/view/View;)V
|
|
.locals 6
|
|
|
|
iget-object p3, p2, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
iget-object p2, p2, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getParentFragmentManager()Landroidx/fragment/app/FragmentManager;
|
|
|
|
move-result-object v5
|
|
|
|
move-object v0, p1
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/widgets/user/WidgetBanUser;->launch(Ljava/lang/String;JJLandroidx/fragment/app/FragmentManager;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic l(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;Landroid/view/View;)V
|
|
.locals 3
|
|
|
|
iget-object p2, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuild;->isVerifiedServer()Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
iget-object p2, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuild;->isPartneredServer()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object p2, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v0, v1, p1, p2, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsTransferOwnership;->create(JJLandroidx/fragment/app/FragmentActivity;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const p1, 0x7f121770
|
|
|
|
invoke-static {p0, p1}, Lf/a/b/p;->g(Landroidx/fragment/app/Fragment;I)V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic n(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;Ljava/lang/Long;)Lkotlin/Unit;
|
|
.locals 10
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Landroid/widget/LinearLayout;->clearFocus()V
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iget-object v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->userRoles:Ljava/util/Set;
|
|
|
|
invoke-interface {v1, p2}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
iget-object v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->userRoles:Ljava/util/Set;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
invoke-virtual {v0, p2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->userRoles:Ljava/util/Set;
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/Long;
|
|
|
|
invoke-virtual {v2, p2}, Ljava/lang/Long;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_2
|
|
|
|
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
:goto_1
|
|
invoke-static {}, Lcom/discord/utilities/rest/RestAPI;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v4
|
|
|
|
iget-object p2, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v5
|
|
|
|
iget-object p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->user:Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v7
|
|
|
|
invoke-static {v0}, Lcom/discord/restapi/RestAPIParams$GuildMember;->createWithRoles(Ljava/util/List;)Lcom/discord/restapi/RestAPIParams$GuildMember;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual/range {v4 .. v9}, Lcom/discord/utilities/rest/RestAPI;->changeGuildMember(JJLcom/discord/restapi/RestAPIParams$GuildMember;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {}, Lf/a/b/s;->e()Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0}, Lf/a/b/s;->r(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Lf/a/o/e/v0;->d:Lf/a/o/e/v0;
|
|
|
|
invoke-static {p2, p0}, Lf/a/b/s;->o(Lrx/functions/Action1;Lcom/discord/app/AppFragment;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 4
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onViewBound(Landroid/view/View;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-virtual {p0, v0}, Landroidx/fragment/app/Fragment;->setRetainInstance(Z)V
|
|
|
|
const v1, 0x7f0a035d
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
const v1, 0x7f0a0360
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->saveFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
const v1, 0x7f0a035f
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
const v1, 0x7f0a035e
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesContainer:Landroid/view/View;
|
|
|
|
const v1, 0x7f0a035a
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->administrativeContainer:Landroid/view/View;
|
|
|
|
const v1, 0x7f0a035c
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/widget/TextView;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->kickButton:Landroid/widget/TextView;
|
|
|
|
const v1, 0x7f0a035b
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/widget/TextView;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->banButton:Landroid/widget/TextView;
|
|
|
|
const v1, 0x7f0a0361
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->transferOwnershipButton:Landroid/widget/TextView;
|
|
|
|
new-instance p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMemberRolesAdapter;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
invoke-direct {p1, v1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMemberRolesAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditMemberRolesAdapter;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesAdapter:Lcom/discord/widgets/servers/WidgetServerSettingsEditMemberRolesAdapter;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p1, v1}, Landroidx/recyclerview/widget/RecyclerView;->setNestedScrollingEnabled(Z)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->rolesRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
invoke-virtual {p1, v1}, Landroidx/recyclerview/widget/RecyclerView;->setHasFixedSize(Z)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
invoke-virtual {p1, p0}, Lcom/discord/utilities/stateful/StatefulViews;->setupUnsavedChangesConfirmation(Lcom/discord/app/AppFragment;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
new-array v2, v0, [Landroid/view/View;
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
aput-object v3, v2, v1
|
|
|
|
invoke-virtual {p1, v2}, Lcom/discord/utilities/stateful/StatefulViews;->addOptionalFields([Landroid/view/View;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->saveFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
new-array v0, v0, [Landroid/view/View;
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;->nicknameText:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
aput-object v3, v0, v1
|
|
|
|
invoke-virtual {p1, p0, v2, v0}, Lcom/discord/utilities/stateful/StatefulViews;->setupTextWatcherWithSaveAction(Lcom/discord/app/AppFragment;Landroid/view/View;[Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
.locals 6
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "INTENT_EXTRA_GUILD_ID"
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "INTENT_EXTRA_USER_ID"
|
|
|
|
invoke-virtual {v4, v5, v2, v3}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember$Model;->get(JJ)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Lf/a/b/s;->r(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lf/a/o/e/p0;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/o/e/p0;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;)V
|
|
|
|
const-class v2, Lcom/discord/widgets/servers/WidgetServerSettingsEditMember;
|
|
|
|
invoke-static {v1, v2}, Lf/a/b/s;->g(Lrx/functions/Action1;Ljava/lang/Class;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|