apkfuckery/com.discord/smali/f/a/n/f0.smali

254 lines
6.6 KiB
Smali
Raw Normal View History

2020-07-08 16:44:49 +00:00
.class public Lf/a/n/f0;
2020-05-17 12:40:10 +00:00
.super Landroid/widget/LinearLayout;
.source "ReactionView.java"
# instance fields
.field public d:Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;
.field public e:Landroid/widget/TextSwitcher;
.field public f:Landroid/widget/TextView;
.field public g:Landroid/widget/TextView;
.field public h:I
.field public i:Ljava/lang/Long;
.field public j:Lcom/discord/models/domain/ModelMessageReaction;
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;
move-result-object p1
2020-09-28 19:40:16 +00:00
const v0, 0x7f0d00d9
2020-05-17 12:40:10 +00:00
invoke-static {p1, v0, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object p1
2020-09-29 21:44:44 +00:00
const v0, 0x7f0a07ce
2020-05-17 12:40:10 +00:00
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;
2020-07-08 16:44:49 +00:00
iput-object v0, p0, Lf/a/n/f0;->d:Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
const v0, 0x7f0a07cd
2020-05-17 12:40:10 +00:00
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextSwitcher;
2020-07-08 16:44:49 +00:00
iput-object v0, p0, Lf/a/n/f0;->e:Landroid/widget/TextSwitcher;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
const v0, 0x7f0a07cb
2020-05-17 12:40:10 +00:00
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
2020-07-08 16:44:49 +00:00
iput-object v0, p0, Lf/a/n/f0;->f:Landroid/widget/TextView;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
const v0, 0x7f0a07cc
2020-05-17 12:40:10 +00:00
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p1
check-cast p1, Landroid/widget/TextView;
2020-07-08 16:44:49 +00:00
iput-object p1, p0, Lf/a/n/f0;->g:Landroid/widget/TextView;
2020-05-17 12:40:10 +00:00
return-void
.end method
.method private setIsMe(Z)V
.locals 1
invoke-virtual {p0, p1}, Landroid/widget/LinearLayout;->setActivated(Z)V
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lf/a/n/f0;->f:Landroid/widget/TextView;
2020-05-17 12:40:10 +00:00
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setActivated(Z)V
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lf/a/n/f0;->g:Landroid/widget/TextView;
2020-05-17 12:40:10 +00:00
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setActivated(Z)V
return-void
.end method
# virtual methods
2020-09-29 21:44:44 +00:00
.method public a(Lcom/discord/models/domain/ModelMessageReaction;JZ)V
.locals 4
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lf/a/n/f0;->i:Ljava/lang/Long;
2020-05-17 12:40:10 +00:00
if-eqz v0, :cond_1
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
2020-09-29 21:44:44 +00:00
move-result-wide v0
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
cmp-long v2, v0, p2
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
if-eqz v2, :cond_0
2020-05-17 12:40:10 +00:00
goto :goto_0
:cond_0
const/4 v0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 v0, 0x1
:goto_1
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction;->getCount()I
2020-09-29 21:44:44 +00:00
move-result v1
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
iget v2, p0, Lf/a/n/f0;->h:I
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
if-ne v1, v2, :cond_2
2020-05-17 12:40:10 +00:00
goto :goto_4
:cond_2
if-eqz v0, :cond_3
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lf/a/n/f0;->e:Landroid/widget/TextSwitcher;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
move-result-object v2
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-virtual {v0, v2}, Landroid/widget/TextSwitcher;->setCurrentText(Ljava/lang/CharSequence;)V
2020-05-17 12:40:10 +00:00
goto :goto_3
:cond_3
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lf/a/n/f0;->e:Landroid/widget/TextSwitcher;
2020-05-17 12:40:10 +00:00
invoke-virtual {v0}, Landroid/widget/TextSwitcher;->getContext()Landroid/content/Context;
move-result-object v0
2020-09-29 21:44:44 +00:00
iget v2, p0, Lf/a/n/f0;->h:I
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
if-le v1, v2, :cond_4
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
iget-object v2, p0, Lf/a/n/f0;->e:Landroid/widget/TextSwitcher;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
const v3, 0x7f010030
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-virtual {v2, v0, v3}, Landroid/widget/TextSwitcher;->setInAnimation(Landroid/content/Context;I)V
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
iget-object v2, p0, Lf/a/n/f0;->e:Landroid/widget/TextSwitcher;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
const v3, 0x7f010032
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-virtual {v2, v0, v3}, Landroid/widget/TextSwitcher;->setOutAnimation(Landroid/content/Context;I)V
2020-05-17 12:40:10 +00:00
goto :goto_2
:cond_4
2020-09-29 21:44:44 +00:00
iget-object v2, p0, Lf/a/n/f0;->e:Landroid/widget/TextSwitcher;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
const v3, 0x7f01002f
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-virtual {v2, v0, v3}, Landroid/widget/TextSwitcher;->setInAnimation(Landroid/content/Context;I)V
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
iget-object v2, p0, Lf/a/n/f0;->e:Landroid/widget/TextSwitcher;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
const v3, 0x7f010031
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-virtual {v2, v0, v3}, Landroid/widget/TextSwitcher;->setOutAnimation(Landroid/content/Context;I)V
2020-05-17 12:40:10 +00:00
:goto_2
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lf/a/n/f0;->e:Landroid/widget/TextSwitcher;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
move-result-object v2
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-virtual {v0, v2}, Landroid/widget/TextSwitcher;->setText(Ljava/lang/CharSequence;)V
2020-05-17 12:40:10 +00:00
:goto_3
2020-09-29 21:44:44 +00:00
iput v1, p0, Lf/a/n/f0;->h:I
2020-05-17 12:40:10 +00:00
:goto_4
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lf/a/n/f0;->j:Lcom/discord/models/domain/ModelMessageReaction;
2020-05-17 12:40:10 +00:00
if-eqz v0, :cond_5
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction;->getEmoji()Lcom/discord/models/domain/ModelMessageReaction$Emoji;
move-result-object v0
2020-09-29 21:44:44 +00:00
iget-object v1, p0, Lf/a/n/f0;->j:Lcom/discord/models/domain/ModelMessageReaction;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessageReaction;->getEmoji()Lcom/discord/models/domain/ModelMessageReaction$Emoji;
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
move-result-object v1
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-virtual {v0, v1}, Lcom/discord/models/domain/ModelMessageReaction$Emoji;->equals(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
move-result v0
if-nez v0, :cond_6
:cond_5
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lf/a/n/f0;->d:Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;
2020-05-17 12:40:10 +00:00
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction;->getEmoji()Lcom/discord/models/domain/ModelMessageReaction$Emoji;
2020-09-29 21:44:44 +00:00
move-result-object v1
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-static {v0, v1, p4}, Lcom/discord/utilities/textprocessing/node/EmojiNode;->renderEmoji(Lcom/discord/utilities/view/text/SimpleDraweeSpanTextView;Lcom/discord/models/domain/ModelMessageReaction$Emoji;Z)V
2020-05-17 12:40:10 +00:00
:cond_6
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessageReaction;->isMe()Z
2020-09-29 21:44:44 +00:00
move-result p4
2020-05-17 12:40:10 +00:00
2020-09-29 21:44:44 +00:00
invoke-direct {p0, p4}, Lf/a/n/f0;->setIsMe(Z)V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iput-object p1, p0, Lf/a/n/f0;->j:Lcom/discord/models/domain/ModelMessageReaction;
2020-05-17 12:40:10 +00:00
invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
2020-07-08 16:44:49 +00:00
iput-object p1, p0, Lf/a/n/f0;->i:Ljava/lang/Long;
2020-05-17 12:40:10 +00:00
return-void
.end method
.method public getReaction()Lcom/discord/models/domain/ModelMessageReaction;
.locals 1
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lf/a/n/f0;->j:Lcom/discord/models/domain/ModelMessageReaction;
2020-05-17 12:40:10 +00:00
return-object v0
.end method