2020-05-17 12:40:10 +00:00
|
|
|
.class public Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;
|
|
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
|
|
.source "WidgetServerSettingsRolesListAdapter.java"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/utilities/mg_recycler/DragAndDropHelper$DraggableViewHolder;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x9
|
|
|
|
name = "RoleListItem"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
2020-07-08 16:44:49 +00:00
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter<",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/DragAndDropAdapter$Payload;",
|
|
|
|
">;",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/DragAndDropAdapter$Payload;",
|
2020-05-17 12:40:10 +00:00
|
|
|
">;",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/DragAndDropHelper$DraggableViewHolder;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public data:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
|
|
|
|
|
|
|
.field public lockIndicator:Landroid/view/View;
|
|
|
|
|
|
|
|
.field public roleNameTextView:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
.field public selectedOverlay:Landroid/view/View;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;)V
|
|
|
|
.locals 1
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f0d0267
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;-><init>(ILcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f0a089e
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, 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/WidgetServerSettingsRolesListAdapter$RoleListItem;->roleNameTextView:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f0a089c
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->selectedOverlay:Landroid/view/View;
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f0a089d
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->lockIndicator:Landroid/view/View;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static synthetic b(Landroid/view/View;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f120736
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p0, v0}, Lf/a/b/p;->d(Landroid/content/Context;I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p0, 0x1
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static synthetic c(Landroid/view/View;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f120c14
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p0, v0}, Lf/a/b/p;->d(Landroid/content/Context;I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p0, 0x1
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static synthetic d(Landroid/view/View;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f1216c0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p0, v0}, Lf/a/b/p;->d(Landroid/content/Context;I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p0, 0x1
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public synthetic a(Landroid/view/View;)V
|
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->adapter:Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast p1, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter;->getRoleSelectedListener()Lrx/functions/Action1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->data:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;->getRole()Lcom/discord/models/domain/ModelGuildRole;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-interface {p1, v0}, Lrx/functions/Action1;->call(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public canDrag()Z
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->data:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;->canReorder()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public onConfigure(ILcom/discord/utilities/mg_recycler/DragAndDropAdapter$Payload;)V
|
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->onConfigure(ILjava/lang/Object;)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast p2, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
iput-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->data:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->roleNameTextView:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;->getRole()Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildRole;->getName()Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->roleNameTextView:Landroid/widget/TextView;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->data:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;->getRole()Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->roleNameTextView:Landroid/widget/TextView;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Landroid/widget/TextView;->getContext()Landroid/content/Context;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {p2, v0}, Lcom/discord/utilities/guilds/RoleUtils;->getRoleColor(Lcom/discord/models/domain/ModelGuildRole;Landroid/content/Context;)I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setTextColor(I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
new-instance p2, Lf/a/o/e/t2;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-direct {p2, p0}, Lf/a/o/e/t2;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->data:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;->isEveryoneRole()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
sget-object p2, Lf/a/o/e/w2;->d:Lf/a/o/e/w2;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->data:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;->isUserAbleToManageRoles()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
sget-object p2, Lf/a/o/e/v2;->d:Lf/a/o/e/v2;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->data:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;->isElevated()Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
sget-object p2, Lf/a/o/e/u2;->d:Lf/a/o/e/u2;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 p2, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->lockIndicator:Landroid/view/View;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->data:Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleItem;->isLocked()Z
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const/16 p2, 0x8
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast p2, Lcom/discord/utilities/mg_recycler/DragAndDropAdapter$Payload;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->onConfigure(ILcom/discord/utilities/mg_recycler/DragAndDropAdapter$Payload;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onDragStateChanged(Z)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsRolesListAdapter$RoleListItem;->selectedOverlay:Landroid/view/View;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/16 p1, 0x8
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|