178 lines
4.4 KiB
Smali
178 lines
4.4 KiB
Smali
.class public final Lcom/discord/utilities/spans/ClickableSpan;
|
|
.super Landroid/text/style/ClickableSpan;
|
|
.source "ClickableSpan.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final color:Ljava/lang/Integer;
|
|
|
|
.field public final onClickListener:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Landroid/view/View;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final onLongPress:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Landroid/view/View;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final underline:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/lang/Integer;ZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Integer;",
|
|
"Z",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Landroid/view/View;",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Landroid/view/View;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-direct {p0}, Landroid/text/style/ClickableSpan;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/spans/ClickableSpan;->color:Ljava/lang/Integer;
|
|
|
|
iput-boolean p2, p0, Lcom/discord/utilities/spans/ClickableSpan;->underline:Z
|
|
|
|
iput-object p3, p0, Lcom/discord/utilities/spans/ClickableSpan;->onLongPress:Lkotlin/jvm/functions/Function1;
|
|
|
|
iput-object p4, p0, Lcom/discord/utilities/spans/ClickableSpan;->onClickListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "onClickListener"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Ljava/lang/Integer;ZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p5, 0x4
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lcom/discord/utilities/spans/ClickableSpan;-><init>(Ljava/lang/Integer;ZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onClick(Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/spans/ClickableSpan;->onClickListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
invoke-interface {v0, p1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "view"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final onLongPress(Landroid/view/View;)Lkotlin/Unit;
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/spans/ClickableSpan;->onLongPress:Lkotlin/jvm/functions/Function1;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v1, p1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
move-object v0, p1
|
|
|
|
check-cast v0, Lkotlin/Unit;
|
|
|
|
:cond_0
|
|
return-object v0
|
|
|
|
:cond_1
|
|
const-string p1, "view"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public updateDrawState(Landroid/text/TextPaint;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-boolean v0, p0, Lcom/discord/utilities/spans/ClickableSpan;->underline:Z
|
|
|
|
invoke-virtual {p1, v0}, Landroid/text/TextPaint;->setUnderlineText(Z)V
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/spans/ClickableSpan;->color:Ljava/lang/Integer;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/text/TextPaint;->setColor(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "drawState"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|