328 lines
9.2 KiB
Smali
328 lines
9.2 KiB
Smali
.class public final Lcom/discord/views/ToolbarTitleLayout;
|
|
.super Le/a/j/c$b;
|
|
.source "ToolbarTitleLayout.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic h:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final g:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x3
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Lm/u/b/u;
|
|
|
|
const-class v2, Lcom/discord/views/ToolbarTitleLayout;
|
|
|
|
invoke-static {v2}, Lm/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lm/y/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "title"
|
|
|
|
const-string v4, "getTitle()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lm/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v2, Lm/u/b/w;->a:Lm/u/b/x;
|
|
|
|
invoke-virtual {v2, v1}, Lm/u/b/x;->property1(Lm/u/b/t;)Lm/y/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-instance v2, Lm/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/views/ToolbarTitleLayout;
|
|
|
|
invoke-static {v3}, Lm/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lm/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "titleSubtext"
|
|
|
|
const-string v5, "getTitleSubtext()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lm/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lm/u/b/w;->a:Lm/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Lm/u/b/x;->property1(Lm/u/b/t;)Lm/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-instance v2, Lm/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/views/ToolbarTitleLayout;
|
|
|
|
invoke-static {v3}, Lm/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lm/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "avatarPresence"
|
|
|
|
const-string v5, "getAvatarPresence()Landroid/widget/ImageView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lm/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lm/u/b/w;->a:Lm/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Lm/u/b/x;->property1(Lm/u/b/t;)Lm/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
sput-object v0, Lcom/discord/views/ToolbarTitleLayout;->h:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0, p1}, Le/a/j/c$b;-><init>(Landroid/content/Context;)V
|
|
|
|
const p1, 0x7f0a079e
|
|
|
|
invoke-static {p0, p1}, Le/k/a/b/e/p/g;->a(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ToolbarTitleLayout;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a079f
|
|
|
|
invoke-static {p0, p1}, Le/k/a/b/e/p/g;->a(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ToolbarTitleLayout;->f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a079d
|
|
|
|
invoke-static {p0, p1}, Le/k/a/b/e/p/g;->a(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/views/ToolbarTitleLayout;->g:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lm/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private final getAvatarPresence()Landroid/widget/ImageView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/ToolbarTitleLayout;->g:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/ToolbarTitleLayout;->h:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
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/ImageView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getTitle()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/ToolbarTitleLayout;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/ToolbarTitleLayout;->h:[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
|
|
|
|
.method private final getTitleSubtext()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/ToolbarTitleLayout;->f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/ToolbarTitleLayout;->h:[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, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Landroid/view/ViewGroup;
|
|
.locals 3
|
|
|
|
invoke-virtual {p0}, Le/a/j/c$b;->getInflater()Landroid/view/LayoutInflater;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f0d00cf
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {v0, v1, p0, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
check-cast v0, Landroid/view/ViewGroup;
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
new-instance v0, Lm/l;
|
|
|
|
const-string v1, "null cannot be cast to non-null type android.view.ViewGroup"
|
|
|
|
invoke-direct {v0, v1}, Lm/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final a(Lcom/discord/models/domain/ModelPresence;Z)V
|
|
.locals 4
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/ToolbarTitleLayout;->getAvatarPresence()Landroid/widget/ImageView;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v0, p2, v3, v2, v1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/ToolbarTitleLayout;->getAvatarPresence()Landroid/widget/ImageView;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p1, v3, p2, v2, v1}, Lcom/discord/utilities/presence/PresenceUtils;->setStatusIcon$default(Lcom/discord/models/domain/ModelPresence;ZLandroid/widget/ImageView;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final a(Ljava/lang/CharSequence;Ljava/lang/Integer;)V
|
|
.locals 3
|
|
.param p2 # Ljava/lang/Integer;
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/ToolbarTitleLayout;->getTitle()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "context"
|
|
|
|
invoke-static {v1, v2}, Lm/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, p2, v1}, Landroidx/core/content/res/ResourcesCompat;->getDrawable(Landroid/content/res/Resources;ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/ToolbarTitleLayout;->getTitle()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, p2, p1, p1, p1}, Landroidx/core/widget/TextViewCompat;->setCompoundDrawablesRelativeWithIntrinsicBounds(Landroid/widget/TextView;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/discord/views/ToolbarTitleLayout;->getTitle()Landroid/widget/TextView;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2, p1, p1, p1, p1}, Landroidx/core/widget/TextViewCompat;->setCompoundDrawablesRelativeWithIntrinsicBounds(Landroid/widget/TextView;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setSubtitle(Ljava/lang/CharSequence;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/ToolbarTitleLayout;->getTitleSubtext()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, p1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setTextAndVisibilityBy(Landroid/widget/TextView;Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|