150 lines
3.9 KiB
Smali
150 lines
3.9 KiB
Smali
.class public final Lcom/discord/stores/StoreStickers$observeFrequentlyUsedStickers$1;
|
|
.super Lc0/n/c/j;
|
|
.source "StoreStickers.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/stores/StoreStickers;->observeFrequentlyUsedStickers()Lrx/Observable;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lc0/n/c/j;",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/models/sticker/dto/ModelSticker;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStickers;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStickers$observeFrequentlyUsedStickers$1;->this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
invoke-direct {p0, p1}, Lc0/n/c/j;-><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$observeFrequentlyUsedStickers$1;->invoke()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final invoke()Ljava/util/List;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/sticker/dto/ModelSticker;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStickers$observeFrequentlyUsedStickers$1;->this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
invoke-static {v0}, Lcom/discord/stores/StoreStickers;->access$getFrecencyCache$p(Lcom/discord/stores/StoreStickers;)Lcom/discord/utilities/persister/Persister;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/utilities/frecency/FrecencyTracker;
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v0, v1, v2, v3, v4}, Lcom/discord/utilities/frecency/FrecencyTracker;->getSortedKeys$default(Lcom/discord/utilities/frecency/FrecencyTracker;JILjava/lang/Object;)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_0
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreStickers$observeFrequentlyUsedStickers$1;->this$0:Lcom/discord/stores/StoreStickers;
|
|
|
|
invoke-static {v3}, Lcom/discord/stores/StoreStickers;->access$getStickersSnapshot$p(Lcom/discord/stores/StoreStickers;)Ljava/util/Map;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v3, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/16 v0, 0x14
|
|
|
|
invoke-static {v1, v0}, Lc0/i/f;->take(Ljava/lang/Iterable;I)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|