930 lines
31 KiB
Smali
930 lines
31 KiB
Smali
.class public final Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;
|
|
.super Lcom/discord/app/AppBottomSheet;
|
|
.source "WidgetStickerPackStoreSheet.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$Companion;
|
|
|
|
|
|
# instance fields
|
|
.field public adapter:Lcom/discord/widgets/chat/input/sticker/WidgetStickerAdapter;
|
|
|
|
.field public final buy$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final buyPremium$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final container$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final divider$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final recyclerView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public stickerPackId:J
|
|
|
|
.field public viewModel:Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x5
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
const-class v1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;
|
|
|
|
const-string v2, "container"
|
|
|
|
const-string v3, "getContainer()Landroid/view/View;"
|
|
|
|
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/chat/input/sticker/WidgetStickerPackStoreSheet;
|
|
|
|
const-string v2, "recyclerView"
|
|
|
|
const-string v3, "getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;"
|
|
|
|
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/chat/input/sticker/WidgetStickerPackStoreSheet;
|
|
|
|
const-string v2, "buy"
|
|
|
|
const-string v3, "getBuy()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, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;
|
|
|
|
const-string v2, "buyPremium"
|
|
|
|
const-string v3, "getBuyPremium()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/chat/input/sticker/WidgetStickerPackStoreSheet;
|
|
|
|
const-string v2, "divider"
|
|
|
|
const-string v3, "getDivider()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
|
|
|
|
sput-object v0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->Companion:Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppBottomSheet;-><init>()V
|
|
|
|
const v0, 0x7f0a09b7
|
|
|
|
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/chat/input/sticker/WidgetStickerPackStoreSheet;->container$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09b8
|
|
|
|
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/chat/input/sticker/WidgetStickerPackStoreSheet;->recyclerView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09c6
|
|
|
|
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/chat/input/sticker/WidgetStickerPackStoreSheet;->buy$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09c8
|
|
|
|
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/chat/input/sticker/WidgetStickerPackStoreSheet;->buyPremium$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09c7
|
|
|
|
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/chat/input/sticker/WidgetStickerPackStoreSheet;->divider$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
iput-wide v0, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->stickerPackId:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$configureUI(Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->configureUI(Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$onBuyButtonClicked(Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;Lcom/discord/models/sticker/dto/ModelStickerPack;Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->onBuyButtonClicked(Lcom/discord/models/sticker/dto/ModelStickerPack;Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$onStickerItemSelected(Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;Lcom/discord/widgets/chat/input/sticker/StickerItem;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->onStickerItemSelected(Lcom/discord/widgets/chat/input/sticker/StickerItem;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final configureUI(Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;)V
|
|
.locals 8
|
|
|
|
if-eqz p1, :cond_c
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->adapter:Lcom/discord/widgets/chat/input/sticker/WidgetStickerAdapter;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_b
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->getStickerItems()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/widgets/chat/input/expression/WidgetExpressionPickerAdapter;->setData(Ljava/util/List;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuy()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->isBeingPurchased()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/views/LoadingButton;->setIsLoading(Z)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuyPremium()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->isBeingPurchased()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/views/LoadingButton;->setIsLoading(Z)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/dsti/StickerUtils;->INSTANCE:Lcom/discord/utilities/dsti/StickerUtils;
|
|
|
|
sget-object v2, Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;->TIER_2:Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/utilities/dsti/StickerUtils;->getStickerPackPrice(Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "requireContext()"
|
|
|
|
invoke-static {v2, v3}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v0, v2}, Lcom/discord/utilities/billing/PremiumUtilsKt;->getFormattedPrice(ILandroid/content/Context;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->inPremiumTier2()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v4, 0x1
|
|
|
|
const/4 v5, 0x0
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const v6, 0x7f12131e
|
|
|
|
new-array v7, v4, [Ljava/lang/Object;
|
|
|
|
aput-object v0, v7, v5
|
|
|
|
invoke-virtual {v2, v6, v7}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v2, "requireContext().getStri\u2026with_price, premiumPrice)"
|
|
|
|
invoke-static {v0, v2}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuyPremium()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v2, v0}, Lcom/discord/views/LoadingButton;->setText(Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuy()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->isPackOwned()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const v3, 0x7f121575
|
|
|
|
invoke-virtual {v2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->getStickerPack()Lcom/discord/models/sticker/dto/ModelStickerPack;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStoreListing()Lcom/discord/models/sticker/dto/ModelStickerPackStoreListing;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/sticker/dto/ModelStickerPackStoreListing;->getSku()Lcom/discord/models/domain/ModelSku;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelSku;->getPrice()Lcom/discord/models/domain/ModelSku$Price;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelSku$Price;->getAmount()I
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const v3, 0x7f120149
|
|
|
|
invoke-virtual {v2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
sget-object v2, Lcom/discord/utilities/dsti/StickerUtils;->INSTANCE:Lcom/discord/utilities/dsti/StickerUtils;
|
|
|
|
sget-object v6, Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;->NONE:Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;
|
|
|
|
invoke-virtual {v2, v6}, Lcom/discord/utilities/dsti/StickerUtils;->getStickerPackPrice(Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;)I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v6, v3}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v2, v6}, Lcom/discord/utilities/billing/PremiumUtilsKt;->getFormattedPrice(ILandroid/content/Context;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_1
|
|
invoke-virtual {v0, v2}, Lcom/discord/views/LoadingButton;->setText(Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuyPremium()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/widget/FrameLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_a
|
|
|
|
check-cast v0, Landroid/widget/LinearLayout$LayoutParams;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->inPremiumTier2()Z
|
|
|
|
move-result v2
|
|
|
|
const/16 v3, 0x8
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
invoke-static {v3}, Lcom/discord/utilities/dimen/DimenUtils;->dpToPixels(I)I
|
|
|
|
move-result v2
|
|
|
|
:goto_2
|
|
invoke-virtual {v0, v2}, Landroid/widget/LinearLayout$LayoutParams;->setMarginEnd(I)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->inPremiumTier2()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v6, 0x0
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
const/high16 v2, 0x3f800000 # 1.0f
|
|
|
|
:goto_3
|
|
iput v2, v0, Landroid/widget/LinearLayout$LayoutParams;->weight:F
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuyPremium()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v0}, Landroid/widget/FrameLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuyPremium()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->isPackOwned()Z
|
|
|
|
move-result v2
|
|
|
|
xor-int/2addr v2, v4
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
const/16 v2, 0x8
|
|
|
|
:goto_4
|
|
invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuy()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->inPremiumTier2()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->isPackOwned()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
goto :goto_5
|
|
|
|
:cond_6
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
:goto_5
|
|
const/4 v2, 0x1
|
|
|
|
:goto_6
|
|
if-eqz v2, :cond_8
|
|
|
|
goto :goto_7
|
|
|
|
:cond_8
|
|
const/16 v5, 0x8
|
|
|
|
:goto_7
|
|
invoke-virtual {v0, v5}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuy()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->isPackOwned()Z
|
|
|
|
move-result v2
|
|
|
|
xor-int/2addr v2, v4
|
|
|
|
const/4 v3, 0x2
|
|
|
|
invoke-static {v0, v2, v6, v3, v1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setEnabledAlpha$default(Landroid/view/View;ZFILjava/lang/Object;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;->isPackOwned()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_9
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuy()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$configureUI$1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$configureUI$1;-><init>(Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuyPremium()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$configureUI$2;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$configureUI$2;-><init>(Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$ViewState;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
goto :goto_8
|
|
|
|
:cond_9
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuy()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v1}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getBuyPremium()Lcom/discord/views/LoadingButton;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v1}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
goto :goto_8
|
|
|
|
:cond_a
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
const-string v0, "null cannot be cast to non-null type android.widget.LinearLayout.LayoutParams"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_b
|
|
const-string p1, "adapter"
|
|
|
|
invoke-static {p1}, Lc0/n/c/i;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_c
|
|
:goto_8
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getAdditionalBottomPaddingPx()I
|
|
.locals 2
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1d
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
const/16 v0, 0x8
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/dimen/DimenUtils;->dpToPixels(I)I
|
|
|
|
move-result v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private final getBuy()Lcom/discord/views/LoadingButton;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->buy$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->$$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, Lcom/discord/views/LoadingButton;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getBuyPremium()Lcom/discord/views/LoadingButton;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->buyPremium$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->$$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 getContainer()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->container$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->$$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/view/View;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getDivider()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->divider$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->$$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 private final getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->recyclerView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->$$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, Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final onBuyButtonClicked(Lcom/discord/models/sticker/dto/ModelStickerPack;Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final onStickerItemSelected(Lcom/discord/widgets/chat/input/sticker/StickerItem;)V
|
|
.locals 3
|
|
|
|
sget-object v0, Lcom/discord/widgets/chat/input/sticker/StickerFullSizeDialog;->Companion:Lcom/discord/widgets/chat/input/sticker/StickerFullSizeDialog$Companion;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getChildFragmentManager()Landroidx/fragment/app/FragmentManager;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "childFragmentManager"
|
|
|
|
invoke-static {v1, v2}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerItem;->getSticker()Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, v1, p1}, Lcom/discord/widgets/chat/input/sticker/StickerFullSizeDialog$Companion;->show(Landroidx/fragment/app/FragmentManager;Lcom/discord/models/sticker/dto/ModelSticker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final show(Landroidx/fragment/app/FragmentManager;J)V
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->Companion:Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$Companion;
|
|
|
|
invoke-virtual {v0, p0, p1, p2}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$Companion;->show(Landroidx/fragment/app/FragmentManager;J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d0294
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onCreate(Landroid/os/Bundle;)V
|
|
.locals 9
|
|
|
|
invoke-super {p0, p1}, Landroidx/fragment/app/DialogFragment;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string v0, "com.discord.intent.EXTRA_STICKER_PACK_ID"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Bundle;->getLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v5
|
|
|
|
iput-wide v5, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->stickerPackId:J
|
|
|
|
new-instance p1, Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$Factory;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v7, 0x7
|
|
|
|
const/4 v8, 0x0
|
|
|
|
move-object v1, v0
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel$Factory;-><init>(Lcom/discord/stores/StoreStickers;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreUser;JILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
invoke-direct {p1, p0, v0}, Landroidx/lifecycle/ViewModelProvider;-><init>(Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/lifecycle/ViewModelProvider$Factory;)V
|
|
|
|
const-class v0, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel;
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/lifecycle/ViewModelProvider;->get(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "ViewModelProvider(\n \u2026eetViewModel::class.java)"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->viewModel:Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
|
|
.locals 10
|
|
|
|
const-string/jumbo v0, "view"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/app/AppBottomSheet;->onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getContainer()Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getAdditionalBottomPaddingPx()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getPaddingLeft()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getPaddingTop()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getPaddingRight()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p1, v0, v1, v2, p2}, Landroid/view/View;->setPadding(IIII)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getDivider()Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 p2, 0x8
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
new-instance p1, Lcom/discord/widgets/chat/input/sticker/WidgetStickerAdapter;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v2, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$onViewCreated$1;
|
|
|
|
invoke-direct {v2, p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$onViewCreated$1;-><init>(Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p1
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->adapter:Lcom/discord/widgets/chat/input/sticker/WidgetStickerAdapter;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->viewModel:Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel;
|
|
|
|
const/4 p2, 0x0
|
|
|
|
const-string/jumbo v0, "viewModel"
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
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 v1
|
|
|
|
const-class v2, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$onViewCreated$2;
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet$onViewCreated$2;-><init>(Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;)V
|
|
|
|
const/16 v8, 0x1e
|
|
|
|
const/4 v9, 0x0
|
|
|
|
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
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/sticker/WidgetStickerPackStoreSheet;->viewModel:Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/sticker/StickerPackStoreSheetViewModel;->fetchStickersData()V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-static {v0}, Lc0/n/c/i;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
:cond_1
|
|
invoke-static {v0}, Lc0/n/c/i;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
.end method
|