274 lines
9 KiB
Smali
274 lines
9 KiB
Smali
.class final Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion$get$2;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetSettingsPremiumGuildSubscription.kt"
|
|
|
|
# interfaces
|
|
.implements Lrx/functions/Func2;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion;->get()Lrx/Observable;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x18
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T1:",
|
|
"Ljava/lang/Object;",
|
|
"T2:",
|
|
"Ljava/lang/Object;",
|
|
"R:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lrx/functions/Func2<",
|
|
"TT1;TT2;TR;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion$get$2;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion$get$2;
|
|
|
|
invoke-direct {v0}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion$get$2;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion$get$2;->INSTANCE:Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion$get$2;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final call(Lkotlin/Pair;Lcom/discord/stores/StoreSubscriptions$SubscriptionsState;)Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/Pair<",
|
|
"+",
|
|
"Lcom/discord/stores/StorePremiumGuildSubscription$State;",
|
|
"+",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
">;>;",
|
|
"Lcom/discord/stores/StoreSubscriptions$SubscriptionsState;",
|
|
")",
|
|
"Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p1, Lkotlin/Pair;->first:Ljava/lang/Object;
|
|
|
|
check-cast v0, Lcom/discord/stores/StorePremiumGuildSubscription$State;
|
|
|
|
iget-object p1, p1, Lkotlin/Pair;->second:Ljava/lang/Object;
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
instance-of v1, v0, Lcom/discord/stores/StorePremiumGuildSubscription$State$Loading;
|
|
|
|
if-nez v1, :cond_a
|
|
|
|
instance-of v1, p2, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Loading;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto/16 :goto_4
|
|
|
|
:cond_0
|
|
instance-of v1, v0, Lcom/discord/stores/StorePremiumGuildSubscription$State$Failure;
|
|
|
|
if-nez v1, :cond_9
|
|
|
|
instance-of v1, p2, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Failure;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
goto/16 :goto_3
|
|
|
|
:cond_1
|
|
instance-of v1, v0, Lcom/discord/stores/StorePremiumGuildSubscription$State$Loaded;
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
instance-of v1, p2, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Loaded;
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
sget-object v1, Lcom/discord/utilities/premium/PremiumGuildSubscriptionUtils;->INSTANCE:Lcom/discord/utilities/premium/PremiumGuildSubscriptionUtils;
|
|
|
|
check-cast p2, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Loaded;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Loaded;->getSubscriptions()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Lcom/discord/utilities/premium/PremiumGuildSubscriptionUtils;->calculateTotalBoostCount(Ljava/util/List;)I
|
|
|
|
move-result v1
|
|
|
|
if-lez v1, :cond_2
|
|
|
|
new-instance v1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Loaded;
|
|
|
|
sget-object v2, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model;->Companion:Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion;
|
|
|
|
check-cast v0, Lcom/discord/stores/StorePremiumGuildSubscription$State$Loaded;
|
|
|
|
invoke-static {v2, v0, p2, p1}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion;->access$createBoostItems(Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion;Lcom/discord/stores/StorePremiumGuildSubscription$State$Loaded;Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Loaded;Ljava/util/Map;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Loaded;-><init>(Ljava/util/List;)V
|
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model;
|
|
|
|
return-object v1
|
|
|
|
:cond_2
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Loaded;->getSubscriptions()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/Iterable;
|
|
|
|
instance-of p2, p1, Ljava/util/Collection;
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
move-object p2, p1
|
|
|
|
check-cast p2, Ljava/util/Collection;
|
|
|
|
invoke-interface {p2}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_7
|
|
|
|
:cond_3
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_4
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_7
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Lcom/discord/models/domain/ModelSubscription;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelSubscription;->getPlanType()Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->PREMIUM_MONTH_TIER_1:Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
if-eq v2, v3, :cond_6
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelSubscription;->getPlanType()Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
move-result-object p2
|
|
|
|
sget-object v2, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->PREMIUM_YEAR_TIER_1:Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
if-ne p2, v2, :cond_5
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
const/4 p2, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
:goto_0
|
|
const/4 p2, 0x1
|
|
|
|
:goto_1
|
|
if-eqz p2, :cond_4
|
|
|
|
goto :goto_2
|
|
|
|
:cond_7
|
|
const/4 v0, 0x0
|
|
|
|
:goto_2
|
|
new-instance p1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$LoadedNotPremiumTier2;
|
|
|
|
invoke-direct {p1, v0}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$LoadedNotPremiumTier2;-><init>(Z)V
|
|
|
|
check-cast p1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model;
|
|
|
|
return-object p1
|
|
|
|
:cond_8
|
|
sget-object p1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Failure;->INSTANCE:Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Failure;
|
|
|
|
check-cast p1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model;
|
|
|
|
return-object p1
|
|
|
|
:cond_9
|
|
:goto_3
|
|
sget-object p1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Failure;->INSTANCE:Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Failure;
|
|
|
|
check-cast p1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model;
|
|
|
|
return-object p1
|
|
|
|
:cond_a
|
|
:goto_4
|
|
sget-object p1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Loading;->INSTANCE:Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Loading;
|
|
|
|
check-cast p1, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final bridge synthetic call(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, Lkotlin/Pair;
|
|
|
|
check-cast p2, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model$Companion$get$2;->call(Lkotlin/Pair;Lcom/discord/stores/StoreSubscriptions$SubscriptionsState;)Lcom/discord/widgets/settings/premium/WidgetSettingsPremiumGuildSubscription$Model;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|