331 lines
9.1 KiB
Smali
331 lines
9.1 KiB
Smali
.class public final Lcom/discord/views/ToolbarTitleLayout;
|
|
.super Le/a/j/d$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, Ly/u/b/u;
|
|
|
|
const-class v2, Lcom/discord/views/ToolbarTitleLayout;
|
|
|
|
invoke-static {v2}, Ly/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/y/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "title"
|
|
|
|
const-string v4, "getTitle()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Ly/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v2, Ly/u/b/w;->a:Ly/u/b/x;
|
|
|
|
invoke-virtual {v2, v1}, Ly/u/b/x;->property1(Ly/u/b/t;)Ly/y/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-instance v2, Ly/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/views/ToolbarTitleLayout;
|
|
|
|
invoke-static {v3}, Ly/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "titleSubtext"
|
|
|
|
const-string v5, "getTitleSubtext()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ly/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ly/u/b/w;->a:Ly/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ly/u/b/x;->property1(Ly/u/b/t;)Ly/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-instance v2, Ly/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/views/ToolbarTitleLayout;
|
|
|
|
invoke-static {v3}, Ly/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "statusView"
|
|
|
|
const-string v5, "getStatusView()Lcom/discord/views/StatusView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ly/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ly/u/b/w;->a:Ly/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ly/u/b/x;->property1(Ly/u/b/t;)Ly/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/d$b;-><init>(Landroid/content/Context;)V
|
|
|
|
const p1, 0x7f0a08ef
|
|
|
|
invoke-static {p0, p1}, Ly/z/l;->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, 0x7f0a08f0
|
|
|
|
invoke-static {p0, p1}, Ly/z/l;->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, 0x7f0a08ee
|
|
|
|
invoke-static {p0, p1}, Ly/z/l;->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}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private final getStatusView()Lcom/discord/views/StatusView;
|
|
.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, Lcom/discord/views/StatusView;
|
|
|
|
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/d$b;->getInflater()Landroid/view/LayoutInflater;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f0d0116
|
|
|
|
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, Ly/l;
|
|
|
|
const-string v1, "null cannot be cast to non-null type android.view.ViewGroup"
|
|
|
|
invoke-direct {v0, v1}, Ly/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final a(Lcom/discord/models/domain/ModelPresence;Z)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/ToolbarTitleLayout;->getStatusView()Lcom/discord/views/StatusView;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 p2, 0x8
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/ToolbarTitleLayout;->getStatusView()Lcom/discord/views/StatusView;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Lcom/discord/views/StatusView;->setPresence(Lcom/discord/models/domain/ModelPresence;)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}, Ly/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
|