225 lines
6 KiB
Smali
225 lines
6 KiB
Smali
.class public final Lcom/discord/utilities/textprocessing/Spans;
|
|
.super Ljava/lang/Object;
|
|
.source "Spans.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/discord/utilities/textprocessing/Spans;
|
|
|
|
.field public static final MARKDOWN_BULLET_RADIUS:I = 0x8
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/utilities/textprocessing/Spans;
|
|
|
|
invoke-direct {v0}, Lcom/discord/utilities/textprocessing/Spans;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/utilities/textprocessing/Spans;->INSTANCE:Lcom/discord/utilities/textprocessing/Spans;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final createHeaderClassSpanProvider(Landroid/content/Context;)Lkotlin/jvm/functions/Function1;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
")",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/Object;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f0700dc
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v0
|
|
|
|
new-instance v1, Lcom/discord/utilities/textprocessing/Spans$createHeaderClassSpanProvider$1;
|
|
|
|
invoke-direct {v1, p1, v0}, Lcom/discord/utilities/textprocessing/Spans$createHeaderClassSpanProvider$1;-><init>(Landroid/content/Context;I)V
|
|
|
|
return-object v1
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final createHeaderPaddingSpansProvider(Landroid/content/Context;)Lkotlin/jvm/functions/Function0;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
")",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/spans/VerticalPaddingSpan;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f0700db
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
const v1, 0x7f0700d9
|
|
|
|
invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result p1
|
|
|
|
new-instance v1, Lcom/discord/utilities/textprocessing/Spans$createHeaderPaddingSpansProvider$1;
|
|
|
|
invoke-direct {v1, v0, p1}, Lcom/discord/utilities/textprocessing/Spans$createHeaderPaddingSpansProvider$1;-><init>(II)V
|
|
|
|
return-object v1
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final createHeaderStyleSpanProvider(Landroid/content/Context;)Lkotlin/jvm/functions/Function1;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
")",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/lang/Integer;",
|
|
"Landroid/text/style/CharacterStyle;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance v0, Lcom/discord/utilities/textprocessing/Spans$createHeaderStyleSpanProvider$1;
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/utilities/textprocessing/Spans$createHeaderStyleSpanProvider$1;-><init>(Landroid/content/Context;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final createMarkdownBulletSpansProvider(Landroid/content/Context;)Lkotlin/jvm/functions/Function0;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
")",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Ljava/util/List<",
|
|
"Landroid/text/style/ParagraphStyle;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f0700d7
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f06002d
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v1, v2, v3}, Landroidx/core/content/res/ResourcesCompat;->getColor(Landroid/content/res/Resources;ILandroid/content/res/Resources$Theme;)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
const v2, 0x7f0700d8
|
|
|
|
invoke-virtual {p1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result p1
|
|
|
|
new-instance v2, Lcom/discord/utilities/textprocessing/Spans$createMarkdownBulletSpansProvider$1$1;
|
|
|
|
invoke-direct {v2, p1, v0, v1}, Lcom/discord/utilities/textprocessing/Spans$createMarkdownBulletSpansProvider$1$1;-><init>(III)V
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|