216 lines
7.7 KiB
Smali
216 lines
7.7 KiB
Smali
.class public Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
.source "WidgetChatInputEmojiAdapter.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "EmojiViewHolder"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
"Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;",
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public draweeView:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)V
|
|
.locals 2
|
|
|
|
const v0, 0x7f0d0039
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;-><init>(ILcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)V
|
|
|
|
iget-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const v1, 0x7f0a02e3
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;->draweeView:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
new-instance v0, Lf/a/l/b/a/g0/c;
|
|
|
|
invoke-direct {v0, p0, p1}, Lf/a/l/b/a/g0/c;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
new-array v1, p1, [Landroid/view/View;
|
|
|
|
invoke-virtual {p0, v0, v1}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->setOnClickListener(Lrx/functions/Action3;[Landroid/view/View;)V
|
|
|
|
sget-object v0, Lf/a/l/b/a/g0/d;->d:Lf/a/l/b/a/g0/d;
|
|
|
|
new-array p1, p1, [Landroid/view/View;
|
|
|
|
invoke-virtual {p0, v0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->setOnLongClickListener(Lrx/functions/Action3;[Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic a(Landroid/view/View;Ljava/lang/Integer;Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
.locals 0
|
|
|
|
check-cast p2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiItem;
|
|
|
|
iget-object p1, p2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiItem;->emojiName:Ljava/lang/String;
|
|
|
|
invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0, p1}, Lf/a/b/j;->a(Landroid/content/Context;Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public synthetic a(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;Landroid/view/View;Ljava/lang/Integer;Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
.locals 0
|
|
|
|
check-cast p4, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiItem;
|
|
|
|
iget-object p2, p4, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiItem;->emoji:Lcom/discord/models/domain/emoji/Emoji;
|
|
|
|
invoke-interface {p2}, Lcom/discord/models/domain/emoji/Emoji;->isUsable()Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
invoke-interface {p2}, Lcom/discord/models/domain/emoji/Emoji;->isAvailable()Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getEmojis()Lcom/discord/stores/StoreEmoji;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p3, p2}, Lcom/discord/stores/StoreEmoji;->onEmojiUsed(Lcom/discord/models/domain/emoji/Emoji;)V
|
|
|
|
:cond_0
|
|
invoke-static {p1}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->access$300(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)Lcom/discord/widgets/chat/input/emoji/OnEmojiSelectedListener;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1, p2}, Lcom/discord/widgets/chat/input/emoji/OnEmojiSelectedListener;->onEmojiSelected(Lcom/discord/models/domain/emoji/Emoji;)V
|
|
|
|
:try_start_0
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;->draweeView:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
const/4 p2, 0x3
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/ImageView;->performHapticFeedback(I)Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:catchall_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
.locals 3
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->onConfigure(ILjava/lang/Object;)V
|
|
|
|
check-cast p2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiItem;
|
|
|
|
iget-object p1, p2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiItem;->emoji:Lcom/discord/models/domain/emoji/Emoji;
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->adapter:Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
check-cast v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->access$200(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/icon/IconUtils;->getMediaProxySize(I)I
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0x40
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v0
|
|
|
|
iget-boolean p2, p2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiItem;->allowEmojisToAnimate:Z
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;->draweeView:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {v1}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {p1, p2, v0, v1}, Lcom/discord/models/domain/emoji/Emoji;->getImageUri(ZILandroid/content/Context;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;->draweeView:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-static {v1, p2, v0, v0, v2}, Lcom/discord/utilities/images/MGImages;->setImage(Landroid/widget/ImageView;Ljava/lang/String;IIZ)V
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;->draweeView:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-interface {p1}, Lcom/discord/models/domain/emoji/Emoji;->isUsable()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-interface {p1}, Lcom/discord/models/domain/emoji/Emoji;->isAvailable()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 p1, 0xff
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/16 p1, 0x64
|
|
|
|
:goto_1
|
|
invoke-virtual {p2, p1}, Landroid/widget/ImageView;->setImageAlpha(I)V
|
|
|
|
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/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;->onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
|
|
return-void
|
|
.end method
|