1257 lines
38 KiB
Smali
1257 lines
38 KiB
Smali
.class public final Lcom/discord/stores/StoreStickers;
|
|
.super Lcom/discord/stores/StoreV2;
|
|
.source "StoreStickers.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/stores/StoreStickers$OwnedStickerPackState;,
|
|
Lcom/discord/stores/StoreStickers$StickerPackState;,
|
|
Lcom/discord/stores/StoreStickers$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/stores/StoreStickers$Companion;
|
|
|
|
.field public static final DEFAULT_STICKER_PACK_PAGE_SIZE:I = 0xa
|
|
|
|
.field public static final MAX_FREQUENTLY_USED_STICKERS:I = 0x14
|
|
|
|
|
|
# instance fields
|
|
.field public final api:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public endOfPages:Z
|
|
|
|
.field public final frecency:Lcom/discord/utilities/media/MediaFrecencyTracker;
|
|
|
|
.field public final frecencyCache:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Lcom/discord/utilities/media/MediaFrecencyTracker;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
.field public ownedStickerPackState:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
.field public ownedStickerPackStateSnapshot:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
.field public final purchasingStickerPacks:Ljava/util/Set;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public stickerPackOffset:I
|
|
|
|
.field public stickerPacks:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/stores/StoreStickers$StickerPackState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public stickerPacksSnapshot:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/stores/StoreStickers$StickerPackState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public stickersSnapshot:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/dsti/dto/ModelDsti;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreStickers$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreStickers$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreStickers;->Companion:Lcom/discord/stores/StoreStickers$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/rest/RestAPI;Lcom/discord/stores/updates/ObservationDeck;)V
|
|
.locals 1
|
|
|
|
const-string v0, "dispatcher"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "api"
|
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "observationDeck"
|
|
|
|
invoke-static {p3, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreV2;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreStickers;->api:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreStickers;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
sget-object p1, Lk0/i/m;->d:Lk0/i/m;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->stickerPacks:Ljava/util/Map;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->stickerPacksSnapshot:Ljava/util/Map;
|
|
|
|
new-instance p1, Ljava/util/LinkedHashSet;
|
|
|
|
invoke-direct {p1}, Ljava/util/LinkedHashSet;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->purchasingStickerPacks:Ljava/util/Set;
|
|
|
|
sget-object p1, Lk0/i/m;->d:Lk0/i/m;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->stickersSnapshot:Ljava/util/Map;
|
|
|
|
sget-object p1, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Uninitialized;->INSTANCE:Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Uninitialized;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->ownedStickerPackState:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->ownedStickerPackStateSnapshot:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Lcom/discord/utilities/media/MediaFrecencyTracker;
|
|
|
|
invoke-direct {p2}, Lcom/discord/utilities/media/MediaFrecencyTracker;-><init>()V
|
|
|
|
const-string p3, "STICKER_HISTORY_V1"
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->frecencyCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/utilities/media/MediaFrecencyTracker;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->frecency:Lcom/discord/utilities/media/MediaFrecencyTracker;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/rest/RestAPI;Lcom/discord/stores/updates/ObservationDeck;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p4, 0x2
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
sget-object p2, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_0
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
invoke-static {}, Lcom/discord/stores/updates/ObservationDeckProvider;->get()Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
move-result-object p3
|
|
|
|
:cond_1
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreStickers;-><init>(Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/rest/RestAPI;Lcom/discord/stores/updates/ObservationDeck;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$fetchStickerPack(Lcom/discord/stores/StoreStickers;J)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreStickers;->fetchStickerPack(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getApi$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/utilities/rest/RestAPI;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStickers;->api:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/stores/Dispatcher;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStickers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getEndOfPages$p(Lcom/discord/stores/StoreStickers;)Z
|
|
.locals 0
|
|
|
|
iget-boolean p0, p0, Lcom/discord/stores/StoreStickers;->endOfPages:Z
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getFrecency$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/utilities/media/MediaFrecencyTracker;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStickers;->frecency:Lcom/discord/utilities/media/MediaFrecencyTracker;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getFrecencyCache$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/utilities/persister/Persister;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStickers;->frecencyCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getOwnedStickerPackState$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStickers;->ownedStickerPackState:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getPurchasingStickerPacks$p(Lcom/discord/stores/StoreStickers;)Ljava/util/Set;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStickers;->purchasingStickerPacks:Ljava/util/Set;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getStickerPackOffset$p(Lcom/discord/stores/StoreStickers;)I
|
|
.locals 0
|
|
|
|
iget p0, p0, Lcom/discord/stores/StoreStickers;->stickerPackOffset:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getStickerPacks$p(Lcom/discord/stores/StoreStickers;)Ljava/util/Map;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStickers;->stickerPacks:Ljava/util/Map;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getStickersSnapshot$p(Lcom/discord/stores/StoreStickers;)Ljava/util/Map;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStickers;->stickersSnapshot:Ljava/util/Map;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$setEndOfPages$p(Lcom/discord/stores/StoreStickers;Z)V
|
|
.locals 0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreStickers;->endOfPages:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setOwnedStickerPackState$p(Lcom/discord/stores/StoreStickers;Lcom/discord/stores/StoreStickers$OwnedStickerPackState;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->ownedStickerPackState:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setStickerPackOffset$p(Lcom/discord/stores/StoreStickers;I)V
|
|
.locals 0
|
|
|
|
iput p1, p0, Lcom/discord/stores/StoreStickers;->stickerPackOffset:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setStickerPacks$p(Lcom/discord/stores/StoreStickers;Ljava/util/Map;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->stickerPacks:Ljava/util/Map;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setStickersSnapshot$p(Lcom/discord/stores/StoreStickers;Ljava/util/Map;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->stickersSnapshot:Ljava/util/Map;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final fetchStickerPack(J)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreStickers$fetchStickerPack$1;
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreStickers$fetchStickerPack$1;-><init>(Lcom/discord/stores/StoreStickers;J)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final claimFreePack(Lcom/discord/models/dsti/dto/ModelDstiPack;)V
|
|
.locals 13
|
|
|
|
const-string v0, "pack"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/dsti/dto/ModelDstiPack;->getStoreListing()Lcom/discord/models/dsti/dto/ModelDstiStoreListing;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/dsti/dto/ModelDstiStoreListing;->getSku()Lcom/discord/models/domain/ModelSku;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSku;->getPrice()Lcom/discord/models/domain/ModelSku$Price;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSku$Price;->getAmount()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/discord/models/dsti/dto/ModelDstiPack;->getStoreListing()Lcom/discord/models/dsti/dto/ModelDstiStoreListing;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/dsti/dto/ModelDstiStoreListing;->getSku()Lcom/discord/models/domain/ModelSku;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSku;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/discord/stores/StoreStickers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v3, Lcom/discord/stores/StoreStickers$claimFreePack$1;
|
|
|
|
invoke-direct {v3, p0, p1}, Lcom/discord/stores/StoreStickers$claimFreePack$1;-><init>(Lcom/discord/stores/StoreStickers;Lcom/discord/models/dsti/dto/ModelDstiPack;)V
|
|
|
|
invoke-virtual {v2, v3}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v4, Lcom/discord/restapi/RestAPIParams$EmptyBody;
|
|
|
|
invoke-direct {v4}, Lcom/discord/restapi/RestAPIParams$EmptyBody;-><init>()V
|
|
|
|
invoke-virtual {v0, v2, v3, v4}, Lcom/discord/utilities/rest/RestAPI;->claimSku(JLcom/discord/restapi/RestAPIParams$EmptyBody;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
invoke-static {v0, v2, v3, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const-class v5, Lcom/discord/stores/StoreStickers;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
new-instance v8, Lcom/discord/stores/StoreStickers$claimFreePack$$inlined$let$lambda$1;
|
|
|
|
invoke-direct {v8, p0, p1}, Lcom/discord/stores/StoreStickers$claimFreePack$$inlined$let$lambda$1;-><init>(Lcom/discord/stores/StoreStickers;Lcom/discord/models/dsti/dto/ModelDstiPack;)V
|
|
|
|
const/4 v9, 0x0
|
|
|
|
new-instance v10, Lcom/discord/stores/StoreStickers$claimFreePack$$inlined$let$lambda$2;
|
|
|
|
invoke-direct {v10, p0, p1}, Lcom/discord/stores/StoreStickers$claimFreePack$$inlined$let$lambda$2;-><init>(Lcom/discord/stores/StoreStickers;Lcom/discord/models/dsti/dto/ModelDstiPack;)V
|
|
|
|
const/16 v11, 0x16
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static/range {v4 .. v12}, 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
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public final fetchOwnedStickerPacks()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreStickers$fetchOwnedStickerPacks$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreStickers$fetchOwnedStickerPacks$1;-><init>(Lcom/discord/stores/StoreStickers;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final fetchStickerPacksForPicker()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreStickers$fetchStickerPacksForPicker$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreStickers$fetchStickerPacksForPicker$1;-><init>(Lcom/discord/stores/StoreStickers;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getOwnedPacks()Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->ownedStickerPackStateSnapshot:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStickerPack(J)Lcom/discord/stores/StoreStickers$StickerPackState;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->stickerPacksSnapshot:Ljava/util/Map;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/stores/StoreStickers$StickerPackState;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getStickerPacks()Ljava/util/Map;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreStickers$StickerPackState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->stickerPacksSnapshot:Ljava/util/Map;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handleNewLoadedStickerPacks(Ljava/util/List;)V
|
|
.locals 5
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/dsti/dto/ModelDstiPack;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "newStickerPacks"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->stickerPacks:Ljava/util/Map;
|
|
|
|
invoke-static {v0}, Lf/h/a/f/e/n/f;->toMutableMap(Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/models/dsti/dto/ModelDstiPack;
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreStickers;->stickerPacks:Ljava/util/Map;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/dsti/dto/ModelDstiPack;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/stores/StoreStickers$StickerPackState;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
instance-of v3, v2, Lcom/discord/stores/StoreStickers$StickerPackState$Loaded;
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
check-cast v2, Lcom/discord/stores/StoreStickers$StickerPackState$Loaded;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreStickers$StickerPackState$Loaded;->getStickerPack()Lcom/discord/models/dsti/dto/ModelDstiPack;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/dsti/dto/ModelDstiPack;->getStoreListing()Lcom/discord/models/dsti/dto/ModelDstiStoreListing;
|
|
|
|
move-result-object v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
:cond_1
|
|
invoke-virtual {v1}, Lcom/discord/models/dsti/dto/ModelDstiPack;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v3, Lcom/discord/stores/StoreStickers$StickerPackState$Loaded;
|
|
|
|
invoke-direct {v3, v1}, Lcom/discord/stores/StoreStickers$StickerPackState$Loaded;-><init>(Lcom/discord/models/dsti/dto/ModelDstiPack;)V
|
|
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v1, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
iput-object v0, p0, Lcom/discord/stores/StoreStickers;->stickerPacks:Ljava/util/Map;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleNewLoadingStickerPacks(Ljava/util/List;)V
|
|
.locals 4
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Long;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "stickerPackIds"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->stickerPacks:Ljava/util/Map;
|
|
|
|
invoke-static {v0}, Lf/h/a/f/e/n/f;->toMutableMap(Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreStickers$StickerPackState$Loading;->INSTANCE:Lcom/discord/stores/StoreStickers$StickerPackState$Loading;
|
|
|
|
move-object v3, v0
|
|
|
|
check-cast v3, Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v3, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iput-object v0, p0, Lcom/discord/stores/StoreStickers;->stickerPacks:Ljava/util/Map;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleNewOwnedStickerPack(Lcom/discord/models/dsti/dto/ModelDstiPack;)V
|
|
.locals 3
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const-string v0, "stickerPack"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->ownedStickerPackState:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
instance-of v1, v0, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
check-cast v0, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;->getOwnedStickerPacks()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lf/h/a/f/e/n/f;->toMutableMap(Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/dsti/dto/ModelDstiPack;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v2, v0
|
|
|
|
check-cast v2, Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v2, v1, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;
|
|
|
|
invoke-direct {p1, v0}, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;-><init>(Ljava/util/Map;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers;->ownedStickerPackState:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
check-cast v0, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-virtual {v0}, Ljava/util/LinkedHashMap;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreStickers;->purchasingStickerPacks:Ljava/util/Set;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v2, v0}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handlePreLogout()V
|
|
.locals 4
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->frecencyCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/persister/Persister;->clear$default(Lcom/discord/utilities/persister/Persister;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handlePurchasingStickerPack(J)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->purchasingStickerPacks:Ljava/util/Set;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handlePurchasingStickerPackFailure(J)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->purchasingStickerPacks:Ljava/util/Set;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final observeFrequentlyUsedStickers()Lrx/Observable;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/dsti/dto/ModelDsti;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreStickers$observeFrequentlyUsedStickers$1;
|
|
|
|
invoke-direct {v4, p0}, Lcom/discord/stores/StoreStickers$observeFrequentlyUsedStickers$1;-><init>(Lcom/discord/stores/StoreStickers;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x6
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final observeOwnedStickerPacks()Lrx/Observable;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/stores/StoreStickers$OwnedStickerPackState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreStickers$observeOwnedStickerPacks$1;
|
|
|
|
invoke-direct {v4, p0}, Lcom/discord/stores/StoreStickers$observeOwnedStickerPacks$1;-><init>(Lcom/discord/stores/StoreStickers;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x6
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final observePurchasingStickerPacks()Lrx/Observable;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreStickers$observePurchasingStickerPacks$1;
|
|
|
|
invoke-direct {v4, p0}, Lcom/discord/stores/StoreStickers$observePurchasingStickerPacks$1;-><init>(Lcom/discord/stores/StoreStickers;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x6
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final observeStickerPack(J)Lrx/Observable;
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/stores/StoreStickers$StickerPackState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreStickers$observeStickerPack$1;
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreStickers$observeStickerPack$1;-><init>(Lcom/discord/stores/StoreStickers;J)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreStickers;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
const/4 v0, 0x1
|
|
|
|
new-array v3, v0, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
aput-object p0, v3, v0
|
|
|
|
new-instance v6, Lcom/discord/stores/StoreStickers$observeStickerPack$2;
|
|
|
|
invoke-direct {v6, p0, p1, p2}, Lcom/discord/stores/StoreStickers$observeStickerPack$2;-><init>(Lcom/discord/stores/StoreStickers;J)V
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v7, 0x6
|
|
|
|
const/4 v8, 0x0
|
|
|
|
invoke-static/range {v2 .. v8}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final observeStickerPacks()Lrx/Observable;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/stores/StoreStickers$StickerPackState;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreStickers$observeStickerPacks$1;
|
|
|
|
invoke-direct {v4, p0}, Lcom/discord/stores/StoreStickers$observeStickerPacks$1;-><init>(Lcom/discord/stores/StoreStickers;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x6
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final onStickerUsed(Lcom/discord/models/dsti/dto/ModelDsti;)V
|
|
.locals 2
|
|
|
|
const-string v0, "sticker"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreStickers$onStickerUsed$1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreStickers$onStickerUsed$1;-><init>(Lcom/discord/stores/StoreStickers;Lcom/discord/models/dsti/dto/ModelDsti;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public snapshotData()V
|
|
.locals 5
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers;->ownedStickerPackState:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
instance-of v1, v0, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;
|
|
|
|
new-instance v2, Ljava/util/HashMap;
|
|
|
|
check-cast v0, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;->getOwnedStickerPacks()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v2, v0}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/stores/StoreStickers$OwnedStickerPackState$Loaded;-><init>(Ljava/util/Map;)V
|
|
|
|
move-object v0, v1
|
|
|
|
:cond_0
|
|
iput-object v0, p0, Lcom/discord/stores/StoreStickers;->ownedStickerPackStateSnapshot:Lcom/discord/stores/StoreStickers$OwnedStickerPackState;
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreStickers;->stickerPacks:Ljava/util/Map;
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreStickers;->stickerPacksSnapshot:Ljava/util/Map;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
instance-of v3, v2, Lcom/discord/stores/StoreStickers$StickerPackState$Loaded;
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
const/16 v2, 0xa
|
|
|
|
invoke-static {v1, v2}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-direct {v0, v3}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_1
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/discord/stores/StoreStickers$StickerPackState$Loaded;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreStickers$StickerPackState$Loaded;->getStickerPack()Lcom/discord/models/dsti/dto/ModelDstiPack;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/dsti/dto/ModelDstiPack;->getStickers()Ljava/util/List;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v0, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-static {v0}, Lf/h/a/f/e/n/f;->flatten(Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v2}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Lf/h/a/f/e/n/f;->mapCapacity(I)I
|
|
|
|
move-result v1
|
|
|
|
const/16 v2, 0x10
|
|
|
|
if-ge v1, v2, :cond_4
|
|
|
|
const/16 v1, 0x10
|
|
|
|
:cond_4
|
|
new-instance v2, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v2, v1}, Ljava/util/LinkedHashMap;-><init>(I)V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_2
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v3, v1
|
|
|
|
check-cast v3, Lcom/discord/models/dsti/dto/ModelDsti;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/dsti/dto/ModelDsti;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
iput-object v2, p0, Lcom/discord/stores/StoreStickers;->stickersSnapshot:Ljava/util/Map;
|
|
|
|
return-void
|
|
.end method
|