2019-10-01 14:15:45 +00:00
|
|
|
.class public final Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;
|
2019-11-15 02:21:15 +00:00
|
|
|
.super Lcom/discord/app/k;
|
2019-10-01 14:15:45 +00:00
|
|
|
.source "SettingsPremiumViewModel.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState;,
|
|
|
|
Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;,
|
2019-11-15 02:21:15 +00:00
|
|
|
Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;,
|
|
|
|
Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$StoreState;,
|
|
|
|
Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Factory;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/app/k<",
|
|
|
|
"Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState;",
|
|
|
|
">;"
|
2019-10-01 14:15:45 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field private launchPremiumTabStartTimeMs:J
|
|
|
|
|
|
|
|
.field private final requestBuyPlanSubject:Lrx/subjects/PublishSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/PublishSubject<",
|
|
|
|
"Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lrx/Observable;)V
|
|
|
|
.locals 12
|
2019-10-01 14:15:45 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2019-11-15 02:21:15 +00:00
|
|
|
"(",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$StoreState;",
|
|
|
|
">;)V"
|
2019-10-01 14:15:45 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const-string v0, "storeObservable"
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loading;->INSTANCE:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loading;
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-direct {p0, v0}, Lcom/discord/app/k;-><init>(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->KD()Lrx/subjects/PublishSubject;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->requestBuyPlanSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->fetchData()V
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object p1
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-object v0, p0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v0, Lcom/discord/app/AppComponent;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v1, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v2, 0x2
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {p1, v0, v1, v2, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v3
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v4
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
new-instance p1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$1;
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-direct {p1, p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$1;-><init>(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-object v9, p1
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v9, Lkotlin/jvm/functions/Function1;
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v5, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v8, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/16 v10, 0x1e
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v11, 0x0
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static/range {v3 .. v11}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
return-void
|
2019-11-14 21:08:15 +00:00
|
|
|
.end method
|
|
|
|
|
2019-10-01 14:15:45 +00:00
|
|
|
.method public static final synthetic access$fetchData(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->fetchData()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
.method public static final synthetic access$handleStoreState(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$StoreState;)V
|
|
|
|
.locals 0
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->handleStoreState(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$StoreState;)V
|
2019-11-14 21:08:15 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
return-void
|
2019-10-01 14:15:45 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$onCancelError(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->onCancelError()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$onChangePaymentSourceError(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->onChangePaymentSourceError()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$onResubscribeError(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->onResubscribeError()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$onUpgradeError(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->onUpgradeError()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
.method private final fetchData()V
|
|
|
|
.locals 3
|
2019-11-10 14:21:47 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {}, Lcom/discord/stores/StorePaymentSources$Actions;->fetchPaymentSources()V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {}, Lcom/discord/stores/StoreSubscriptions$Actions;->fetchSubscriptions()V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
sget-object v0, Lcom/discord/stores/StoreEntitlements$Actions;->INSTANCE:Lcom/discord/stores/StoreEntitlements$Actions;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const-wide v1, 0x73df54a4a020016L
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/stores/StoreEntitlements$Actions;->fetchMyEntitlementsForApplication(J)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-14 21:08:15 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
.method private final handleStoreState(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$StoreState;)V
|
|
|
|
.locals 14
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$StoreState;->getPaymentSourcesState()Lcom/discord/stores/StorePaymentSources$PaymentSourcesState;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$StoreState;->getSubscriptionsState()Lcom/discord/stores/StoreSubscriptions$SubscriptionsState;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v1
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$StoreState;->getEntitlementState()Lcom/discord/stores/StoreEntitlements$State;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v2
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$StoreState;->getPremiumExperiment()Lcom/discord/models/domain/ModelExperiment;
|
2019-10-31 00:47:18 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object p1
|
2019-10-31 00:47:18 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
instance-of v3, v0, Lcom/discord/stores/StorePaymentSources$PaymentSourcesState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
if-eqz v3, :cond_5
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
instance-of v3, v1, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
if-eqz v3, :cond_5
|
2019-11-10 14:21:47 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
instance-of v3, v2, Lcom/discord/stores/StoreEntitlements$State$Loaded;
|
2019-11-10 14:21:47 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
if-eqz v3, :cond_5
|
2019-11-10 14:21:47 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v1, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Loaded;->getSubscriptions()Ljava/util/List;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v1
|
2019-11-10 14:21:47 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v1, Ljava/lang/Iterable;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result v3
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v5, 0x1
|
|
|
|
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-11-10 14:21:47 +00:00
|
|
|
|
2019-11-14 21:08:15 +00:00
|
|
|
move-result-object v3
|
2019-11-10 14:21:47 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-object v6, v3
|
2019-11-10 14:21:47 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v6, Lcom/discord/models/domain/ModelSubscription;
|
2019-11-10 14:21:47 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelSubscription;->getType()Lcom/discord/models/domain/ModelSubscription$Type;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
sget-object v7, Lcom/discord/models/domain/ModelSubscription$Type;->PREMIUM:Lcom/discord/models/domain/ModelSubscription$Type;
|
|
|
|
|
|
|
|
if-ne v6, v7, :cond_1
|
|
|
|
|
|
|
|
const/4 v6, 0x1
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v6, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
:goto_0
|
2019-11-15 02:21:15 +00:00
|
|
|
if-eqz v6, :cond_0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v3, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
:goto_1
|
2019-11-15 02:21:15 +00:00
|
|
|
move-object v7, v3
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v7, Lcom/discord/models/domain/ModelSubscription;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
new-instance v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v0, Lcom/discord/stores/StorePaymentSources$PaymentSourcesState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StorePaymentSources$PaymentSourcesState$Loaded;->getPaymentSources()Ljava/util/List;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v8
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v9, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v10, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v11, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v2, Lcom/discord/stores/StoreEntitlements$State$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreEntitlements$State$Loaded;->getOwnedEntitlements()Ljava/util/Map;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const-wide v2, 0x73df54a4a020016L
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v2
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-interface {v0, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v0, Ljava/util/List;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
if-nez v0, :cond_3
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {}, Lkotlin/a/m;->emptyList()Ljava/util/List;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
:cond_3
|
2019-11-15 02:21:15 +00:00
|
|
|
move-object v12, v0
|
2019-10-31 00:47:18 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
if-eqz p1, :cond_4
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelExperiment;->getBucket()I
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
move-result p1
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
if-ne p1, v5, :cond_4
|
2019-10-31 00:47:18 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v13, 0x1
|
2019-10-31 00:47:18 +00:00
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_4
|
2019-11-15 02:21:15 +00:00
|
|
|
const/4 v13, 0x0
|
2019-10-31 00:47:18 +00:00
|
|
|
|
|
|
|
:goto_2
|
2019-11-15 02:21:15 +00:00
|
|
|
move-object v6, v1
|
2019-10-31 00:47:18 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-direct/range {v6 .. v13}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;-><init>(Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;Z)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
goto :goto_4
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
:cond_5
|
2019-11-15 02:21:15 +00:00
|
|
|
instance-of p1, v0, Lcom/discord/stores/StorePaymentSources$PaymentSourcesState$Failure;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
if-nez p1, :cond_7
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
instance-of p1, v1, Lcom/discord/stores/StoreSubscriptions$SubscriptionsState$Failure;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
if-eqz p1, :cond_6
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
goto :goto_3
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
:cond_6
|
2019-10-01 14:15:45 +00:00
|
|
|
sget-object p1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loading;->INSTANCE:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loading;
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-object v1, p1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
goto :goto_4
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
:cond_7
|
|
|
|
:goto_3
|
2019-10-01 14:15:45 +00:00
|
|
|
sget-object p1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Failure;->INSTANCE:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Failure;
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
move-object v1, p1
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
:goto_4
|
|
|
|
invoke-virtual {p0, v1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final markBusy()V
|
2019-10-31 00:47:18 +00:00
|
|
|
.locals 11
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v8, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/16 v9, 0x73
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v10}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final onCancelError()V
|
2019-10-31 00:47:18 +00:00
|
|
|
.locals 11
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getDialog()Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
instance-of v0, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$CancelPremium;
|
|
|
|
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$CancelPremium;
|
|
|
|
|
|
|
|
const/4 v6, 0x1
|
|
|
|
|
|
|
|
invoke-direct {v0, v6}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$CancelPremium;-><init>(Z)V
|
|
|
|
|
|
|
|
move-object v6, v0
|
|
|
|
|
|
|
|
check-cast v6, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v8, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/16 v9, 0x6b
|
|
|
|
|
|
|
|
const/4 v10, 0x0
|
2019-10-28 21:46:44 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
invoke-static/range {v1 .. v10}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final onChangePaymentSourceError()V
|
2019-10-31 00:47:18 +00:00
|
|
|
.locals 11
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
sget-object v5, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;->GENERIC:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v8, 0x0
|
2019-10-28 21:46:44 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/16 v9, 0x73
|
|
|
|
|
|
|
|
const/4 v10, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
invoke-static/range {v1 .. v10}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final onDowngradeClicked()V
|
2019-10-31 00:47:18 +00:00
|
|
|
.locals 11
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$DowngradePremium;->INSTANCE:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$DowngradePremium;
|
|
|
|
|
|
|
|
move-object v6, v0
|
|
|
|
|
|
|
|
check-cast v6, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v8, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/16 v9, 0x6f
|
2019-10-28 21:46:44 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v10}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final onResubscribeError()V
|
2019-10-31 00:47:18 +00:00
|
|
|
.locals 11
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
sget-object v5, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;->GENERIC:Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
const/16 v9, 0x73
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v10, 0x0
|
2019-10-28 21:46:44 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
invoke-static/range {v1 .. v10}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final onUpgradeClicked(Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;)V
|
2019-10-31 00:47:18 +00:00
|
|
|
.locals 13
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v3, v0
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$UpgradePremium;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x2
|
|
|
|
|
|
|
|
invoke-direct {v0, p1, v1, v8, v2}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$UpgradePremium;-><init>(Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
move-object v8, v0
|
|
|
|
|
|
|
|
check-cast v8, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
const/16 v11, 0x6f
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v12, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
invoke-static/range {v3 .. v12}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final onUpgradeError()V
|
2019-10-31 00:47:18 +00:00
|
|
|
.locals 13
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v3, v0
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getDialog()Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
instance-of v0, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$UpgradePremium;
|
|
|
|
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getDialog()Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$UpgradePremium;
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-static {v0, v2, v1, v1, v2}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$UpgradePremium;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$UpgradePremium;Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$UpgradePremium;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
move-object v8, v0
|
|
|
|
|
|
|
|
check-cast v8, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
const/16 v11, 0x6b
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v12, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
invoke-static/range {v3 .. v12}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final cancelSubscription()V
|
|
|
|
.locals 4
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getPremiumSubscription()Lcom/discord/models/domain/ModelSubscription;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->markBusy()V
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscription;->getId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Lcom/discord/utilities/rest/RestAPI;->deleteSubscription(Ljava/lang/String;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
invoke-static {v0, v1, v3, v2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {}, Lrx/android/b/a;->Jf()Lrx/Scheduler;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$cancelSubscription$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$cancelSubscription$1;-><init>(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
|
|
|
|
check-cast v1, Lrx/functions/Action1;
|
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$cancelSubscription$2;
|
|
|
|
|
|
|
|
invoke-direct {v2, p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$cancelSubscription$2;-><init>(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
|
|
|
|
check-cast v2, Lrx/functions/Action1;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final changePaymentSource(Lcom/discord/models/domain/ModelPaymentSource;)V
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
const-string v0, "paymentSource"
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getPremiumSubscription()Lcom/discord/models/domain/ModelSubscription;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->markBusy()V
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscription;->getId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v9, Lcom/discord/restapi/RestAPIParams$UpdateSubscription;
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPaymentSource;->getId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
const/4 v7, 0x3
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
move-object v3, v9
|
|
|
|
|
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/discord/restapi/RestAPIParams$UpdateSubscription;-><init>(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0, v9}, Lcom/discord/utilities/rest/RestAPI;->updateSubscription(Ljava/lang/String;Lcom/discord/restapi/RestAPIParams$UpdateSubscription;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-static {p1, v0, v1, v2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {}, Lrx/android/b/a;->Jf()Lrx/Scheduler;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$changePaymentSource$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$changePaymentSource$1;-><init>(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
|
|
|
|
check-cast v0, Lrx/functions/Action1;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$changePaymentSource$2;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$changePaymentSource$2;-><init>(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
|
|
|
|
check-cast v1, Lrx/functions/Action1;
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v1}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getLaunchPremiumTabStartTimeMs()J
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->launchPremiumTabStartTimeMs:J
|
|
|
|
|
|
|
|
return-wide v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getRequestBuyPlanSubject()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->requestBuyPlanSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
const-string v1, "requestBuyPlanSubject"
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
check-cast v0, Lrx/Observable;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final onCancelClicked()V
|
2019-10-31 00:47:18 +00:00
|
|
|
.locals 13
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v3, v0
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$CancelPremium;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, v8, v2}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog$CancelPremium;-><init>(ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
move-object v8, v0
|
|
|
|
|
|
|
|
check-cast v8, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v10, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/16 v11, 0x6f
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v12, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v3 .. v12}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final onDialogDismissClicked()V
|
2019-10-31 00:47:18 +00:00
|
|
|
.locals 11
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/4 v8, 0x0
|
2019-10-28 21:46:44 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
const/16 v9, 0x6f
|
|
|
|
|
|
|
|
const/4 v10, 0x0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-10-31 00:47:18 +00:00
|
|
|
invoke-static/range {v1 .. v10}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelSubscription;Ljava/util/List;ZLcom/discord/widgets/settings/premium/SettingsPremiumViewModel$SubscriptionError;Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$Dialog;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->updateViewState(Ljava/lang/Object;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final onPlanRequested(Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;)V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
const-string v0, "requestedPlanType"
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getPremiumSubscription()Lcom/discord/models/domain/ModelSubscription;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscription;->getPlanType()Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->requestBuyPlanSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Lrx/subjects/PublishSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
if-eq p1, v2, :cond_5
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/utilities/billing/PremiumUtilsKt;->getUPGRADE_ELIGIBILITY()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/util/Set;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
if-ne v0, v1, :cond_4
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->onUpgradeClicked(Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->onDowngradeClicked()V
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final onRetryClicked()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->fetchData()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final resubscribe()V
|
|
|
|
.locals 10
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getPremiumSubscription()Lcom/discord/models/domain/ModelSubscription;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscription;->getStatus()Lcom/discord/models/domain/ModelSubscription$Status;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/models/domain/ModelSubscription$Status;->CANCELED:Lcom/discord/models/domain/ModelSubscription$Status;
|
|
|
|
|
|
|
|
if-eq v1, v3, :cond_3
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->markBusy()V
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscription;->getId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v9, Lcom/discord/restapi/RestAPIParams$UpdateSubscription;
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/models/domain/ModelSubscription$Status;->ACTIVE:Lcom/discord/models/domain/ModelSubscription$Status;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelSubscription$Status;->getIntRepresentation()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x6
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
move-object v3, v9
|
|
|
|
|
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/discord/restapi/RestAPIParams$UpdateSubscription;-><init>(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0, v9}, Lcom/discord/utilities/rest/RestAPI;->updateSubscription(Ljava/lang/String;Lcom/discord/restapi/RestAPIParams$UpdateSubscription;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
invoke-static {v0, v1, v3, v2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {}, Lrx/android/b/a;->Jf()Lrx/Scheduler;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$resubscribe$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$resubscribe$1;-><init>(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
|
|
|
|
check-cast v1, Lrx/functions/Action1;
|
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$resubscribe$2;
|
|
|
|
|
|
|
|
invoke-direct {v2, p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$resubscribe$2;-><init>(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
|
|
|
|
check-cast v2, Lrx/functions/Action1;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final setLaunchPremiumTabStartTimeMs(J)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->launchPremiumTabStartTimeMs:J
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final upgradeSubscription(Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;)V
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
const-string v0, "targetPlanType"
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-10-01 14:15:45 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->getViewState()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$ViewState$Loaded;->getPremiumSubscription()Lcom/discord/models/domain/ModelSubscription;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;->markBusy()V
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelSubscription;->getId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v9, Lcom/discord/restapi/RestAPIParams$UpdateSubscription;
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/models/domain/ModelSubscription$Status;->ACTIVE:Lcom/discord/models/domain/ModelSubscription$Status;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelSubscription$Status;->getIntRepresentation()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelSubscriptionPlan$SubscriptionPlanType;->getPlanTypeString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x4
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
move-object v3, v9
|
|
|
|
|
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/discord/restapi/RestAPIParams$UpdateSubscription;-><init>(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0, v9}, Lcom/discord/utilities/rest/RestAPI;->updateSubscription(Ljava/lang/String;Lcom/discord/restapi/RestAPIParams$UpdateSubscription;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-static {p1, v0, v1, v2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-static {}, Lrx/android/b/a;->Jf()Lrx/Scheduler;
|
2019-10-01 14:15:45 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$upgradeSubscription$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$upgradeSubscription$1;-><init>(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
|
|
|
|
check-cast v0, Lrx/functions/Action1;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$upgradeSubscription$2;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel$upgradeSubscription$2;-><init>(Lcom/discord/widgets/settings/premium/SettingsPremiumViewModel;)V
|
|
|
|
|
|
|
|
check-cast v1, Lrx/functions/Action1;
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v1}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|