2020-09-23 03:12:49 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreGooglePlaySkuDetails;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "StoreGooglePlaySkuDetails.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/stores/StoreGooglePlaySkuDetails$State;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
.field public isDirty:Z
|
|
|
|
|
|
|
|
.field public state:Lcom/discord/stores/StoreGooglePlaySkuDetails$State;
|
|
|
|
|
|
|
|
.field public final stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
|
|
"Lcom/discord/stores/StoreGooglePlaySkuDetails$State;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "dispatcher"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-23 03:12:49 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/stores/StoreGooglePlaySkuDetails$State$Uninitialized;->INSTANCE:Lcom/discord/stores/StoreGooglePlaySkuDetails$State$Uninitialized;
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->state:Lcom/discord/stores/StoreGooglePlaySkuDetails$State;
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-09-23 03:12:49 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getState()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/stores/StoreGooglePlaySkuDetails$State;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
const-string/jumbo v1, "this.stateSubject"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-23 03:12:49 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleError()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreGooglePlaySkuDetails$handleError$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreGooglePlaySkuDetails$handleError$1;-><init>(Lcom/discord/stores/StoreGooglePlaySkuDetails;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleFetchError()V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreGooglePlaySkuDetails$State$Failure;->INSTANCE:Lcom/discord/stores/StoreGooglePlaySkuDetails$State$Failure;
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->state:Lcom/discord/stores/StoreGooglePlaySkuDetails$State;
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleFetchSuccess(Ljava/util/List;)V
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/android/billingclient/api/SkuDetails;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "skuDetails"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-23 03:12:49 +00:00
|
|
|
|
|
|
|
const/16 v0, 0xa
|
|
|
|
|
2020-10-03 03:03:24 +00:00
|
|
|
invoke-static {p1, v0}, Lf/h/a/f/f/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
2020-09-23 03:12:49 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2020-10-03 03:03:24 +00:00
|
|
|
invoke-static {v0}, Lf/h/a/f/f/n/f;->mapCapacity(I)I
|
2020-09-23 03:12:49 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/16 v1, 0x10
|
|
|
|
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
|
|
|
|
const/16 v0, 0x10
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v1, Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
invoke-direct {v1, v0}, Ljava/util/LinkedHashMap;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
move-object v2, v0
|
|
|
|
|
|
|
|
check-cast v2, Lcom/android/billingclient/api/SkuDetails;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/android/billingclient/api/SkuDetails;->d()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v1, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreGooglePlaySkuDetails$State$Loaded;
|
|
|
|
|
|
|
|
invoke-direct {p1, v1}, Lcom/discord/stores/StoreGooglePlaySkuDetails$State$Loaded;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->state:Lcom/discord/stores/StoreGooglePlaySkuDetails$State;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->isDirty:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onDispatchEnded()V
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->isDirty:Z
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->state:Lcom/discord/stores/StoreGooglePlaySkuDetails$State;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->isDirty:Z
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final updateSkuDetails(Ljava/util/List;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/android/billingclient/api/SkuDetails;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "skuDetails"
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-23 03:12:49 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGooglePlaySkuDetails;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreGooglePlaySkuDetails$updateSkuDetails$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreGooglePlaySkuDetails$updateSkuDetails$1;-><init>(Lcom/discord/stores/StoreGooglePlaySkuDetails;Ljava/util/List;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|