189 lines
5.8 KiB
Smali
189 lines
5.8 KiB
Smali
.class public final Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;
|
|
.super Ly/n/c/k;
|
|
.source "StoreStickers.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/stores/StoreStickers;->cacheViewedPurchaseableStickerPacks(Z)V
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ly/n/c/k;",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic $fromChatInput:Z
|
|
|
|
.field public final synthetic this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStickers;Z)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;->this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
iput-boolean p2, p0, Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;->$fromChatInput:Z
|
|
|
|
const/4 p1, 0x0
|
|
|
|
invoke-direct {p0, p1}, Ly/n/c/k;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic invoke()Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;->invoke()V
|
|
|
|
sget-object v0, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final invoke()V
|
|
.locals 5
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;->this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
invoke-static {v0}, Lcom/discord/stores/StoreStickers;->access$getStickersStoreDirectoryLayoutSnapshot$p(Lcom/discord/stores/StoreStickers;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
const/16 v2, 0xa
|
|
|
|
invoke-static {v0, v2}, Lf/h/a/f/f/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/models/sticker/dto/ModelStickerPack;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {v1}, Ly/i/f;->toSet(Ljava/lang/Iterable;)Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;->this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
invoke-static {v1}, Lcom/discord/stores/StoreStickers;->access$getViewedPurchaseablePacksCache$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/utilities/persister/Persister;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/stores/StoreStickers$ViewedPurchaseablePacks;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStickers$ViewedPurchaseablePacks;->getStickerPackIds()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Ly/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
new-instance v2, Lcom/discord/stores/StoreStickers$ViewedPurchaseablePacks;
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;->this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
invoke-static {v3}, Lcom/discord/stores/StoreStickers;->access$getClock$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/utilities/time/Clock;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v2, v0, v3, v4, v1}, Lcom/discord/stores/StoreStickers$ViewedPurchaseablePacks;-><init>(Ljava/util/Set;JZ)V
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;->$fromChatInput:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v3, 0x2
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;->this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
invoke-static {v0}, Lcom/discord/stores/StoreStickers;->access$getViewedPurchaseablePacksCacheChatInput$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/utilities/persister/Persister;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v2, v4, v3, v1}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers$cacheViewedPurchaseableStickerPacks$1;->this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
invoke-static {v0}, Lcom/discord/stores/StoreStickers;->access$getViewedPurchaseablePacksCache$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/utilities/persister/Persister;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v2, v4, v3, v1}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|