973 lines
31 KiB
Smali
973 lines
31 KiB
Smali
.class public final Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
.super Lcom/discord/app/AppBottomSheet;
|
|
.source "WidgetStickerSheet.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/stickers/WidgetStickerSheet$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/stickers/WidgetStickerSheet$Companion;
|
|
|
|
.field public static final STICKERS_PER_PACK_SHOWN:I = 0x4
|
|
|
|
|
|
# instance fields
|
|
.field public final buyButton$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final infoTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final nameTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final stickerView1$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final stickerView2$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final stickerView3$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final stickerView4$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final stickersContainer$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final viewButton$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public viewModel:Lcom/discord/widgets/stickers/StickerSheetViewModel;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const/16 v0, 0x9
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const-string v2, "nameTv"
|
|
|
|
const-string v3, "getNameTv()Landroid/widget/TextView;"
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lc0/n/c/r;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v4
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const-string v2, "infoTv"
|
|
|
|
const-string v3, "getInfoTv()Landroid/widget/TextView;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lc0/n/c/r;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const-string v2, "stickersContainer"
|
|
|
|
const-string v3, "getStickersContainer()Landroid/widget/LinearLayout;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lc0/n/c/r;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const-string v2, "buyButton"
|
|
|
|
const-string v3, "getBuyButton()Lcom/discord/views/LoadingButton;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lc0/n/c/r;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const-string v2, "viewButton"
|
|
|
|
const-string v3, "getViewButton()Landroid/view/View;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lc0/n/c/r;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x4
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const-string v2, "stickerView1"
|
|
|
|
const-string v3, "getStickerView1()Lcom/discord/views/sticker/StickerView;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lc0/n/c/r;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x5
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const-string v2, "stickerView2"
|
|
|
|
const-string v3, "getStickerView2()Lcom/discord/views/sticker/StickerView;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lc0/n/c/r;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x6
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const-string v2, "stickerView3"
|
|
|
|
const-string v3, "getStickerView3()Lcom/discord/views/sticker/StickerView;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lc0/n/c/r;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x7
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const-string v2, "stickerView4"
|
|
|
|
const-string v3, "getStickerView4()Lcom/discord/views/sticker/StickerView;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lc0/n/c/r;
|
|
|
|
move-result-object v1
|
|
|
|
const/16 v2, 0x8
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v0, Lcom/discord/widgets/stickers/WidgetStickerSheet$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/stickers/WidgetStickerSheet$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->Companion:Lcom/discord/widgets/stickers/WidgetStickerSheet$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppBottomSheet;-><init>()V
|
|
|
|
const v0, 0x7f0a09e7
|
|
|
|
invoke-static {p0, v0}, Lc0/j/a;->h(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->nameTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09e6
|
|
|
|
invoke-static {p0, v0}, Lc0/j/a;->h(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->infoTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09e9
|
|
|
|
invoke-static {p0, v0}, Lc0/j/a;->h(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickersContainer$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09e5
|
|
|
|
invoke-static {p0, v0}, Lc0/j/a;->h(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->buyButton$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09ea
|
|
|
|
invoke-static {p0, v0}, Lc0/j/a;->h(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->viewButton$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09f5
|
|
|
|
invoke-static {p0, v0}, Lc0/j/a;->h(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickerView1$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09f6
|
|
|
|
invoke-static {p0, v0}, Lc0/j/a;->h(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickerView2$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09f7
|
|
|
|
invoke-static {p0, v0}, Lc0/j/a;->h(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickerView3$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09f8
|
|
|
|
invoke-static {p0, v0}, Lc0/j/a;->h(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickerView4$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$configureUI(Lcom/discord/widgets/stickers/WidgetStickerSheet;Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->configureUI(Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final configureUI(Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;)V
|
|
.locals 18
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;->component1()Lcom/discord/models/sticker/dto/ModelStickerPack;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;->component2()Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;->component3()Z
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;->component4()Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;->component5()Ljava/lang/Boolean;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getNameTv()Landroid/widget/TextView;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/sticker/dto/ModelSticker;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v6, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;->isUserPremiumTier2()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v6, 0x4
|
|
|
|
const/4 v7, 0x2
|
|
|
|
const-string v8, "requireContext()"
|
|
|
|
const/4 v9, 0x1
|
|
|
|
const/4 v10, 0x0
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-static {v11, v8}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v2, 0x7f121591
|
|
|
|
new-array v12, v9, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
aput-object v13, v12, v10
|
|
|
|
invoke-virtual {v0, v2, v12}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
const-string v2, "getString(R.string.stick\u2026remium, stickerPack.name)"
|
|
|
|
invoke-static {v12, v2}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v13, Lcom/discord/widgets/stickers/WidgetStickerSheet$configureUI$infoText$1;->INSTANCE:Lcom/discord/widgets/stickers/WidgetStickerSheet$configureUI$infoText$1;
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x18
|
|
|
|
const/16 v17, 0x0
|
|
|
|
invoke-static/range {v11 .. v17}, Lcom/discord/utilities/textprocessing/Parsers;->parseMaskedLinks$default(Landroid/content/Context;Ljava/lang/CharSequence;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual/range {p0 .. p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-static {v11, v8}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const v2, 0x7f121590
|
|
|
|
new-array v12, v7, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
aput-object v13, v12, v10
|
|
|
|
sget-object v13, Lcom/discord/utilities/dsti/StickerUtils;->INSTANCE:Lcom/discord/utilities/dsti/StickerUtils;
|
|
|
|
invoke-virtual {v13}, Lcom/discord/utilities/dsti/StickerUtils;->calculatePremiumStickerPackDiscount()I
|
|
|
|
move-result v13
|
|
|
|
invoke-static {v13}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
aput-object v13, v12, v9
|
|
|
|
invoke-virtual {v0, v2, v12}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v12, "getString(\n \u2026().toString()\n )"
|
|
|
|
invoke-static {v2, v12}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v12, "onClick"
|
|
|
|
const-string v13, "https://discord.com"
|
|
|
|
invoke-static {v2, v12, v13, v10, v6}, Lc0/t/k;->replace$default(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
sget-object v13, Lcom/discord/widgets/stickers/WidgetStickerSheet$configureUI$infoText$2;->INSTANCE:Lcom/discord/widgets/stickers/WidgetStickerSheet$configureUI$infoText$2;
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x18
|
|
|
|
const/16 v17, 0x0
|
|
|
|
invoke-static/range {v11 .. v17}, Lcom/discord/utilities/textprocessing/Parsers;->parseMaskedLinks$default(Landroid/content/Context;Ljava/lang/CharSequence;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function1;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_0
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/stickers/StickerSheetViewModel$ViewState;->isUserPremiumTier2()Z
|
|
|
|
move-result v11
|
|
|
|
if-nez v11, :cond_1
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getInfoTv()Landroid/widget/TextView;
|
|
|
|
move-result-object v11
|
|
|
|
new-instance v12, Lcom/discord/widgets/stickers/WidgetStickerSheet$configureUI$1;
|
|
|
|
invoke-direct {v12, v0}, Lcom/discord/widgets/stickers/WidgetStickerSheet$configureUI$1;-><init>(Lcom/discord/widgets/stickers/WidgetStickerSheet;)V
|
|
|
|
invoke-virtual {v11, v12}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_1
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getInfoTv()Landroid/widget/TextView;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-virtual {v11, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->size()I
|
|
|
|
move-result v2
|
|
|
|
if-lt v2, v6, :cond_2
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getStickerView1()Lcom/discord/views/sticker/StickerView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v6, v10}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
invoke-virtual {v2, v6, v10}, Lcom/discord/views/sticker/StickerView;->d(Lcom/discord/models/sticker/dto/ModelSticker;I)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getStickerView2()Lcom/discord/views/sticker/StickerView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v6, v9}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
invoke-virtual {v2, v6, v10}, Lcom/discord/views/sticker/StickerView;->d(Lcom/discord/models/sticker/dto/ModelSticker;I)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getStickerView3()Lcom/discord/views/sticker/StickerView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
invoke-virtual {v2, v6, v10}, Lcom/discord/views/sticker/StickerView;->d(Lcom/discord/models/sticker/dto/ModelSticker;I)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getStickerView4()Lcom/discord/views/sticker/StickerView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v7, 0x3
|
|
|
|
invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
invoke-virtual {v2, v6, v10}, Lcom/discord/views/sticker/StickerView;->d(Lcom/discord/models/sticker/dto/ModelSticker;I)V
|
|
|
|
:cond_2
|
|
sget-object v2, Lcom/discord/utilities/dsti/StickerUtils;->INSTANCE:Lcom/discord/utilities/dsti/StickerUtils;
|
|
|
|
invoke-virtual {v2, v4}, Lcom/discord/utilities/dsti/StickerUtils;->getStickerPackPrice(Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;)I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v4, v8}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v2, v4}, Lcom/discord/utilities/billing/PremiumUtilsKt;->getFormattedPrice(ILandroid/content/Context;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getBuyButton()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v4, v2}, Lcom/discord/views/LoadingButton;->setText(Ljava/lang/String;)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getBuyButton()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v3}, Lcom/discord/views/LoadingButton;->setIsLoading(Z)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getBuyButton()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
|
|
|
invoke-static {v5, v3}, Lc0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
const/16 v4, 0x8
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
const/4 v3, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/16 v3, 0x8
|
|
|
|
:goto_1
|
|
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getViewButton()Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
invoke-static {v5, v3}, Lc0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_5
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->canBePurchased()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
const/4 v9, 0x0
|
|
|
|
:cond_5
|
|
:goto_2
|
|
if-eqz v9, :cond_6
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
const/16 v10, 0x8
|
|
|
|
:goto_3
|
|
invoke-virtual {v2, v10}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet;->getViewButton()Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/widgets/stickers/WidgetStickerSheet$configureUI$2;->INSTANCE:Lcom/discord/widgets/stickers/WidgetStickerSheet$configureUI$2;
|
|
|
|
invoke-virtual {v1, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getBuyButton()Lcom/discord/views/LoadingButton;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->buyButton$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
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/LoadingButton;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getInfoTv()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->infoTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[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
|
|
|
|
.method private final getNameTv()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->nameTv$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[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 getStickerView1()Lcom/discord/views/sticker/StickerView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickerView1$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x5
|
|
|
|
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/sticker/StickerView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getStickerView2()Lcom/discord/views/sticker/StickerView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickerView2$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x6
|
|
|
|
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/sticker/StickerView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getStickerView3()Lcom/discord/views/sticker/StickerView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickerView3$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x7
|
|
|
|
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/sticker/StickerView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getStickerView4()Lcom/discord/views/sticker/StickerView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickerView4$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/16 v2, 0x8
|
|
|
|
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/sticker/StickerView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getStickersContainer()Landroid/widget/LinearLayout;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->stickersContainer$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[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/LinearLayout;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getViewButton()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->viewButton$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
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 public static final show(Landroidx/fragment/app/FragmentManager;Lcom/discord/models/sticker/dto/ModelSticker;)V
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->Companion:Lcom/discord/widgets/stickers/WidgetStickerSheet$Companion;
|
|
|
|
invoke-virtual {v0, p0, p1}, Lcom/discord/widgets/stickers/WidgetStickerSheet$Companion;->show(Landroidx/fragment/app/FragmentManager;Lcom/discord/models/sticker/dto/ModelSticker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bindSubscriptions(Lrx/subscriptions/CompositeSubscription;)V
|
|
.locals 9
|
|
|
|
const-string v0, "compositeSubscription"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->viewModel:Lcom/discord/widgets/stickers/StickerSheetViewModel;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lf/a/b/q0;->observeViewState()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, p0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->bindToComponentLifecycle(Lrx/Observable;Lcom/discord/app/AppComponent;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string p1, "viewModel\n .obser\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {v0, p1}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/WidgetStickerSheet;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
new-instance v6, Lcom/discord/widgets/stickers/WidgetStickerSheet$bindSubscriptions$1;
|
|
|
|
invoke-direct {v6, p0}, Lcom/discord/widgets/stickers/WidgetStickerSheet$bindSubscriptions$1;-><init>(Lcom/discord/widgets/stickers/WidgetStickerSheet;)V
|
|
|
|
const/16 v7, 0x1e
|
|
|
|
const/4 v8, 0x0
|
|
|
|
invoke-static/range {v0 .. v8}, 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
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "viewModel"
|
|
|
|
invoke-static {p1}, Lc0/n/c/i;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d029f
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
|
|
.locals 8
|
|
|
|
const-string v0, "inflater"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v2, "com.discord.intent.extra.EXTRA_STICKER"
|
|
|
|
invoke-virtual {v0, v2}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
instance-of v2, v0, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
move-object v0, v1
|
|
|
|
:cond_1
|
|
move-object v5, v0
|
|
|
|
check-cast v5, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
if-nez v5, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppBottomSheet;->dismiss()V
|
|
|
|
return-object v1
|
|
|
|
:cond_2
|
|
new-instance v0, Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
new-instance v1, Lcom/discord/widgets/stickers/StickerSheetViewModel$Factory;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v6, 0x3
|
|
|
|
const/4 v7, 0x0
|
|
|
|
move-object v2, v1
|
|
|
|
invoke-direct/range {v2 .. v7}, Lcom/discord/widgets/stickers/StickerSheetViewModel$Factory;-><init>(Lcom/discord/stores/StoreStickers;Lcom/discord/stores/StoreUser;Lcom/discord/models/sticker/dto/ModelSticker;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
invoke-direct {v0, p0, v1}, Landroidx/lifecycle/ViewModelProvider;-><init>(Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/lifecycle/ViewModelProvider$Factory;)V
|
|
|
|
const-class v1, Lcom/discord/widgets/stickers/StickerSheetViewModel;
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/lifecycle/ViewModelProvider;->get(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "ViewModelProvider(\n \u2026eetViewModel::class.java)"
|
|
|
|
invoke-static {v0, v1}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast v0, Lcom/discord/widgets/stickers/StickerSheetViewModel;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/stickers/WidgetStickerSheet;->viewModel:Lcom/discord/widgets/stickers/StickerSheetViewModel;
|
|
|
|
invoke-super {p0, p1, p2, p3}, Lcom/discord/app/AppBottomSheet;->onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|