36 lines
1.5 KiB
Java
36 lines
1.5 KiB
Java
package com.discord.stores;
|
|
|
|
import com.discord.api.sticker.Sticker;
|
|
import com.discord.utilities.frecency.FrecencyTracker;
|
|
import d0.t.u;
|
|
import d0.z.d.o;
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
import kotlin.jvm.functions.Function0;
|
|
/* compiled from: StoreStickers.kt */
|
|
public final class StoreStickers$observeFrequentlyUsedStickers$1 extends o implements Function0<List<? extends Sticker>> {
|
|
public final /* synthetic */ StoreStickers this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public StoreStickers$observeFrequentlyUsedStickers$1(StoreStickers storeStickers) {
|
|
super(0);
|
|
this.this$0 = storeStickers;
|
|
}
|
|
|
|
/* Return type fixed from 'java.util.List<com.discord.api.sticker.Sticker>' to match base method */
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final List<? extends Sticker> mo1invoke() {
|
|
Collection<String> sortedKeys$default = FrecencyTracker.getSortedKeys$default(StoreStickers.access$getFrecency$p(this.this$0), 0, 1, null);
|
|
ArrayList arrayList = new ArrayList();
|
|
for (String str : sortedKeys$default) {
|
|
Sticker sticker = (Sticker) StoreStickers.access$getStickersSnapshot$p(this.this$0).get(Long.valueOf(Long.parseLong(str)));
|
|
if (sticker != null) {
|
|
arrayList.add(sticker);
|
|
}
|
|
}
|
|
return u.take(arrayList, 20);
|
|
}
|
|
}
|