286 lines
8.8 KiB
Smali
286 lines
8.8 KiB
Smali
.class public final Lcom/discord/widgets/chat/input/sticker/StoreHeaderViewHolder;
|
|
.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 animatedIv:Landroid/view/View;
|
|
|
|
.field public final subtitleTv:Landroid/widget/TextView;
|
|
|
|
.field public final titleTv: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}, Lc0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v0, 0x7f0d00e5
|
|
|
|
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, 0x7f0a09cb
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "itemView.findViewById(R.\u2026_store_header_item_title)"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/sticker/StoreHeaderViewHolder;->titleTv:Landroid/widget/TextView;
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const v0, 0x7f0a09ca
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "itemView.findViewById(R.\u2026ore_header_item_subtitle)"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/sticker/StoreHeaderViewHolder;->subtitleTv:Landroid/widget/TextView;
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const v0, 0x7f0a09c9
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "itemView.findViewById(R.\u2026ore_header_item_animated)"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/sticker/StoreHeaderViewHolder;->animatedIv:Landroid/view/View;
|
|
|
|
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}, Lc0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/chat/input/sticker/StoreHeaderViewHolder;->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}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
.locals 6
|
|
|
|
const-string v0, "data"
|
|
|
|
invoke-static {p2, v0}, Lc0/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
|
|
|
|
instance-of p1, p2, Lcom/discord/widgets/chat/input/sticker/StoreHeaderItem;
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/sticker/StoreHeaderViewHolder;->titleTv:Landroid/widget/TextView;
|
|
|
|
check-cast p2, Lcom/discord/widgets/chat/input/sticker/StoreHeaderItem;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/input/sticker/StoreHeaderItem;->getPack()Lcom/discord/models/sticker/dto/ModelStickerPack;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v0, "itemView"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "itemView.context"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f1000fe
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/input/sticker/StoreHeaderItem;->getPack()Lcom/discord/models/sticker/dto/ModelStickerPack;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v3, v2, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/input/sticker/StoreHeaderItem;->getPack()Lcom/discord/models/sticker/dto/ModelStickerPack;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v4}, Ljava/util/List;->size()I
|
|
|
|
move-result v4
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
aput-object v4, v3, v5
|
|
|
|
invoke-virtual {p1, v0, v1, v3}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "itemView.context.resourc\u2026ack.stickers.size\n )"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/sticker/StoreHeaderViewHolder;->subtitleTv:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/sticker/StoreHeaderViewHolder;->animatedIv:Landroid/view/View;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/input/sticker/StoreHeaderItem;->getPack()Lcom/discord/models/sticker/dto/ModelStickerPack;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
instance-of v0, p2, Ljava/util/Collection;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {p2}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_1
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/sticker/dto/ModelSticker;->isAnimated()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
const/4 v2, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v2, :cond_3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/16 v5, 0x8
|
|
|
|
:goto_2
|
|
invoke-virtual {p1, v5}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:cond_4
|
|
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/StoreHeaderViewHolder;->onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
|
|
return-void
|
|
.end method
|