666 lines
21 KiB
Smali
666 lines
21 KiB
Smali
.class public Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;
|
|
.super Lcom/discord/app/AppFragment;
|
|
.source "WidgetServerSettingsRolesList.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final INTENT_EXTRA_GUILD_ID:Ljava/lang/String; = "INTENT_EXTRA_GUILD_ID"
|
|
|
|
|
|
# instance fields
|
|
.field public adapter:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;
|
|
|
|
.field public addRoleFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
.field public dimmer:Lcom/discord/utilities/dimmer/DimmerView;
|
|
|
|
.field public itemTouchHelper:Landroidx/recyclerview/widget/ItemTouchHelper;
|
|
|
|
.field public recycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private configureRecyclerAdapter()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->recycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->adapter:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->itemTouchHelper:Landroidx/recyclerview/widget/ItemTouchHelper;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/ItemTouchHelper;->attachToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
:cond_0
|
|
new-instance v0, Lcom/discord/utilities/mg_recycler/DragAndDropHelper;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->adapter:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/utilities/mg_recycler/DragAndDropHelper;-><init>(Lcom/discord/utilities/mg_recycler/DragAndDropHelper$Adapter;)V
|
|
|
|
new-instance v1, Landroidx/recyclerview/widget/ItemTouchHelper;
|
|
|
|
invoke-direct {v1, v0}, Landroidx/recyclerview/widget/ItemTouchHelper;-><init>(Landroidx/recyclerview/widget/ItemTouchHelper$Callback;)V
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->itemTouchHelper:Landroidx/recyclerview/widget/ItemTouchHelper;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->recycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
invoke-virtual {v1, v0}, Landroidx/recyclerview/widget/ItemTouchHelper;->attachToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private configureToolbar(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
const v0, 0x7f121347
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/app/AppFragment;->setActionBarTitle(I)Lkotlin/Unit;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/app/AppFragment;->setActionBarSubtitle(Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private configureUI(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
.locals 4
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;->roleItems:Ljava/util/List;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;->guildName:Ljava/lang/String;
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->configureToolbar(Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->adapter:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;->roleItems:Ljava/util/List;
|
|
|
|
new-instance v2, Lf/a/o/e/o2;
|
|
|
|
invoke-direct {v2, p0, p1}, Lf/a/o/e/o2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
|
|
new-instance v3, Lf/a/o/e/p2;
|
|
|
|
invoke-direct {v3, p0, p1}, Lf/a/o/e/p2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;->configure(Ljava/util/List;Lrx/functions/Action1;Lrx/functions/Action1;)V
|
|
|
|
:cond_1
|
|
iget-boolean v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;->canManageRoles:Z
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-boolean v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;->elevated:Z
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->addRoleFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
new-instance v1, Lf/a/o/e/l2;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/l2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->addRoleFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
invoke-virtual {p1}, Lcom/google/android/material/floatingactionbutton/FloatingActionButton;->show()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->addRoleFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
invoke-virtual {p1}, Lcom/google/android/material/floatingactionbutton/FloatingActionButton;->hide()V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->addRoleFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_3
|
|
:goto_1
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lf/a/b/f;->onBackPressed()V
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method public static create(Landroid/content/Context;J)V
|
|
.locals 2
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getAnalytics()Lcom/discord/stores/StoreAnalytics;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "ROLES"
|
|
|
|
invoke-virtual {v0, v1, p1, p2}, Lcom/discord/stores/StoreAnalytics;->onGuildSettingsPaneViewed(Ljava/lang/String;J)V
|
|
|
|
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, p1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
const-class p2, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;
|
|
|
|
invoke-static {p0, p2, p1}, Lf/a/b/k;->e(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private createRole(J)V
|
|
.locals 8
|
|
|
|
invoke-static {}, Lcom/discord/utilities/rest/RestAPI;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1, p2}, Lcom/discord/utilities/rest/RestAPI;->createRole(J)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lf/a/b/q;->e()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/h2;
|
|
|
|
invoke-direct {v1, p1, p2}, Lf/a/o/e/h2;-><init>(J)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->U(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
const-wide/16 v3, 0x1388
|
|
|
|
const-string v0, "observable"
|
|
|
|
invoke-static {v2, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x2
|
|
|
|
const/4 v7, 0x0
|
|
|
|
invoke-static/range {v2 .. v7}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->takeSingleUntilTimeout$default(Lrx/Observable;JZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Lf/a/b/q;->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/g2;
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lf/a/o/e/g2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;J)V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v1, p1}, Lf/a/b/q;->l(Lrx/functions/Action1;Landroid/content/Context;)Lrx/Observable$c;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic i(JLcom/discord/models/domain/ModelGuildRole;)Lrx/Observable;
|
|
.locals 3
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, p0, p1, v1}, Lcom/discord/stores/StoreGuilds;->observeRoles(JLjava/util/Collection;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Lf/a/o/e/f2;
|
|
|
|
invoke-direct {p1, p2}, Lf/a/o/e/f2;-><init>(Lcom/discord/models/domain/ModelGuildRole;)V
|
|
|
|
invoke-virtual {p0, p1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object p1, Lf/a/o/e/n2;->d:Lf/a/o/e/n2;
|
|
|
|
invoke-virtual {p0, p1}, Lrx/Observable;->w(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic k(Lcom/discord/models/domain/ModelGuildRole;Ljava/util/Map;)Lcom/discord/models/domain/ModelGuildRole;
|
|
.locals 2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-interface {p1, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic l(Lcom/discord/models/domain/ModelGuildRole;)Ljava/lang/Boolean;
|
|
.locals 0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic o(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->configureUI(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private processRoleDrop(Ljava/util/Map;Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/Integer;",
|
|
">;",
|
|
"Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/Integer;
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v3, v4, v2}, Lcom/discord/restapi/RestAPIParams$Role;->createForPosition(JI)Lcom/discord/restapi/RestAPIParams$Role;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-static {}, Lcom/discord/utilities/rest/RestAPI;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object p1
|
|
|
|
iget-wide v1, p2, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;->guildId:J
|
|
|
|
invoke-virtual {p1, v1, v2, v0}, Lcom/discord/utilities/rest/RestAPI;->batchUpdateRole(JLjava/util/List;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {}, Lf/a/b/q;->e()Lrx/Observable$c;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->dimmer:Lcom/discord/utilities/dimmer/DimmerView;
|
|
|
|
invoke-static {v0}, Lf/a/b/q;->t(Lcom/discord/utilities/dimmer/DimmerView;)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/q;->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/r2;
|
|
|
|
invoke-direct {v0, p0}, Lf/a/o/e/r2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;)V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v2, Lf/a/o/e/m2;
|
|
|
|
invoke-direct {v2, p0, p2}, Lf/a/o/e/m2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
|
|
invoke-static {v0, v1, v2}, Lf/a/b/q;->m(Lrx/functions/Action1;Landroid/content/Context;Lrx/functions/Action1;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public synthetic f(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;Lcom/discord/models/domain/ModelGuildRole;)V
|
|
.locals 3
|
|
|
|
iget-wide v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;->guildId:J
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v0, v1, p1, p2, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->launch(JJLandroid/app/Activity;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic g(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;Ljava/util/Map;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p2, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->processRoleDrop(Ljava/util/Map;Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d0250
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public synthetic h(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
iget-wide p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;->guildId:J
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->createRole(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic j(JLcom/discord/models/domain/ModelGuildRole;)V
|
|
.locals 2
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-static {p1, p2, v0, v1, p3}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->launch(JJLandroid/app/Activity;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic m(Ljava/lang/Void;)V
|
|
.locals 0
|
|
|
|
const p1, 0x7f121343 # 1.941673E38f
|
|
|
|
invoke-static {p0, p1}, Lf/a/b/n;->g(Landroidx/fragment/app/Fragment;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic n(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;Lcom/discord/utilities/error/Error;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->configureUI(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onResume()V
|
|
.locals 4
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onResume()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-static {v0, v1}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList$Model;->access$000(J)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Lf/a/b/q;->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/q2;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/o/e/q2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;)V
|
|
|
|
const-class v2, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;
|
|
|
|
invoke-static {v1, v2}, Lf/a/b/q;->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
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 1
|
|
.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 v0, 0x7f0a077d
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->addRoleFab:Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
const v0, 0x7f0a082b
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->recycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
const v0, 0x7f0a02e4
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/utilities/dimmer/DimmerView;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->dimmer:Lcom/discord/utilities/dimmer/DimmerView;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->setActionBarDisplayHomeAsUpEnabled()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesList;->configureRecyclerAdapter()V
|
|
|
|
return-void
|
|
.end method
|