StickerMasksView.smali

.class public Lim/tpelyyftgw/ui/components/StickerMasksView;
.super Landroid/widget/FrameLayout;
.source "StickerMasksView.java"

# interfaces
.implements Lim/tpelyyftgw/messenger/NotificationCenter$NotificationCenterDelegate;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;,
        Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;
    }
.end annotation


# instance fields
.field private currentAccount:I

.field private currentType:I

.field private lastNotifyWidth:I

.field private listener:Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;

.field private recentStickers:[Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "[",
            "Ljava/util/ArrayList<",
            "Lim/tpelyyftgw/tgnet/TLRPC$Document;",
            ">;"
        }
    .end annotation
.end field

.field private recentTabBum:I

.field private scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

.field private stickerSets:[Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "[",
            "Ljava/util/ArrayList<",
            "Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;",
            ">;"
        }
    .end annotation
.end field

.field private stickersEmptyView:Landroid/widget/TextView;

.field private stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

.field private stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

.field private stickersLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;

.field private stickersOnItemClickListener:Lim/tpelyyftgw/ui/components/RecyclerListView$OnItemClickListener;

.field private stickersTabOffset:I


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .registers 14
    .param p1, "context"    # Landroid/content/Context;

    .line 62
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 43
    sget v0, Lim/tpelyyftgw/messenger/UserConfig;->selectedAccount:I

    iput v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    .line 44
    const/4 v0, 0x2

    new-array v1, v0, [Ljava/util/ArrayList;

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    const/4 v3, 0x0

    aput-object v2, v1, v3

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    const/4 v4, 0x1

    aput-object v2, v1, v4

    iput-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickerSets:[Ljava/util/ArrayList;

    .line 45
    new-array v0, v0, [Ljava/util/ArrayList;

    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    aput-object v1, v0, v3

    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    aput-object v1, v0, v4

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentStickers:[Ljava/util/ArrayList;

    .line 46
    iput v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    .line 57
    const/4 v0, -0x2

    iput v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentTabBum:I

    .line 63
    const v0, -0xddddde

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->setBackgroundColor(I)V

    .line 64
    invoke-virtual {p0, v4}, Lim/tpelyyftgw/ui/components/StickerMasksView;->setClickable(Z)V

    .line 66
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v0

    invoke-virtual {v0, v3}, Lim/tpelyyftgw/messenger/MediaDataController;->checkStickers(I)V

    .line 67
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v0

    invoke-virtual {v0, v4}, Lim/tpelyyftgw/messenger/MediaDataController;->checkStickers(I)V

    .line 68
    new-instance v0, Lim/tpelyyftgw/ui/components/StickerMasksView$1;

    invoke-direct {v0, p0, p1}, Lim/tpelyyftgw/ui/components/StickerMasksView$1;-><init>(Lim/tpelyyftgw/ui/components/StickerMasksView;Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    .line 76
    new-instance v1, Landroidx/recyclerview/widget/GridLayoutManager;

    const/4 v2, 0x5

    invoke-direct {v1, p1, v2}, Landroidx/recyclerview/widget/GridLayoutManager;-><init>(Landroid/content/Context;I)V

    iput-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/RecyclerListView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V

    .line 77
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;

    new-instance v1, Lim/tpelyyftgw/ui/components/StickerMasksView$2;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/StickerMasksView$2;-><init>(Lim/tpelyyftgw/ui/components/StickerMasksView;)V

    invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/GridLayoutManager;->setSpanSizeLookup(Landroidx/recyclerview/widget/GridLayoutManager$SpanSizeLookup;)V

    .line 86
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    const/high16 v1, 0x40800000    # 4.0f

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v1

    invoke-virtual {v0, v3, v1, v3, v3}, Lim/tpelyyftgw/ui/components/RecyclerListView;->setPadding(IIII)V

    .line 87
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    invoke-virtual {v0, v3}, Lim/tpelyyftgw/ui/components/RecyclerListView;->setClipToPadding(Z)V

    .line 88
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    new-instance v1, Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    invoke-direct {v1, p0, p1}, Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;-><init>(Lim/tpelyyftgw/ui/components/StickerMasksView;Landroid/content/Context;)V

    iput-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/RecyclerListView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V

    .line 89
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    new-instance v1, Lim/tpelyyftgw/ui/components/-$$Lambda$StickerMasksView$IuqNSvquCoRgT49Y2zR61PNukNw;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$StickerMasksView$IuqNSvquCoRgT49Y2zR61PNukNw;-><init>(Lim/tpelyyftgw/ui/components/StickerMasksView;)V

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/RecyclerListView;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 90
    new-instance v0, Lim/tpelyyftgw/ui/components/-$$Lambda$StickerMasksView$aDGrMaNdigBtw1KNbO2D6SZQH2w;

    invoke-direct {v0, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$StickerMasksView$aDGrMaNdigBtw1KNbO2D6SZQH2w;-><init>(Lim/tpelyyftgw/ui/components/StickerMasksView;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersOnItemClickListener:Lim/tpelyyftgw/ui/components/RecyclerListView$OnItemClickListener;

    .line 105
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    invoke-virtual {v1, v0}, Lim/tpelyyftgw/ui/components/RecyclerListView;->setOnItemClickListener(Lim/tpelyyftgw/ui/components/RecyclerListView$OnItemClickListener;)V

    .line 106
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    const v1, -0xa0909

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/RecyclerListView;->setGlowColor(I)V

    .line 107
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    const/high16 v5, -0x40800000    # -1.0f

    const/high16 v6, -0x40800000    # -1.0f

    const/16 v7, 0x33

    const/4 v8, 0x0

    const/high16 v9, 0x42400000    # 48.0f

    const/4 v10, 0x0

    const/4 v11, 0x0

    invoke-static/range {v5 .. v11}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/components/StickerMasksView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 109
    new-instance v0, Landroid/widget/TextView;

    invoke-direct {v0, p1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersEmptyView:Landroid/widget/TextView;

    .line 110
    const/high16 v1, 0x41900000    # 18.0f

    invoke-virtual {v0, v4, v1}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 111
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersEmptyView:Landroid/widget/TextView;

    const v1, -0x777778

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    .line 112
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersEmptyView:Landroid/widget/TextView;

    const/high16 v5, -0x40000000    # -2.0f

    const/high16 v6, -0x40000000    # -2.0f

    const/16 v7, 0x11

    invoke-static/range {v5 .. v11}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/components/StickerMasksView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 113
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersEmptyView:Landroid/widget/TextView;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/RecyclerListView;->setEmptyView(Landroid/view/View;)V

    .line 115
    new-instance v0, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    invoke-direct {v0, p1}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    .line 116
    const/high16 v1, -0x1000000

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->setBackgroundColor(I)V

    .line 117
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    const/high16 v1, 0x3f800000    # 1.0f

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v2

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->setUnderlineHeight(I)V

    .line 118
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    const v2, -0x9d4018

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->setIndicatorColor(I)V

    .line 119
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    const v2, -0xe5e5e6

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->setUnderlineColor(I)V

    .line 120
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v1

    add-int/2addr v1, v4

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->setIndicatorHeight(I)V

    .line 121
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    const/4 v1, -0x1

    const/16 v2, 0x30

    const/16 v3, 0x33

    invoke-static {v1, v2, v3}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/components/StickerMasksView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 122
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->updateStickerTabs()V

    .line 123
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    new-instance v1, Lim/tpelyyftgw/ui/components/-$$Lambda$StickerMasksView$JVyGqD_S3NArDpRMS8-Wzy06ilg;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$StickerMasksView$JVyGqD_S3NArDpRMS8-Wzy06ilg;-><init>(Lim/tpelyyftgw/ui/components/StickerMasksView;)V

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->setDelegate(Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip$ScrollSlidingTabStripDelegate;)V

    .line 153
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    new-instance v1, Lim/tpelyyftgw/ui/components/StickerMasksView$3;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/StickerMasksView$3;-><init>(Lim/tpelyyftgw/ui/components/StickerMasksView;)V

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/RecyclerListView;->setOnScrollListener(Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;)V

    .line 159
    return-void
.end method

.method static synthetic access$000(Lim/tpelyyftgw/ui/components/StickerMasksView;)Lim/tpelyyftgw/ui/components/RecyclerListView;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 36
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    return-object v0
.end method

.method static synthetic access$100(Lim/tpelyyftgw/ui/components/StickerMasksView;)Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 36
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    return-object v0
.end method

.method static synthetic access$1000(Lim/tpelyyftgw/ui/components/StickerMasksView;)[Ljava/util/ArrayList;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 36
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentStickers:[Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$400(Lim/tpelyyftgw/ui/components/StickerMasksView;)V
    .registers 1
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 36
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->checkScroll()V

    return-void
.end method

.method static synthetic access$500(Lim/tpelyyftgw/ui/components/StickerMasksView;)I
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 36
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentTabBum:I

    return v0
.end method

.method static synthetic access$600(Lim/tpelyyftgw/ui/components/StickerMasksView;)[Ljava/util/ArrayList;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 36
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickerSets:[Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$700(Lim/tpelyyftgw/ui/components/StickerMasksView;)I
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 36
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    return v0
.end method

.method static synthetic access$800(Lim/tpelyyftgw/ui/components/StickerMasksView;)I
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 36
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersTabOffset:I

    return v0
.end method

.method static synthetic access$900(Lim/tpelyyftgw/ui/components/StickerMasksView;)Landroidx/recyclerview/widget/GridLayoutManager;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/StickerMasksView;

    .line 36
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;

    return-object v0
.end method

.method private checkDocuments()V
    .registers 6

    .line 310
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentStickers:[Ljava/util/ArrayList;

    iget v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v0, v0, v1

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    .line 311
    .local v0, "previousCount":I
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentStickers:[Ljava/util/ArrayList;

    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    iget v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v3}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v3

    iget v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/messenger/MediaDataController;->getRecentStickers(I)Ljava/util/ArrayList;

    move-result-object v3

    aput-object v3, v1, v2

    .line 312
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    if-eqz v1, :cond_23

    .line 313
    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;->notifyDataSetChanged()V

    .line 315
    :cond_23
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentStickers:[Ljava/util/ArrayList;

    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v1, v1, v2

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-eq v0, v1, :cond_32

    .line 316
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->updateStickerTabs()V

    .line 318
    :cond_32
    return-void
.end method

.method private checkPanels()V
    .registers 5

    .line 229
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    if-nez v0, :cond_5

    .line 230
    return-void

    .line 232
    :cond_5
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;

    invoke-virtual {v0}, Landroidx/recyclerview/widget/GridLayoutManager;->findFirstVisibleItemPosition()I

    move-result v0

    .line 233
    .local v0, "position":I
    const/4 v1, -0x1

    if-eq v0, v1, :cond_24

    .line 234
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    invoke-virtual {v2, v0}, Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;->getTabForPosition(I)I

    move-result v2

    add-int/lit8 v2, v2, 0x1

    iget v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentTabBum:I

    if-lez v3, :cond_1d

    goto :goto_1f

    :cond_1d
    iget v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersTabOffset:I

    :goto_1f
    add-int/lit8 v3, v3, 0x1

    invoke-virtual {v1, v2, v3}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->onPageScrolled(II)V

    .line 236
    :cond_24
    return-void
.end method

.method private checkScroll()V
    .registers 3

    .line 162
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;

    invoke-virtual {v0}, Landroidx/recyclerview/widget/GridLayoutManager;->findFirstVisibleItemPosition()I

    move-result v0

    .line 163
    .local v0, "firstVisibleItem":I
    const/4 v1, -0x1

    if-ne v0, v1, :cond_a

    .line 164
    return-void

    .line 166
    :cond_a
    invoke-direct {p0, v0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->checkStickersScroll(I)V

    .line 167
    return-void
.end method

.method private checkStickersScroll(I)V
    .registers 5
    .param p1, "firstVisibleItem"    # I

    .line 170
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    if-nez v0, :cond_5

    .line 171
    return-void

    .line 173
    :cond_5
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    invoke-virtual {v1, p1}, Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;->getTabForPosition(I)I

    move-result v1

    add-int/lit8 v1, v1, 0x1

    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentTabBum:I

    if-lez v2, :cond_14

    goto :goto_16

    :cond_14
    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersTabOffset:I

    :goto_16
    add-int/lit8 v2, v2, 0x1

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->onPageScrolled(II)V

    .line 174
    return-void
.end method

.method private reloadStickersAdapter()V
    .registers 2

    .line 263
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    if-eqz v0, :cond_7

    .line 264
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;->notifyDataSetChanged()V

    .line 266
    :cond_7
    invoke-static {}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->getInstance()Lim/tpelyyftgw/ui/ContentPreviewViewer;

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->isVisible()Z

    move-result v0

    if-eqz v0, :cond_18

    .line 267
    invoke-static {}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->getInstance()Lim/tpelyyftgw/ui/ContentPreviewViewer;

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->close()V

    .line 269
    :cond_18
    invoke-static {}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->getInstance()Lim/tpelyyftgw/ui/ContentPreviewViewer;

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->reset()V

    .line 270
    return-void
.end method

.method private updateStickerTabs()V
    .registers 8

    .line 181
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    if-nez v0, :cond_5

    .line 182
    return-void

    .line 184
    :cond_5
    const/4 v1, -0x2

    iput v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentTabBum:I

    .line 186
    const/4 v1, 0x0

    iput v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersTabOffset:I

    .line 187
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->getCurrentPosition()I

    move-result v0

    .line 188
    .local v0, "lastPosition":I
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    invoke-virtual {v2}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->removeTabs()V

    .line 189
    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    const-string v3, "chat_emojiPanelIcon"

    if-nez v2, :cond_44

    .line 190
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v4, 0x7f0814f7

    invoke-static {v4}, Lnp/NPFog;->d(I)I

    move-result v4

    invoke-virtual {v2, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    .line 191
    .local v2, "drawable":Landroid/graphics/drawable/Drawable;
    invoke-static {v2, v3}, Lim/tpelyyftgw/ui/actionbar/Theme;->setDrawableColorByKey(Landroid/graphics/drawable/Drawable;Ljava/lang/String;)V

    .line 192
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    invoke-virtual {v3, v2}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->addIconTab(Landroid/graphics/drawable/Drawable;)Landroid/widget/ImageView;

    .line 193
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersEmptyView:Landroid/widget/TextView;

    const v4, 0x7f0f099a

    const-string v5, "NoStickers"

    invoke-static {v5, v4}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 194
    .end local v2    # "drawable":Landroid/graphics/drawable/Drawable;
    goto :goto_6d

    .line 195
    :cond_44
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v4, 0x7f0814f5

    invoke-static {v4}, Lnp/NPFog;->d(I)I

    move-result v4

    invoke-virtual {v2, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    .line 196
    .restart local v2    # "drawable":Landroid/graphics/drawable/Drawable;
    invoke-static {v2, v3}, Lim/tpelyyftgw/ui/actionbar/Theme;->setDrawableColorByKey(Landroid/graphics/drawable/Drawable;Ljava/lang/String;)V

    .line 197
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    invoke-virtual {v3, v2}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->addIconTab(Landroid/graphics/drawable/Drawable;)Landroid/widget/ImageView;

    .line 198
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersEmptyView:Landroid/widget/TextView;

    const v4, 0x7f0f0976

    const-string v5, "NoMasks"

    invoke-static {v5, v4}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 201
    .end local v2    # "drawable":Landroid/graphics/drawable/Drawable;
    :goto_6d
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentStickers:[Ljava/util/ArrayList;

    iget v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v2, v2, v3

    invoke-virtual {v2}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v2

    if-nez v2, :cond_9d

    .line 202
    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersTabOffset:I

    iput v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentTabBum:I

    .line 203
    add-int/lit8 v2, v2, 0x1

    iput v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersTabOffset:I

    .line 204
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->getContext()Landroid/content/Context;

    move-result-object v3

    const v4, 0x7f080199

    const-string v5, "chat_emojiPanelMasksIcon"

    invoke-static {v5}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v5

    const-string v6, "chat_emojiPanelMasksIconSelected"

    invoke-static {v6}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v6

    invoke-static {v3, v4, v5, v6}, Lim/tpelyyftgw/ui/actionbar/Theme;->createEmojiIconSelectorDrawable(Landroid/content/Context;III)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    invoke-virtual {v2, v3}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->addIconTab(Landroid/graphics/drawable/Drawable;)Landroid/widget/ImageView;

    .line 207
    :cond_9d
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickerSets:[Ljava/util/ArrayList;

    iget v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v2, v2, v3

    invoke-virtual {v2}, Ljava/util/ArrayList;->clear()V

    .line 208
    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v2}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v2

    iget v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    invoke-virtual {v2, v3}, Lim/tpelyyftgw/messenger/MediaDataController;->getStickerSets(I)Ljava/util/ArrayList;

    move-result-object v2

    .line 209
    .local v2, "packs":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;>;"
    const/4 v3, 0x0

    .local v3, "a":I
    :goto_b3
    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-ge v3, v4, :cond_de

    .line 210
    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;

    .line 211
    .local v4, "pack":Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;
    iget-object v5, v4, Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;->set:Lim/tpelyyftgw/tgnet/TLRPC$StickerSet;

    iget-boolean v5, v5, Lim/tpelyyftgw/tgnet/TLRPC$StickerSet;->archived:Z

    if-nez v5, :cond_db

    iget-object v5, v4, Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;->documents:Ljava/util/ArrayList;

    if-eqz v5, :cond_db

    iget-object v5, v4, Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;->documents:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v5

    if-eqz v5, :cond_d2

    .line 212
    goto :goto_db

    .line 214
    :cond_d2
    iget-object v5, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickerSets:[Ljava/util/ArrayList;

    iget v6, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v5, v5, v6

    invoke-virtual {v5, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 209
    .end local v4    # "pack":Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;
    :cond_db
    :goto_db
    add-int/lit8 v3, v3, 0x1

    goto :goto_b3

    .line 216
    .end local v3    # "a":I
    :cond_de
    const/4 v3, 0x0

    .restart local v3    # "a":I
    :goto_df
    iget-object v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickerSets:[Ljava/util/ArrayList;

    iget v5, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v4, v4, v5

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-ge v3, v4, :cond_107

    .line 217
    iget-object v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickerSets:[Ljava/util/ArrayList;

    iget v5, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v4, v4, v5

    invoke-virtual {v4, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;

    .line 218
    .local v4, "set":Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;
    iget-object v5, v4, Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;->documents:Ljava/util/ArrayList;

    invoke-virtual {v5, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lim/tpelyyftgw/tgnet/TLRPC$Document;

    .line 219
    .local v5, "document":Lim/tpelyyftgw/tgnet/TLRPC$Document;
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    invoke-virtual {v6, v5, v5, v4}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->addStickerTab(Lim/tpelyyftgw/tgnet/TLObject;Lim/tpelyyftgw/tgnet/TLRPC$Document;Ljava/lang/Object;)Landroid/view/View;

    .line 216
    .end local v4    # "set":Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;
    .end local v5    # "document":Lim/tpelyyftgw/tgnet/TLRPC$Document;
    add-int/lit8 v3, v3, 0x1

    goto :goto_df

    .line 221
    .end local v3    # "a":I
    :cond_107
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->updateTabStyles()V

    .line 222
    if-eqz v0, :cond_113

    .line 223
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->scrollSlidingTabStrip:Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;

    invoke-virtual {v1, v0, v0}, Lim/tpelyyftgw/ui/components/ScrollSlidingTabStrip;->onPageScrolled(II)V

    .line 225
    :cond_113
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->checkPanels()V

    .line 226
    return-void
.end method


# virtual methods
.method public addRecentSticker(Lim/tpelyyftgw/tgnet/TLRPC$Document;)V
    .registers 10
    .param p1, "document"    # Lim/tpelyyftgw/tgnet/TLRPC$Document;

    .line 239
    if-nez p1, :cond_3

    .line 240
    return-void

    .line 242
    :cond_3
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v1

    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    const/4 v3, 0x0

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    const-wide/16 v6, 0x3e8

    div-long/2addr v4, v6

    long-to-int v5, v4

    const/4 v6, 0x0

    move-object v4, p1

    invoke-virtual/range {v1 .. v6}, Lim/tpelyyftgw/messenger/MediaDataController;->addRecentSticker(ILjava/lang/Object;Lim/tpelyyftgw/tgnet/TLRPC$Document;IZ)V

    .line 243
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentStickers:[Ljava/util/ArrayList;

    iget v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v0, v0, v1

    invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v0

    .line 244
    .local v0, "wasEmpty":Z
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentStickers:[Ljava/util/ArrayList;

    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    iget v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v3}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v3

    iget v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/messenger/MediaDataController;->getRecentStickers(I)Ljava/util/ArrayList;

    move-result-object v3

    aput-object v3, v1, v2

    .line 245
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    if-eqz v1, :cond_3c

    .line 246
    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;->notifyDataSetChanged()V

    .line 248
    :cond_3c
    if-eqz v0, :cond_41

    .line 249
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->updateStickerTabs()V

    .line 251
    :cond_41
    return-void
.end method

.method public varargs didReceivedNotification(II[Ljava/lang/Object;)V
    .registers 7
    .param p1, "id"    # I
    .param p2, "account"    # I
    .param p3, "args"    # [Ljava/lang/Object;

    .line 322
    sget v0, Lim/tpelyyftgw/messenger/NotificationCenter;->stickersDidLoad:I

    const/4 v1, 0x0

    if-ne p1, v0, :cond_1b

    .line 323
    aget-object v0, p3, v1

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    iget v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    if-ne v0, v1, :cond_39

    .line 324
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->updateStickerTabs()V

    .line 325
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->reloadStickersAdapter()V

    .line 326
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->checkPanels()V

    goto :goto_39

    .line 328
    :cond_1b
    sget v0, Lim/tpelyyftgw/messenger/NotificationCenter;->recentDocumentsDidLoad:I

    if-ne p1, v0, :cond_39

    .line 329
    aget-object v0, p3, v1

    check-cast v0, Ljava/lang/Boolean;

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    .line 330
    .local v0, "isGif":Z
    if-nez v0, :cond_39

    const/4 v1, 0x1

    aget-object v1, p3, v1

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    if-ne v1, v2, :cond_39

    .line 331
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->checkDocuments()V

    .line 334
    .end local v0    # "isGif":Z
    :cond_39
    :goto_39
    return-void
.end method

.method public getCurrentType()I
    .registers 2

    .line 177
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    return v0
.end method

.method public synthetic lambda$new$0$StickerMasksView(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .registers 9
    .param p1, "v"    # Landroid/view/View;
    .param p2, "event"    # Landroid/view/MotionEvent;

    .line 89
    invoke-static {}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->getInstance()Lim/tpelyyftgw/ui/ContentPreviewViewer;

    move-result-object v0

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridView:Lim/tpelyyftgw/ui/components/RecyclerListView;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->getMeasuredHeight()I

    move-result v3

    iget-object v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersOnItemClickListener:Lim/tpelyyftgw/ui/components/RecyclerListView$OnItemClickListener;

    const/4 v5, 0x0

    move-object v1, p2

    invoke-virtual/range {v0 .. v5}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->onTouch(Landroid/view/MotionEvent;Lim/tpelyyftgw/ui/components/RecyclerListView;ILjava/lang/Object;Lim/tpelyyftgw/ui/ContentPreviewViewer$ContentPreviewViewerDelegate;)Z

    move-result v0

    return v0
.end method

.method public synthetic lambda$new$1$StickerMasksView(Landroid/view/View;I)V
    .registers 12
    .param p1, "view"    # Landroid/view/View;
    .param p2, "position"    # I

    .line 91
    instance-of v0, p1, Lim/tpelyyftgw/ui/cells/StickerEmojiCell;

    if-nez v0, :cond_5

    .line 92
    return-void

    .line 94
    :cond_5
    invoke-static {}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->getInstance()Lim/tpelyyftgw/ui/ContentPreviewViewer;

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/ContentPreviewViewer;->reset()V

    .line 95
    move-object v0, p1

    check-cast v0, Lim/tpelyyftgw/ui/cells/StickerEmojiCell;

    .line 96
    .local v0, "cell":Lim/tpelyyftgw/ui/cells/StickerEmojiCell;
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/StickerEmojiCell;->isDisabled()Z

    move-result v1

    if-eqz v1, :cond_16

    .line 97
    return-void

    .line 99
    :cond_16
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/StickerEmojiCell;->getSticker()Lim/tpelyyftgw/tgnet/TLRPC$Document;

    move-result-object v1

    .line 100
    .local v1, "document":Lim/tpelyyftgw/tgnet/TLRPC$Document;
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/StickerEmojiCell;->getParentObject()Ljava/lang/Object;

    move-result-object v8

    .line 101
    .local v8, "parent":Ljava/lang/Object;
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->listener:Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;

    invoke-interface {v2, v8, v1}, Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;->onStickerSelected(Ljava/lang/Object;Lim/tpelyyftgw/tgnet/TLRPC$Document;)V

    .line 102
    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v2}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v2

    const/4 v3, 0x1

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    const-wide/16 v6, 0x3e8

    div-long/2addr v4, v6

    long-to-int v6, v4

    const/4 v7, 0x0

    move-object v4, v8

    move-object v5, v1

    invoke-virtual/range {v2 .. v7}, Lim/tpelyyftgw/messenger/MediaDataController;->addRecentSticker(ILjava/lang/Object;Lim/tpelyyftgw/tgnet/TLRPC$Document;IZ)V

    .line 103
    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v2}, Lim/tpelyyftgw/messenger/MessagesController;->getInstance(I)Lim/tpelyyftgw/messenger/MessagesController;

    move-result-object v2

    invoke-virtual {v2, v8, v1, v3}, Lim/tpelyyftgw/messenger/MessagesController;->saveRecentSticker(Ljava/lang/Object;Lim/tpelyyftgw/tgnet/TLRPC$Document;Z)V

    .line 104
    return-void
.end method

.method public synthetic lambda$new$2$StickerMasksView(I)V
    .registers 8
    .param p1, "page"    # I

    .line 124
    const/4 v0, 0x1

    const/4 v1, 0x0

    if-nez p1, :cond_38

    .line 125
    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    if-nez v2, :cond_b

    .line 126
    iput v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    goto :goto_d

    .line 128
    :cond_b
    iput v1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    .line 130
    :goto_d
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->listener:Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;

    if-eqz v0, :cond_14

    .line 131
    invoke-interface {v0}, Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;->onTypeChanged()V

    .line 133
    :cond_14
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentStickers:[Ljava/util/ArrayList;

    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    iget v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v3}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v3

    iget v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/messenger/MediaDataController;->getRecentStickers(I)Ljava/util/ArrayList;

    move-result-object v3

    aput-object v3, v0, v2

    .line 134
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;

    invoke-virtual {v0, v1, v1}, Landroidx/recyclerview/widget/GridLayoutManager;->scrollToPositionWithOffset(II)V

    .line 135
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->updateStickerTabs()V

    .line 136
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->reloadStickersAdapter()V

    .line 137
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->checkDocuments()V

    .line 138
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->checkPanels()V

    .line 139
    return-void

    .line 141
    :cond_38
    iget v2, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->recentTabBum:I

    add-int/2addr v2, v0

    if-ne p1, v2, :cond_43

    .line 142
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;

    invoke-virtual {v0, v1, v1}, Landroidx/recyclerview/widget/GridLayoutManager;->scrollToPositionWithOffset(II)V

    .line 143
    return-void

    .line 145
    :cond_43
    add-int/lit8 v2, p1, -0x1

    iget v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersTabOffset:I

    sub-int/2addr v2, v3

    .line 146
    .local v2, "index":I
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickerSets:[Ljava/util/ArrayList;

    iget v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v3, v3, v4

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v3

    if-lt v2, v3, :cond_60

    .line 147
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickerSets:[Ljava/util/ArrayList;

    iget v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v3, v3, v4

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v3

    add-int/lit8 v2, v3, -0x1

    .line 149
    :cond_60
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;

    iget-object v3, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    iget-object v4, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickerSets:[Ljava/util/ArrayList;

    iget v5, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentType:I

    aget-object v4, v4, v5

    invoke-virtual {v4, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;->getPositionForPack(Lim/tpelyyftgw/tgnet/TLRPC$TL_messages_stickerSet;)I

    move-result v3

    invoke-virtual {v0, v3, v1}, Landroidx/recyclerview/widget/GridLayoutManager;->scrollToPositionWithOffset(II)V

    .line 150
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->checkScroll()V

    .line 151
    return-void
.end method

.method public synthetic lambda$onAttachedToWindow$3$StickerMasksView()V
    .registers 1

    .line 282
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->updateStickerTabs()V

    .line 283
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->reloadStickersAdapter()V

    .line 284
    return-void
.end method

.method protected onAttachedToWindow()V
    .registers 3

    .line 278
    invoke-super {p0}, Landroid/widget/FrameLayout;->onAttachedToWindow()V

    .line 279
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/NotificationCenter;->getInstance(I)Lim/tpelyyftgw/messenger/NotificationCenter;

    move-result-object v0

    sget v1, Lim/tpelyyftgw/messenger/NotificationCenter;->stickersDidLoad:I

    invoke-virtual {v0, p0, v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->addObserver(Ljava/lang/Object;I)V

    .line 280
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/NotificationCenter;->getInstance(I)Lim/tpelyyftgw/messenger/NotificationCenter;

    move-result-object v0

    sget v1, Lim/tpelyyftgw/messenger/NotificationCenter;->recentImagesDidLoad:I

    invoke-virtual {v0, p0, v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->addObserver(Ljava/lang/Object;I)V

    .line 281
    new-instance v0, Lim/tpelyyftgw/ui/components/-$$Lambda$StickerMasksView$qHTw4Iri4DFtkmY3P2B8ajcmVVA;

    invoke-direct {v0, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$StickerMasksView$qHTw4Iri4DFtkmY3P2B8ajcmVVA;-><init>(Lim/tpelyyftgw/ui/components/StickerMasksView;)V

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->runOnUIThread(Ljava/lang/Runnable;)V

    .line 285
    return-void
.end method

.method public onDestroy()V
    .registers 3

    .line 303
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->stickersGridAdapter:Lim/tpelyyftgw/ui/components/StickerMasksView$StickersGridAdapter;

    if-eqz v0, :cond_1a

    .line 304
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/NotificationCenter;->getInstance(I)Lim/tpelyyftgw/messenger/NotificationCenter;

    move-result-object v0

    sget v1, Lim/tpelyyftgw/messenger/NotificationCenter;->stickersDidLoad:I

    invoke-virtual {v0, p0, v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->removeObserver(Ljava/lang/Object;I)V

    .line 305
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/NotificationCenter;->getInstance(I)Lim/tpelyyftgw/messenger/NotificationCenter;

    move-result-object v0

    sget v1, Lim/tpelyyftgw/messenger/NotificationCenter;->recentDocumentsDidLoad:I

    invoke-virtual {v0, p0, v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->removeObserver(Ljava/lang/Object;I)V

    .line 307
    :cond_1a
    return-void
.end method

.method protected onLayout(ZIIII)V
    .registers 8
    .param p1, "changed"    # Z
    .param p2, "left"    # I
    .param p3, "top"    # I
    .param p4, "right"    # I
    .param p5, "bottom"    # I

    .line 255
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->lastNotifyWidth:I

    sub-int v1, p4, p2

    if-eq v0, v1, :cond_d

    .line 256
    sub-int v0, p4, p2

    iput v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->lastNotifyWidth:I

    .line 257
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->reloadStickersAdapter()V

    .line 259
    :cond_d
    invoke-super/range {p0 .. p5}, Landroid/widget/FrameLayout;->onLayout(ZIIII)V

    .line 260
    return-void
.end method

.method public setListener(Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;)V
    .registers 2
    .param p1, "value"    # Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;

    .line 273
    iput-object p1, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->listener:Lim/tpelyyftgw/ui/components/StickerMasksView$Listener;

    .line 274
    return-void
.end method

.method public setVisibility(I)V
    .registers 6
    .param p1, "visibility"    # I

    .line 289
    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 290
    const/16 v0, 0x8

    if-eq p1, v0, :cond_44

    .line 291
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/NotificationCenter;->getInstance(I)Lim/tpelyyftgw/messenger/NotificationCenter;

    move-result-object v0

    sget v1, Lim/tpelyyftgw/messenger/NotificationCenter;->stickersDidLoad:I

    invoke-virtual {v0, p0, v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->addObserver(Ljava/lang/Object;I)V

    .line 292
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/NotificationCenter;->getInstance(I)Lim/tpelyyftgw/messenger/NotificationCenter;

    move-result-object v0

    sget v1, Lim/tpelyyftgw/messenger/NotificationCenter;->recentDocumentsDidLoad:I

    invoke-virtual {v0, p0, v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->addObserver(Ljava/lang/Object;I)V

    .line 293
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->updateStickerTabs()V

    .line 294
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->reloadStickersAdapter()V

    .line 295
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/StickerMasksView;->checkDocuments()V

    .line 296
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    invoke-virtual {v0, v2, v2, v1, v2}, Lim/tpelyyftgw/messenger/MediaDataController;->loadRecents(IZZZ)V

    .line 297
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v0

    invoke-virtual {v0, v1, v2, v1, v2}, Lim/tpelyyftgw/messenger/MediaDataController;->loadRecents(IZZZ)V

    .line 298
    iget v0, p0, Lim/tpelyyftgw/ui/components/StickerMasksView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/MediaDataController;->getInstance(I)Lim/tpelyyftgw/messenger/MediaDataController;

    move-result-object v0

    const/4 v3, 0x2

    invoke-virtual {v0, v3, v2, v1, v2}, Lim/tpelyyftgw/messenger/MediaDataController;->loadRecents(IZZZ)V

    .line 300
    :cond_44
    return-void
.end method