216 lines
7.2 KiB
Smali
216 lines
7.2 KiB
Smali
.class public final Lcom/discord/widgets/chat/input/sticker/OwnedHeaderViewHolder;
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
.source "StickerAdapterViewHolders.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/widgets/chat/input/expression/WidgetExpressionPickerAdapter$StickyHeaderViewHolder;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
"Lcom/discord/widgets/chat/input/sticker/WidgetStickerAdapter;",
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
">;",
|
|
"Lcom/discord/widgets/chat/input/expression/WidgetExpressionPickerAdapter$StickyHeaderViewHolder;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final headerTextView:Landroid/widget/TextView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/widgets/chat/input/sticker/WidgetStickerAdapter;)V
|
|
.locals 1
|
|
|
|
const-string v0, "adapter"
|
|
|
|
invoke-static {p1, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v0, 0x7f0d0057
|
|
|
|
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, 0x7f0a0538
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "itemView.findViewById(R.id.header_item_text)"
|
|
|
|
invoke-static {p1, v0}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderViewHolder;->headerTextView:Landroid/widget/TextView;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bind(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
.locals 1
|
|
|
|
const-string v0, "data"
|
|
|
|
invoke-static {p2, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderViewHolder;->onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getItemView()Landroid/view/View;
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v1, "itemView"
|
|
|
|
invoke-static {v0, v1}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
.locals 5
|
|
|
|
const-string v0, "data"
|
|
|
|
invoke-static {p2, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->onConfigure(ILjava/lang/Object;)V
|
|
|
|
instance-of p1, p2, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderItem;
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
check-cast p2, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderItem;
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderItem;->getHeaderType()Lcom/discord/widgets/chat/input/sticker/HeaderType;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
instance-of p2, p1, Lcom/discord/widgets/chat/input/sticker/HeaderType$OwnedPackItem;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const v2, 0x7f121679
|
|
|
|
const-string v3, "itemView"
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderViewHolder;->headerTextView:Landroid/widget/TextView;
|
|
|
|
check-cast p1, Lcom/discord/widgets/chat/input/sticker/HeaderType$OwnedPackItem;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/HeaderType$OwnedPackItem;->getPack()Lcom/discord/models/sticker/dto/ModelStickerPack;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {p2, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderViewHolder;->headerTextView:Landroid/widget/TextView;
|
|
|
|
iget-object v4, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
invoke-static {v4, v3}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v3
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/HeaderType$OwnedPackItem;->getPack()Lcom/discord/models/sticker/dto/ModelStickerPack;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
aput-object p1, v1, v0
|
|
|
|
invoke-virtual {v3, v2, v1}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Landroid/widget/TextView;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
instance-of p1, p1, Lcom/discord/widgets/chat/input/sticker/HeaderType$Recent;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
invoke-static {p1, v3}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const p2, 0x7f121684
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderViewHolder;->headerTextView:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderViewHolder;->headerTextView:Landroid/widget/TextView;
|
|
|
|
iget-object v4, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
invoke-static {v4, v3}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v3
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
aput-object p1, v1, v0
|
|
|
|
invoke-virtual {v3, v2, v1}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Landroid/widget/TextView;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
check-cast p2, Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderViewHolder;->onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
|
|
return-void
|
|
.end method
|