177 lines
5.6 KiB
Smali
177 lines
5.6 KiB
Smali
.class public final Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder$Gif;
|
|
.super Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder;
|
|
.source "GifViewHolder.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Gif"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final gifImage:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/view/View;)V
|
|
.locals 2
|
|
|
|
const-string v0, "itemView"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder;-><init>(Landroid/view/View;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
const v0, 0x7f0a0476
|
|
|
|
invoke-virtual {p1, v0}, 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/gifpicker/GifViewHolder$Gif;->gifImage:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/gifpicker/ViewScalingOnTouchListener;
|
|
|
|
const v1, 0x3f666666 # 0.9f
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/chat/input/gifpicker/ViewScalingOnTouchListener;-><init>(F)V
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic configure$default(Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder$Gif;Lcom/discord/widgets/chat/input/gifpicker/GifAdapterItem$GifItem;ILkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder$Gif;->configure(Lcom/discord/widgets/chat/input/gifpicker/GifAdapterItem$GifItem;ILkotlin/jvm/functions/Function1;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final setGifImage(Lcom/discord/models/gifpicker/dto/ModelGif;)V
|
|
.locals 10
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/gifpicker/dto/ModelGif;->getGifImageUrl()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder$Gif;->gifImage:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
const-string v1, "gifImage"
|
|
|
|
invoke-static {v0, v1}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Ljava/lang/String;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p1, v1, v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/16 v8, 0xfc
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-static/range {v0 .. v9}, Lcom/discord/utilities/images/MGImages;->setImage$default(Landroid/widget/ImageView;[Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;Lcom/facebook/drawee/controller/ControllerListener;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final configure(Lcom/discord/widgets/chat/input/gifpicker/GifAdapterItem$GifItem;ILkotlin/jvm/functions/Function1;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/widgets/chat/input/gifpicker/GifAdapterItem$GifItem;",
|
|
"I",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/widgets/chat/input/gifpicker/GifAdapterItem$GifItem;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "gifItem"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/gifpicker/GifAdapterItem$GifItem;->getGif()Lcom/discord/models/gifpicker/dto/ModelGif;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/gifpicker/dto/ModelGif;->getHeight()I
|
|
|
|
move-result v1
|
|
|
|
int-to-float v1, v1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/gifpicker/dto/ModelGif;->getWidth()I
|
|
|
|
move-result v2
|
|
|
|
int-to-float v2, v2
|
|
|
|
div-float/2addr v1, v2
|
|
|
|
int-to-float p2, p2
|
|
|
|
mul-float p2, p2, v1
|
|
|
|
iget-object v1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v2, "itemView"
|
|
|
|
invoke-static {v1, v2}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v1
|
|
|
|
float-to-int p2, p2
|
|
|
|
iput p2, v1, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder$Gif;->setGifImage(Lcom/discord/models/gifpicker/dto/ModelGif;)V
|
|
|
|
iget-object p2, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder$Gif$configure$1;
|
|
|
|
invoke-direct {v0, p3, p1}, Lcom/discord/widgets/chat/input/gifpicker/GifViewHolder$Gif$configure$1;-><init>(Lkotlin/jvm/functions/Function1;Lcom/discord/widgets/chat/input/gifpicker/GifAdapterItem$GifItem;)V
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|