216 lines
5.8 KiB
Smali
216 lines
5.8 KiB
Smali
.class public final Lcom/discord/views/UserListItemView;
|
|
.super Landroid/widget/RelativeLayout;
|
|
.source "UserListItemView.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Landroid/widget/ImageView;
|
|
|
|
.field public final e:Landroid/widget/TextView;
|
|
|
|
.field public final f:Landroid/widget/TextView;
|
|
|
|
.field public final g:Lcom/discord/views/StatusView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const-string v1, "context"
|
|
|
|
invoke-static {p1, v1}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-virtual {p0, p2}, Landroid/widget/RelativeLayout;->setClickable(Z)V
|
|
|
|
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f0d0162
|
|
|
|
invoke-virtual {p1, v0, p0, p2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const p2, 0x7f0a0ac0
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "content.findViewById(R.id.user_list_item_avatar)"
|
|
|
|
invoke-static {p2, v0}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p2, Landroid/widget/ImageView;
|
|
|
|
iput-object p2, p0, Lcom/discord/views/UserListItemView;->d:Landroid/widget/ImageView;
|
|
|
|
const p2, 0x7f0a0ac1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "content.findViewById(R.id.user_list_item_name)"
|
|
|
|
invoke-static {p2, v0}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p2, Landroid/widget/TextView;
|
|
|
|
iput-object p2, p0, Lcom/discord/views/UserListItemView;->e:Landroid/widget/TextView;
|
|
|
|
const p2, 0x7f0a0ac2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "content.findViewById(R.i\u2026list_item_name_secondary)"
|
|
|
|
invoke-static {p2, v0}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p2, Landroid/widget/TextView;
|
|
|
|
iput-object p2, p0, Lcom/discord/views/UserListItemView;->f:Landroid/widget/TextView;
|
|
|
|
const p2, 0x7f0a0ac3
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "content.findViewById(R.id.user_list_item_status)"
|
|
|
|
invoke-static {p1, p2}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Lcom/discord/views/StatusView;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/UserListItemView;->g:Lcom/discord/views/StatusView;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Lcom/discord/views/UserListItemView;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/discord/models/domain/ModelPresence;I)V
|
|
.locals 8
|
|
|
|
and-int/lit8 p4, p5, 0x2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
move-object v2, v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v2, p2
|
|
|
|
:goto_0
|
|
and-int/lit8 p2, p5, 0x4
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
move-object p3, v0
|
|
|
|
:cond_1
|
|
const/16 p2, 0x8
|
|
|
|
and-int/lit8 p4, p5, 0x8
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
const-string/jumbo p4, "userNameWithDiscriminator"
|
|
|
|
invoke-static {p1, p4}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-eqz p3, :cond_3
|
|
|
|
invoke-interface {p3}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result p4
|
|
|
|
if-nez p4, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 p4, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
:goto_1
|
|
const/4 p4, 0x1
|
|
|
|
:goto_2
|
|
if-eqz p4, :cond_4
|
|
|
|
iget-object p3, p0, Lcom/discord/views/UserListItemView;->e:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p3, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/UserListItemView;->f:Landroid/widget/TextView;
|
|
|
|
const-string p3, ""
|
|
|
|
invoke-virtual {p1, p3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
iget-object p4, p0, Lcom/discord/views/UserListItemView;->e:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p4, p3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p3, p0, Lcom/discord/views/UserListItemView;->f:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p3, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
:goto_3
|
|
iget-object v1, p0, Lcom/discord/views/UserListItemView;->d:Landroid/widget/ImageView;
|
|
|
|
const v3, 0x7f07006b
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/16 v6, 0x18
|
|
|
|
const/4 v7, 0x0
|
|
|
|
invoke-static/range {v1 .. v7}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/UserListItemView;->g:Lcom/discord/views/StatusView;
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/views/StatusView;->setPresence(Lcom/discord/models/domain/ModelPresence;)V
|
|
|
|
iget-object p0, p0, Lcom/discord/views/UserListItemView;->g:Lcom/discord/views/StatusView;
|
|
|
|
invoke-virtual {p0, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getUserName()Landroid/widget/TextView;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/views/UserListItemView;->e:Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|