268 lines
9.2 KiB
Smali
268 lines
9.2 KiB
Smali
|
.class public Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;
|
||
|
.super Lcom/discord/app/AppFragment;
|
||
|
.source "WidgetChannelSettingsPermissionsAddRole.java"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/MemberClasses;
|
||
|
value = {
|
||
|
Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# static fields
|
||
|
.field public static final INTENT_EXTRA_CHANNEL_ID:Ljava/lang/String; = "INTENT_EXTRA_CHANNEL_ID"
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field public rolesAdapter:Lcom/discord/widgets/channels/SimpleRolesAdapter;
|
||
|
|
||
|
.field public rolesRecycler: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 public static synthetic a(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-direct {p0, p1}, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;->configureUI(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private configureToolbar(Lcom/discord/models/domain/ModelChannel;)V
|
||
|
.locals 1
|
||
|
|
||
|
const v0, 0x7f12007b
|
||
|
|
||
|
invoke-virtual {p0, v0}, Lcom/discord/app/AppFragment;->setActionBarTitle(I)Lkotlin/Unit;
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p1, v0}, Lcom/discord/utilities/channel/ChannelUtils;->getDisplayName(Lcom/discord/models/domain/ModelChannel;Landroid/content/Context;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p0, p1}, Lcom/discord/app/AppFragment;->setActionBarSubtitle(Ljava/lang/CharSequence;)Lkotlin/Unit;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private configureUI(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)V
|
||
|
.locals 3
|
||
|
|
||
|
if-eqz p1, :cond_1
|
||
|
|
||
|
invoke-static {p1}, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;->access$000(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_1
|
||
|
|
||
|
invoke-static {p1}, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;->access$100(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)Ljava/util/List;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
invoke-static {p1}, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;->access$200(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)Lcom/discord/models/domain/ModelChannel;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-direct {p0, v0}, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;->configureToolbar(Lcom/discord/models/domain/ModelChannel;)V
|
||
|
|
||
|
iget-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;->rolesAdapter:Lcom/discord/widgets/channels/SimpleRolesAdapter;
|
||
|
|
||
|
invoke-static {p1}, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;->access$100(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)Ljava/util/List;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
new-instance v2, Lf/a/m/a/r0;
|
||
|
|
||
|
invoke-direct {v2, p0, p1}, Lf/a/m/a/r0;-><init>(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)V
|
||
|
|
||
|
invoke-virtual {v0, v1, v2}, Lcom/discord/widgets/channels/SimpleRolesAdapter;->setData(Ljava/util/List;Lrx/functions/Action1;)V
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_1
|
||
|
:goto_0
|
||
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
if-eqz p1, :cond_2
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p1}, Landroidx/activity/ComponentActivity;->onBackPressed()V
|
||
|
|
||
|
:cond_2
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static create(Landroid/content/Context;J)V
|
||
|
.locals 2
|
||
|
|
||
|
new-instance v0, Landroid/content/Intent;
|
||
|
|
||
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
||
|
|
||
|
const-string v1, "INTENT_EXTRA_CHANNEL_ID"
|
||
|
|
||
|
invoke-virtual {v0, v1, p1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
|
||
|
|
||
|
const-class p1, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;
|
||
|
|
||
|
invoke-static {p0, p1, v0}, Lf/a/b/h;->b(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public synthetic a(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;Lcom/discord/models/domain/ModelGuildRole;)V
|
||
|
.locals 7
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p1}, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;->access$200(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)Lcom/discord/models/domain/ModelChannel;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/Long;->longValue()J
|
||
|
|
||
|
move-result-wide v1
|
||
|
|
||
|
invoke-static {p1}, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;->access$200(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole$Model;)Lcom/discord/models/domain/ModelChannel;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
||
|
|
||
|
move-result-wide v3
|
||
|
|
||
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
||
|
|
||
|
move-result-wide v5
|
||
|
|
||
|
invoke-static/range {v0 .. v6}, Lcom/discord/widgets/channels/WidgetChannelSettingsEditPermissions;->createForRole(Landroid/content/Context;JJJ)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public getContentViewResId()I
|
||
|
.locals 1
|
||
|
|
||
|
const v0, 0x7f0d0158
|
||
|
|
||
|
return v0
|
||
|
.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
|
||
|
|
||
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->setActionBarDisplayHomeAsUpEnabled()Landroidx/appcompat/widget/Toolbar;
|
||
|
|
||
|
const v0, 0x7f0a0199
|
||
|
|
||
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
check-cast p1, Landroidx/recyclerview/widget/RecyclerView;
|
||
|
|
||
|
iput-object p1, p0, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;->rolesRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
||
|
|
||
|
new-instance p1, Lcom/discord/widgets/channels/SimpleRolesAdapter;
|
||
|
|
||
|
iget-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;->rolesRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
||
|
|
||
|
invoke-direct {p1, v0}, Lcom/discord/widgets/channels/SimpleRolesAdapter;-><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/channels/SimpleRolesAdapter;
|
||
|
|
||
|
iput-object p1, p0, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;->rolesAdapter:Lcom/discord/widgets/channels/SimpleRolesAdapter;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public onViewBoundOrOnResume()V
|
||
|
.locals 4
|
||
|
|
||
|
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_CHANNEL_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/channels/WidgetChannelSettingsPermissionsAddRole$Model;->get(J)Lrx/Observable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p0}, Lf/a/b/k;->a(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
new-instance v1, Lf/a/m/a/w0;
|
||
|
|
||
|
invoke-direct {v1, p0}, Lf/a/m/a/w0;-><init>(Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;)V
|
||
|
|
||
|
const-class v2, Lcom/discord/widgets/channels/WidgetChannelSettingsPermissionsAddRole;
|
||
|
|
||
|
invoke-static {v1, v2}, Lf/a/b/k;->a(Lrx/functions/Action1;Ljava/lang/Class;)Lrx/Observable$c;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
||
|
|
||
|
return-void
|
||
|
.end method
|