283 lines
6.8 KiB
Smali
283 lines
6.8 KiB
Smali
.class public final Lcom/discord/views/CommunityGatingAvatarView;
|
|
.super Landroid/widget/FrameLayout;
|
|
.source "CommunityGatingAvatarView.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic f:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x2
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
const-class v1, Lcom/discord/views/CommunityGatingAvatarView;
|
|
|
|
const-string/jumbo v2, "text"
|
|
|
|
const-string v3, "getText()Landroid/widget/TextView;"
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Ly/n/c/s;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v4
|
|
|
|
const-class v1, Lcom/discord/views/CommunityGatingAvatarView;
|
|
|
|
const-string v2, "image"
|
|
|
|
const-string v3, "getImage()Lcom/facebook/drawee/view/SimpleDraweeView;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Ly/n/c/s;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/discord/views/CommunityGatingAvatarView;->f:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.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}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const p2, 0x7f0a02a9
|
|
|
|
invoke-static {p0, p2}, Ly/i/s;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/views/CommunityGatingAvatarView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0a029e
|
|
|
|
invoke-static {p0, p2}, Ly/i/s;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/views/CommunityGatingAvatarView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0d002a
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->setClipToOutline(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getImage()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/CommunityGatingAvatarView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/CommunityGatingAvatarView;->f:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getText()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/CommunityGatingAvatarView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/CommunityGatingAvatarView;->f:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lcom/discord/models/domain/ModelGuild;)V
|
|
.locals 11
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->hasIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/16 v6, 0xc
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const-string v3, "asset://asset/images/default_icon.jpg"
|
|
|
|
move-object v2, p1
|
|
|
|
invoke-static/range {v2 .. v7}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-interface {v1}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v4
|
|
|
|
if-lez v4, :cond_1
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v4, 0x0
|
|
|
|
:goto_1
|
|
if-ne v4, v3, :cond_2
|
|
|
|
const-string v4, "ICON_UNSET"
|
|
|
|
invoke-static {v1, v4}, Ly/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
xor-int/2addr v1, v3
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/4 v3, 0x0
|
|
|
|
:goto_2
|
|
invoke-direct {p0}, Lcom/discord/views/CommunityGatingAvatarView;->getText()Landroid/widget/TextView;
|
|
|
|
move-result-object v1
|
|
|
|
xor-int/lit8 v4, v3, 0x1
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/16 v2, 0x8
|
|
|
|
:goto_3
|
|
invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/CommunityGatingAvatarView;->getImage()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/16 v9, 0xe
|
|
|
|
const/4 v10, 0x0
|
|
|
|
move-object v5, p1
|
|
|
|
invoke-static/range {v5 .. v10}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/16 v9, 0x1c
|
|
|
|
invoke-static/range {v4 .. v10}, 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
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/CommunityGatingAvatarView;->getText()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, ""
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
invoke-direct {p0}, Lcom/discord/views/CommunityGatingAvatarView;->getText()Landroid/widget/TextView;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getShortName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_5
|
|
invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
:goto_4
|
|
return-void
|
|
.end method
|