2020-09-22 07:09:10 +00:00
|
|
|
.class public final Lcom/discord/views/sticker/StickerView;
|
|
|
|
.super Landroid/widget/FrameLayout;
|
|
|
|
.source "StickerView.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2020-10-05 23:18:16 +00:00
|
|
|
.field public static final synthetic j:[Lkotlin/reflect/KProperty;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
.field public final e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
.field public final f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
.field public g:Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
|
|
|
|
.field public h:Lrx/Subscription;
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
.field public i:Lkotlinx/coroutines/Job;
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
const/4 v0, 0x3
|
|
|
|
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/views/sticker/StickerView;
|
|
|
|
|
|
|
|
const-string v2, "pngImageView"
|
|
|
|
|
|
|
|
const-string v3, "getPngImageView()Landroid/widget/ImageView;"
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
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;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
aput-object v1, v0, v4
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/views/sticker/StickerView;
|
|
|
|
|
|
|
|
const-string v2, "lottieView"
|
|
|
|
|
|
|
|
const-string v3, "getLottieView()Lcom/discord/rlottie/RLottieImageView;"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
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;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/views/sticker/StickerView;
|
|
|
|
|
|
|
|
const-string v2, "placeholder"
|
|
|
|
|
|
|
|
const-string v3, "getPlaceholder()Landroid/view/View;"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
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;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
sput-object v0, Lcom/discord/views/sticker/StickerView;->j:[Lkotlin/reflect/KProperty;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "context"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
|
2020-10-15 16:48:49 +00:00
|
|
|
const p1, 0x7f0a0a18
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p0, p1}, Lc0/j/a;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/views/sticker/StickerView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
2020-10-15 16:48:49 +00:00
|
|
|
const p1, 0x7f0a0a19
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p0, p1}, Lc0/j/a;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/views/sticker/StickerView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
2020-10-15 16:48:49 +00:00
|
|
|
const p1, 0x7f0a0a1a
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p0, p1}, Lc0/j/a;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/views/sticker/StickerView;->f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-10-15 16:48:49 +00:00
|
|
|
const p2, 0x7f0d00ee
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic a(Lcom/discord/views/sticker/StickerView;)Lcom/discord/rlottie/RLottieImageView;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic b(Lcom/discord/views/sticker/StickerView;)Landroid/view/View;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPlaceholder()Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic c(Lcom/discord/views/sticker/StickerView;)Landroid/widget/ImageView;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
.method public static final d(Lcom/discord/views/sticker/StickerView;Ljava/io/File;Z)Lkotlinx/coroutines/Job;
|
2020-09-29 21:44:44 +00:00
|
|
|
.locals 6
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eqz p0, :cond_0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
sget-object v0, Lcom/discord/utilities/apng/ApngUtils;->INSTANCE:Lcom/discord/utilities/apng/ApngUtils;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v2
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
sget-object p0, Lcom/discord/utilities/dsti/StickerUtils;->INSTANCE:Lcom/discord/utilities/dsti/StickerUtils;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/dsti/StickerUtils;->getDEFAULT_STICKER_SIZE_PX()I
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result p0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v3
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
sget-object p0, Lcom/discord/utilities/dsti/StickerUtils;->INSTANCE:Lcom/discord/utilities/dsti/StickerUtils;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/dsti/StickerUtils;->getDEFAULT_STICKER_SIZE_PX()I
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result p0
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
move-object v1, p1
|
|
|
|
|
|
|
|
move v5, p2
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-virtual/range {v0 .. v5}, Lcom/discord/utilities/apng/ApngUtils;->renderApngFromFile(Ljava/io/File;Landroid/widget/ImageView;Ljava/lang/Integer;Ljava/lang/Integer;Z)Lkotlinx/coroutines/Job;
|
2020-10-02 23:02:12 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
2020-09-29 21:44:44 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
throw p0
|
2020-09-22 07:09:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
sget-object v1, Lcom/discord/views/sticker/StickerView;->j:[Lkotlin/reflect/KProperty;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
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/discord/rlottie/RLottieImageView;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getPlaceholder()Landroid/view/View;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
sget-object v1, Lcom/discord/views/sticker/StickerView;->j:[Lkotlin/reflect/KProperty;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
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/view/View;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getPngImageView()Landroid/widget/ImageView;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
sget-object v1, Lcom/discord/views/sticker/StickerView;->j:[Lkotlin/reflect/KProperty;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
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/ImageView;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
.method public static synthetic i(Lcom/discord/views/sticker/StickerView;Lcom/discord/models/sticker/dto/ModelSticker;II)V
|
2020-09-29 21:44:44 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreStream$Companion;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreUserSettings;->getStickerAnimationSettings()Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const-string p3, "StoreStream.getUserSetti\u2026.stickerAnimationSettings"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p2, p3}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-29 21:44:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
:cond_0
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/views/sticker/StickerView;->h(Lcom/discord/models/sticker/dto/ModelSticker;I)V
|
2020-09-29 21:44:44 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
# virtual methods
|
2020-10-05 23:18:16 +00:00
|
|
|
.method public final e()V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->i:Lkotlinx/coroutines/Job;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
invoke-static {v0, v2, v1, v2}, Lc0/j/a;->m(Lkotlinx/coroutines/Job;Ljava/util/concurrent/CancellationException;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroid/widget/ImageView;->clearAnimation()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final f(Lcom/discord/models/sticker/dto/ModelSticker;)Ljava/lang/String;
|
2020-09-28 19:40:16 +00:00
|
|
|
.locals 4
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelSticker;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v3, ", "
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelSticker;->getDescription()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
aput-object p1, v1, v2
|
|
|
|
|
2020-10-15 16:48:49 +00:00
|
|
|
const p1, 0x7f12162f
|
2020-09-28 19:40:16 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "context.getString(\n \u2026ker.description}\"\n )"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-28 19:40:16 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
.method public final g()V
|
2020-09-28 19:40:16 +00:00
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x4
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImportantForAccessibility(I)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImportantForAccessibility(I)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPlaceholder()Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setImportantForAccessibility(I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
.method public final getSubscription()Lrx/Subscription;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->h:Lrx/Subscription;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final h(Lcom/discord/models/sticker/dto/ModelSticker;I)V
|
2020-09-29 21:44:44 +00:00
|
|
|
.locals 13
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const-string v0, "sticker"
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->g:Lcom/discord/models/sticker/dto/ModelSticker;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v1, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v2, 0x1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eqz v0, :cond_1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/sticker/dto/ModelSticker;->getId()J
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-wide v3
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelSticker;->getId()J
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-wide v5
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
cmp-long v0, v3, v5
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-nez v0, :cond_1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->h:Lrx/Subscription;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eqz v0, :cond_0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v0, 0x1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v0, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eqz v0, :cond_1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
2020-09-29 21:44:44 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->g:Lcom/discord/models/sticker/dto/ModelSticker;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v3, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eqz v0, :cond_4
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eqz v0, :cond_2
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/models/sticker/dto/ModelSticker;->getId()J
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-wide v4
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelSticker;->getId()J
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-wide v6
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
cmp-long v0, v4, v6
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eqz v0, :cond_4
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
:cond_2
|
2020-09-29 21:44:44 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->h:Lrx/Subscription;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eqz v0, :cond_3
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
:cond_3
|
2020-09-29 21:44:44 +00:00
|
|
|
iput-object v3, p0, Lcom/discord/views/sticker/StickerView;->h:Lrx/Subscription;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
:cond_4
|
2020-09-29 21:44:44 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/views/sticker/StickerView;->g:Lcom/discord/models/sticker/dto/ModelSticker;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelSticker;->getType()Lcom/discord/models/sticker/dto/ModelSticker$Type;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/16 v4, 0x8
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eq v0, v2, :cond_7
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v5, 0x2
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const-string v6, "context"
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eq v0, v5, :cond_6
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v5, 0x3
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
if-eq v0, v5, :cond_5
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
sget-object v7, Lcom/discord/app/AppLog;->e:Lcom/discord/app/AppLog;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const-string v0, "Invalid Sticker Format passed to "
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const-class v0, Lcom/discord/views/sticker/StickerView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const-string v0, ", type: "
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelSticker;->getType()Lcom/discord/models/sticker/dto/ModelSticker$Type;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object p1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v8
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v9, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v10, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v11, 0x6
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v12, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static/range {v7 .. v12}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
goto/16 :goto_1
|
|
|
|
|
|
|
|
:cond_5
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPlaceholder()Landroid/view/View;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v3}, Landroidx/appcompat/widget/AppCompatImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0}, Landroid/widget/ImageView;->clearAnimation()V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
sget-object v0, Lcom/discord/utilities/dsti/StickerUtils;->INSTANCE:Lcom/discord/utilities/dsti/StickerUtils;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v4
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v4, v6}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v4, p1}, Lcom/discord/utilities/dsti/StickerUtils;->fetchSticker(Landroid/content/Context;Lcom/discord/models/sticker/dto/ModelSticker;)Lrx/Observable;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui(Lrx/Observable;)Lrx/Observable;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const-class v2, Lcom/discord/views/sticker/StickerView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-13 20:45:03 +00:00
|
|
|
new-instance v4, Lf/a/n/o0/d;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-13 20:45:03 +00:00
|
|
|
invoke-direct {v4, p0}, Lf/a/n/o0/d;-><init>(Lcom/discord/views/sticker/StickerView;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-13 20:45:03 +00:00
|
|
|
new-instance v7, Lf/a/n/o0/f;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-13 20:45:03 +00:00
|
|
|
invoke-direct {v7, p0, p2, p1}, Lf/a/n/o0/f;-><init>(Lcom/discord/views/sticker/StickerView;ILcom/discord/models/sticker/dto/ModelSticker;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v3, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v5, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v6, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/16 v8, 0x1a
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v9, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
goto/16 :goto_1
|
|
|
|
|
|
|
|
:cond_6
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPlaceholder()Landroid/view/View;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
sget-object v0, Lcom/discord/utilities/dsti/StickerUtils;->INSTANCE:Lcom/discord/utilities/dsti/StickerUtils;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v4
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v4, v6}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {v0, v4, p1}, Lcom/discord/utilities/dsti/StickerUtils;->fetchSticker(Landroid/content/Context;Lcom/discord/models/sticker/dto/ModelSticker;)Lrx/Observable;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui(Lrx/Observable;)Lrx/Observable;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const-class v2, Lcom/discord/views/sticker/StickerView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-13 20:45:03 +00:00
|
|
|
new-instance v4, Lf/a/n/o0/a;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-13 20:45:03 +00:00
|
|
|
invoke-direct {v4, p0}, Lf/a/n/o0/a;-><init>(Lcom/discord/views/sticker/StickerView;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-13 20:45:03 +00:00
|
|
|
new-instance v7, Lf/a/n/o0/c;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-13 20:45:03 +00:00
|
|
|
invoke-direct {v7, p0, p1, p2}, Lf/a/n/o0/c;-><init>(Lcom/discord/views/sticker/StickerView;Lcom/discord/models/sticker/dto/ModelSticker;I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v3, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v5, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v6, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/16 v8, 0x1a
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v9, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_7
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object p2
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p2, v1}, Landroid/view/View;->setVisibility(I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPlaceholder()Landroid/view/View;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object p2
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p2, v4}, Landroid/view/View;->setVisibility(I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object p2
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p2, v4}, Landroid/view/View;->setVisibility(I)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object p2
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/views/sticker/StickerView;->f(Lcom/discord/models/sticker/dto/ModelSticker;)Ljava/lang/String;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-virtual {p2, v0}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/utilities/dsti/StickerUtils;->INSTANCE:Lcom/discord/utilities/dsti/StickerUtils;
|
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v4, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 p2, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v6, 0x6
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v0, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
move-object v3, p1
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static/range {v2 .. v7}, Lcom/discord/utilities/dsti/StickerUtils;->getCDNAssetUrl$default(Lcom/discord/utilities/dsti/StickerUtils;Lcom/discord/models/sticker/dto/ModelSticker;Ljava/lang/Integer;ZILjava/lang/Object;)Ljava/lang/String;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/16 v8, 0x7c
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move v5, p2
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
move-object v7, v0
|
2020-09-22 07:09:10 +00:00
|
|
|
|
2020-09-29 21:44:44 +00:00
|
|
|
invoke-static/range {v1 .. v9}, 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
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onDetachedFromWindow()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->h:Lrx/Subscription;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/views/sticker/StickerView;->h:Lrx/Subscription;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/views/sticker/StickerView;->g:Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/sticker/dto/ModelSticker;->getType()Lcom/discord/models/sticker/dto/ModelSticker$Type;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_3
|
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_3
|
|
|
|
|
|
|
|
const/4 v1, 0x3
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getLottieView()Lcom/discord/rlottie/RLottieImageView;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/sticker/StickerView;->getPngImageView()Landroid/widget/ImageView;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return-void
|
|
|
|
.end method
|