314 lines
7.8 KiB
Smali
314 lines
7.8 KiB
Smali
.class public final Lcom/discord/views/GuildView;
|
|
.super Landroidx/constraintlayout/widget/ConstraintLayout;
|
|
.source "GuildView.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic g:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public f:I
|
|
|
|
|
|
# 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/GuildView;
|
|
|
|
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)Lc0/n/c/s;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v4
|
|
|
|
const-class v1, Lcom/discord/views/GuildView;
|
|
|
|
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)Lc0/n/c/s;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/discord/views/GuildView;->g:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 3
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Landroidx/constraintlayout/widget/ConstraintLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const v1, 0x7f0a050f
|
|
|
|
invoke-static {p0, v1}, Lc0/j/a;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lcom/discord/views/GuildView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v1, 0x7f0a050e
|
|
|
|
invoke-static {p0, v1}, Lc0/j/a;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lcom/discord/views/GuildView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const/4 v1, -0x1
|
|
|
|
iput v1, p0, Lcom/discord/views/GuildView;->f:I
|
|
|
|
const v2, 0x7f0d0130
|
|
|
|
invoke-static {p1, v2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {p0, v2}, Landroid/view/ViewGroup;->setClipToOutline(Z)V
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
sget-object v2, Lcom/discord/R$a;->GuildView:[I
|
|
|
|
invoke-virtual {p1, p2, v2, v0, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "context.obtainStyledAttr\u2026tyleable.GuildView, 0, 0)"
|
|
|
|
invoke-static {p1, p2}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:try_start_0
|
|
invoke-virtual {p1, v0, v1}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/discord/views/GuildView;->f:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p2
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
throw p2
|
|
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getImage()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/GuildView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/GuildView;->g:[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/GuildView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/GuildView;->g:[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(Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 12
|
|
|
|
const-string v0, "shortGuildName"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
invoke-virtual {p2}, Ljava/lang/String;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-lez v2, :cond_0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ne v2, v0, :cond_1
|
|
|
|
const-string v2, "ICON_UNSET"
|
|
|
|
invoke-static {p2, v2}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
xor-int/2addr v2, v0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_1
|
|
iget v2, p0, Lcom/discord/views/GuildView;->f:I
|
|
|
|
const/4 v3, -0x1
|
|
|
|
if-eq v2, v3, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
invoke-direct {p0}, Lcom/discord/views/GuildView;->getImage()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Landroid/widget/ImageView;->getHeight()I
|
|
|
|
move-result v2
|
|
|
|
:goto_2
|
|
invoke-static {v2}, Lcom/discord/utilities/icon/IconUtils;->getMediaProxySize(I)I
|
|
|
|
move-result v6
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, "?size="
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/GuildView;->getImage()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/16 v10, 0x70
|
|
|
|
const/4 v11, 0x0
|
|
|
|
move v5, v6
|
|
|
|
invoke-static/range {v3 .. v11}, Lcom/discord/utilities/images/MGImages;->setImage$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/GuildView;->getImage()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v1}, Landroid/widget/ImageView;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/GuildView;->getText()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, ""
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
invoke-direct {p0}, Lcom/discord/views/GuildView;->getText()Landroid/widget/TextView;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/GuildView;->getImage()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x4
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/ImageView;->setVisibility(I)V
|
|
|
|
:goto_3
|
|
return-void
|
|
.end method
|