215 lines
7 KiB
Smali
215 lines
7 KiB
Smali
.class public final Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
.source "SettingsChannelListAdapter.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/utilities/mg_recycler/DragAndDropHelper$DraggableViewHolder;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/servers/SettingsChannelListAdapter;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "CategoryListItem"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
"Lcom/discord/widgets/servers/SettingsChannelListAdapter;",
|
|
"Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;",
|
|
">;",
|
|
"Lcom/discord/utilities/mg_recycler/DragAndDropHelper$DraggableViewHolder;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public categoryItem:Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;
|
|
|
|
.field public dragIcon:Landroid/view/View;
|
|
|
|
.field public nameText:Landroid/widget/TextView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/widgets/servers/SettingsChannelListAdapter;)V
|
|
.locals 1
|
|
|
|
const-string v0, "adapter"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v0, 0x7f0d00db
|
|
|
|
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;
|
|
|
|
const v0, 0x7f0a090b
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "itemView.findViewById(R.\u2026_list_category_item_text)"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;->nameText:Landroid/widget/TextView;
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const v0, 0x7f0a090a
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "itemView.findViewById(R.\u2026_list_category_item_drag)"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;->dragIcon:Landroid/view/View;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public canDrag()Z
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;->categoryItem:Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;->isDraggable()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;->getCanManageCategory()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_0
|
|
return v1
|
|
.end method
|
|
|
|
.method public onConfigure(ILcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;)V
|
|
.locals 2
|
|
|
|
const-string v0, "data"
|
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->onConfigure(ILjava/lang/Object;)V
|
|
|
|
check-cast p2, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;->categoryItem:Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
iget-object p1, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->adapter:Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
check-cast p1, Lcom/discord/widgets/servers/SettingsChannelListAdapter;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/SettingsChannelListAdapter;->getOnClickListener()Lkotlin/jvm/functions/Function1;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
new-instance v1, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem$onConfigure$$inlined$let$lambda$1;
|
|
|
|
invoke-direct {v1, p1, p2, p0}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem$onConfigure$$inlined$let$lambda$1;-><init>(Lkotlin/jvm/functions/Function1;Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_0
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;->nameText:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-object p2, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v0, "itemView"
|
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p2
|
|
|
|
const v0, 0x7f1216f7
|
|
|
|
invoke-virtual {p2, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
:goto_0
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;->dragIcon:Landroid/view/View;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;->canDrag()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
const/4 p2, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/16 p2, 0x8
|
|
|
|
:goto_1
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
check-cast p2, Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;->onConfigure(ILcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDragStateChanged(Z)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|