2020-09-16 23:45:23 +00:00
|
|
|
.class public final Lcom/discord/widgets/chat/input/sticker/StickerPickerViewModel$Companion;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "StickerPickerViewModel.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/chat/input/sticker/StickerPickerViewModel;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = "Companion"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/sticker/StickerPickerViewModel$Companion;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$buildOwnedStickerListItems(Lcom/discord/widgets/chat/input/sticker/StickerPickerViewModel$Companion;Lcom/discord/models/sticker/dto/ModelStickerPack;Ljava/lang/String;ILjava/util/Locale;)Ljava/util/List;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lcom/discord/widgets/chat/input/sticker/StickerPickerViewModel$Companion;->buildOwnedStickerListItems(Lcom/discord/models/sticker/dto/ModelStickerPack;Ljava/lang/String;ILjava/util/Locale;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$buildStoreStickerListItems(Lcom/discord/widgets/chat/input/sticker/StickerPickerViewModel$Companion;Lcom/discord/models/sticker/dto/ModelStickerPack;Ljava/lang/String;ILjava/util/Locale;Lcom/discord/models/domain/ModelUser;ZZ)Ljava/util/List;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct/range {p0 .. p7}, Lcom/discord/widgets/chat/input/sticker/StickerPickerViewModel$Companion;->buildStoreStickerListItems(Lcom/discord/models/sticker/dto/ModelStickerPack;Ljava/lang/String;ILjava/util/Locale;Lcom/discord/models/domain/ModelUser;ZZ)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final buildOwnedStickerListItems(Lcom/discord/models/sticker/dto/ModelStickerPack;Ljava/lang/String;ILjava/util/Locale;)Ljava/util/List;
|
|
|
|
.locals 7
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/models/sticker/dto/ModelStickerPack;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"I",
|
|
|
|
"Ljava/util/Locale;",
|
|
|
|
")",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
sget-object p1, Lk0/i/l;->d:Lk0/i/l;
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderItem;
|
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/widgets/chat/input/sticker/HeaderType$OwnedPackItem;
|
|
|
|
|
|
|
|
invoke-direct {v2, p1}, Lcom/discord/widgets/chat/input/sticker/HeaderType$OwnedPackItem;-><init>(Lcom/discord/models/sticker/dto/ModelStickerPack;)V
|
|
|
|
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/widgets/chat/input/sticker/OwnedHeaderItem;-><init>(Lcom/discord/widgets/chat/input/sticker/HeaderType;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelSticker;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const-string v3, "null cannot be cast to non-null type java.lang.String"
|
|
|
|
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v2, p4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const-string v4, "(this as java.lang.String).toLowerCase(locale)"
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {v2, v4}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x2
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {v2, p2, v5, v6}, Lk0/t/p;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/sticker/dto/ModelSticker;->getDescription()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v2, p4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {v2, v4}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {v2, p2, v5, v6}, Lk0/t/p;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
|
|
|
|
invoke-direct {p1, v3}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_1
|
|
|
|
new-instance v2, Lcom/discord/widgets/chat/input/sticker/StickerItem;
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/widgets/chat/input/sticker/StickerItem$Mode;->OWNED:Lcom/discord/widgets/chat/input/sticker/StickerItem$Mode;
|
|
|
|
|
|
|
|
invoke-direct {v2, v1, p3, v3}, Lcom/discord/widgets/chat/input/sticker/StickerItem;-><init>(Lcom/discord/models/sticker/dto/ModelSticker;ILcom/discord/widgets/chat/input/sticker/StickerItem$Mode;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
|
|
|
|
invoke-direct {p1, v3}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final buildStoreStickerListItems(Lcom/discord/models/sticker/dto/ModelStickerPack;Ljava/lang/String;ILjava/util/Locale;Lcom/discord/models/domain/ModelUser;ZZ)Ljava/util/List;
|
|
|
|
.locals 8
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/models/sticker/dto/ModelStickerPack;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"I",
|
|
|
|
"Ljava/util/Locale;",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
"ZZ)",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
sget-object p1, Lk0/i/l;->d:Lk0/i/l;
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/input/sticker/StoreHeaderItem;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/widgets/chat/input/sticker/StoreHeaderItem;-><init>(Lcom/discord/models/sticker/dto/ModelStickerPack;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/sticker/dto/ModelStickerPack;->getStickers()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x5
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {v1, v2}, Lk0/i/f;->take(Ljava/lang/Iterable;I)Ljava/util/List;
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/models/sticker/dto/ModelSticker;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/sticker/dto/ModelSticker;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-string v4, "null cannot be cast to non-null type java.lang.String"
|
|
|
|
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v3, p4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-string v5, "(this as java.lang.String).toLowerCase(locale)"
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {v3, v5}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x2
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {v3, p2, v6, v7}, Lk0/t/p;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-nez v3, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/sticker/dto/ModelSticker;->getDescription()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v3, p4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {v3, v5}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {v3, p2, v6, v7}, Lk0/t/p;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
|
|
|
|
invoke-direct {p1, v4}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_1
|
|
|
|
new-instance v3, Lcom/discord/widgets/chat/input/sticker/StickerItem;
|
|
|
|
|
|
|
|
sget-object v4, Lcom/discord/widgets/chat/input/sticker/StickerItem$Mode;->STORE:Lcom/discord/widgets/chat/input/sticker/StickerItem$Mode;
|
|
|
|
|
|
|
|
invoke-direct {v3, v2, p3, v4}, Lcom/discord/widgets/chat/input/sticker/StickerItem;-><init>(Lcom/discord/models/sticker/dto/ModelSticker;ILcom/discord/widgets/chat/input/sticker/StickerItem$Mode;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
|
|
|
|
invoke-direct {p1, v4}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
new-instance p2, Lcom/discord/widgets/chat/input/sticker/StoreBuyButtonItem;
|
|
|
|
|
|
|
|
invoke-virtual {p5}, Lcom/discord/models/domain/ModelUser;->getPremiumTier()Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
if-eqz p3, :cond_6
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
sget-object p3, Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;->NONE:Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
const-string p4, "meUser.premiumTier ?: Mo\u2026tionPlan.PremiumTier.NONE"
|
|
|
|
|
2020-09-18 16:51:32 +00:00
|
|
|
invoke-static {p3, p4}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
invoke-direct {p2, p1, p3, p6, p7}, Lcom/discord/widgets/chat/input/sticker/StoreBuyButtonItem;-><init>(Lcom/discord/models/sticker/dto/ModelStickerPack;Lcom/discord/models/domain/ModelSubscriptionPlan$PremiumTier;ZZ)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|