EmojiViewV2$ImageViewEmoji.smali

.class Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;
.super Landroid/widget/ImageView;
.source "EmojiViewV2.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lim/tpelyyftgw/ui/components/EmojiViewV2;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "ImageViewEmoji"
.end annotation


# instance fields
.field private isRecent:Z

.field final synthetic this$0:Lim/tpelyyftgw/ui/components/EmojiViewV2;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public constructor <init>(Lim/tpelyyftgw/ui/components/EmojiViewV2;Landroid/content/Context;)V
    .registers 3
    .param p2, "context"    # Landroid/content/Context;

    .line 504
    iput-object p1, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->this$0:Lim/tpelyyftgw/ui/components/EmojiViewV2;

    .line 505
    invoke-direct {p0, p2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 506
    sget-object p1, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {p0, p1}, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 507
    return-void
.end method

.method static synthetic access$2800(Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;)Z
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;

    .line 501
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->isRecent:Z

    return v0
.end method

.method static synthetic access$2900(Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;Ljava/lang/String;)V
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;
    .param p1, "x1"    # Ljava/lang/String;

    .line 501
    invoke-direct {p0, p1}, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->sendEmoji(Ljava/lang/String;)V

    return-void
.end method

.method private sendEmoji(Ljava/lang/String;)V
    .registers 6
    .param p1, "override"    # Ljava/lang/String;

    .line 510
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->this$0:Lim/tpelyyftgw/ui/components/EmojiViewV2;

    const/4 v1, 0x1

    invoke-static {v0, v1, v1}, Lim/tpelyyftgw/ui/components/EmojiViewV2;->access$1600(Lim/tpelyyftgw/ui/components/EmojiViewV2;ZZ)V

    .line 511
    if-eqz p1, :cond_a

    move-object v0, p1

    goto :goto_10

    :cond_a
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 512
    .local v0, "code":Ljava/lang/String;
    :goto_10
    new-instance v1, Landroid/text/SpannableStringBuilder;

    invoke-direct {v1}, Landroid/text/SpannableStringBuilder;-><init>()V

    .line 513
    .local v1, "builder":Landroid/text/SpannableStringBuilder;
    invoke-virtual {v1, v0}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;

    .line 514
    if-nez p1, :cond_47

    .line 515
    iget-boolean v2, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->isRecent:Z

    if-nez v2, :cond_2c

    .line 516
    sget-object v2, Lim/tpelyyftgw/messenger/Emoji;->emojiColor:Ljava/util/HashMap;

    invoke-virtual {v2, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 517
    .local v2, "color":Ljava/lang/String;
    if-eqz v2, :cond_2c

    .line 518
    invoke-static {v0, v2}, Lim/tpelyyftgw/ui/components/EmojiViewV2;->access$1700(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 521
    .end local v2    # "color":Ljava/lang/String;
    :cond_2c
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->this$0:Lim/tpelyyftgw/ui/components/EmojiViewV2;

    invoke-virtual {v2, v0}, Lim/tpelyyftgw/ui/components/EmojiViewV2;->addEmojiToRecent(Ljava/lang/String;)V

    .line 522
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->this$0:Lim/tpelyyftgw/ui/components/EmojiViewV2;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/EmojiViewV2;->access$000(Lim/tpelyyftgw/ui/components/EmojiViewV2;)Lim/tpelyyftgw/ui/components/EmojiViewV2$EmojiViewDelegate;

    move-result-object v2

    if-eqz v2, :cond_5c

    .line 523
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->this$0:Lim/tpelyyftgw/ui/components/EmojiViewV2;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/EmojiViewV2;->access$000(Lim/tpelyyftgw/ui/components/EmojiViewV2;)Lim/tpelyyftgw/ui/components/EmojiViewV2$EmojiViewDelegate;

    move-result-object v2

    invoke-static {v0}, Lim/tpelyyftgw/messenger/Emoji;->fixEmoji(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-interface {v2, v3}, Lim/tpelyyftgw/ui/components/EmojiViewV2$EmojiViewDelegate;->onEmojiSelected(Ljava/lang/String;)V

    goto :goto_5c

    .line 526
    :cond_47
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->this$0:Lim/tpelyyftgw/ui/components/EmojiViewV2;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/EmojiViewV2;->access$000(Lim/tpelyyftgw/ui/components/EmojiViewV2;)Lim/tpelyyftgw/ui/components/EmojiViewV2$EmojiViewDelegate;

    move-result-object v2

    if-eqz v2, :cond_5c

    .line 527
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->this$0:Lim/tpelyyftgw/ui/components/EmojiViewV2;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/EmojiViewV2;->access$000(Lim/tpelyyftgw/ui/components/EmojiViewV2;)Lim/tpelyyftgw/ui/components/EmojiViewV2$EmojiViewDelegate;

    move-result-object v2

    invoke-static {p1}, Lim/tpelyyftgw/messenger/Emoji;->fixEmoji(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-interface {v2, v3}, Lim/tpelyyftgw/ui/components/EmojiViewV2$EmojiViewDelegate;->onEmojiSelected(Ljava/lang/String;)V

    .line 530
    :cond_5c
    :goto_5c
    return-void
.end method


# virtual methods
.method public onMeasure(II)V
    .registers 5
    .param p1, "widthMeasureSpec"    # I
    .param p2, "heightMeasureSpec"    # I

    .line 539
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v0

    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v1

    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->setMeasuredDimension(II)V

    .line 540
    return-void
.end method

.method public setImageDrawable(Landroid/graphics/drawable/Drawable;Z)V
    .registers 3
    .param p1, "drawable"    # Landroid/graphics/drawable/Drawable;
    .param p2, "recent"    # Z

    .line 533
    invoke-super {p0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 534
    iput-boolean p2, p0, Lim/tpelyyftgw/ui/components/EmojiViewV2$ImageViewEmoji;->isRecent:Z

    .line 535
    return-void
.end method