604 lines
19 KiB
Smali
604 lines
19 KiB
Smali
.class public final Lcom/discord/stores/StoreUserConnections;
|
|
.super Lcom/discord/stores/Store;
|
|
|
|
|
|
# instance fields
|
|
.field private connectedAccounts:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/domain/ModelConnectedAccount;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final connectedAccountsSubject:Lrx/subjects/SerializedSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/SerializedSubject<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/domain/ModelConnectedAccount;",
|
|
">;",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/domain/ModelConnectedAccount;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final stream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStream;)V
|
|
.locals 1
|
|
|
|
const-string v0, "stream"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserConnections;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
new-instance p1, Lrx/subjects/SerializedSubject;
|
|
|
|
invoke-static {}, Lrx/subjects/BehaviorSubject;->Mj()Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lrx/subjects/Subject;
|
|
|
|
invoke-direct {p1, v0}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserConnections;->connectedAccountsSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
check-cast p1, Ljava/util/List;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserConnections;->connectedAccounts:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$fetchConnectedAccounts(Lcom/discord/stores/StoreUserConnections;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreUserConnections;->fetchConnectedAccounts()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$publishUpdatedAccounts(Lcom/discord/stores/StoreUserConnections;Ljava/util/List;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreUserConnections;->publishUpdatedAccounts(Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final fetchConnectedAccounts()V
|
|
.locals 13
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI;->getConnections()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v5
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreUserConnections$fetchConnectedAccounts$1;
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/stores/StoreUserConnections$fetchConnectedAccounts$1;-><init>(Lcom/discord/stores/StoreUserConnections;)V
|
|
|
|
move-object v10, v0
|
|
|
|
check-cast v10, Lkotlin/jvm/functions/Function1;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/16 v11, 0x1e
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static/range {v4 .. v12}, 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
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final publishUpdatedAccounts(Ljava/util/List;)V
|
|
.locals 2
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/domain/ModelConnectedAccount;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserConnections;->connectedAccounts:Ljava/util/List;
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreUserConnections;->connectedAccountsSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreUserConnections;->connectedAccounts:Ljava/util/List;
|
|
|
|
check-cast v1, Ljava/util/Collection;
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
invoke-virtual {p1, v0}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final authorizeConnection(Ljava/lang/String;Landroid/content/Context;)V
|
|
.locals 12
|
|
|
|
const-string v0, "platformName"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/rest/RestAPI;->authorizeConnection(Ljava/lang/String;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {p1, v0, v1, v2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v4
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreUserConnections$authorizeConnection$1;
|
|
|
|
invoke-direct {p1, p2}, Lcom/discord/stores/StoreUserConnections$authorizeConnection$1;-><init>(Landroid/content/Context;)V
|
|
|
|
move-object v9, p1
|
|
|
|
check-cast v9, Lkotlin/jvm/functions/Function1;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/16 v10, 0x1e
|
|
|
|
const/4 v11, 0x0
|
|
|
|
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
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final deleteUserConnection(Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 11
|
|
|
|
const-string v0, "platformName"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "connectionId"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1, p2}, Lcom/discord/utilities/rest/RestAPI;->deleteConnection(Ljava/lang/String;Ljava/lang/String;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p1, p2, v0, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v3
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreUserConnections$deleteUserConnection$1;
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/stores/StoreUserConnections$deleteUserConnection$1;-><init>(Lcom/discord/stores/StoreUserConnections;)V
|
|
|
|
move-object v8, p1
|
|
|
|
check-cast v8, Lkotlin/jvm/functions/Function1;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/16 v9, 0x1e
|
|
|
|
const/4 v10, 0x0
|
|
|
|
invoke-static/range {v2 .. v10}, 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
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getConnectedAccounts()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/domain/ModelConnectedAccount;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserConnections;->connectedAccounts:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getConnectedAccounts()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/domain/ModelConnectedAccount;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserConnections;->connectedAccountsSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
check-cast v0, Lrx/Observable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStream()Lcom/discord/stores/StoreStream;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserConnections;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const-string v0, "payload"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getConnectedAccounts()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "payload.connectedAccounts"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreUserConnections;->publishUpdatedAccounts(Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected final init(Landroid/content/Context;)V
|
|
.locals 9
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/stores/Store;->init(Landroid/content/Context;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreUserConnections;->stream:Lcom/discord/stores/StoreStream;
|
|
|
|
iget-object p1, p1, Lcom/discord/stores/StoreStream;->gatewaySocket:Lcom/discord/stores/StoreGatewayConnection;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreGatewayConnection;->getUserConnectionUpdate()Lrx/subjects/SerializedSubject;
|
|
|
|
move-result-object p1
|
|
|
|
move-object v0, p1
|
|
|
|
check-cast v0, Lrx/Observable;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreUserConnections$init$1;
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/stores/StoreUserConnections$init$1;-><init>(Lcom/discord/stores/StoreUserConnections;)V
|
|
|
|
move-object v6, p1
|
|
|
|
check-cast v6, Lkotlin/jvm/functions/Function1;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/16 v7, 0x1e
|
|
|
|
const/4 v8, 0x0
|
|
|
|
invoke-static/range {v0 .. v8}, 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
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setConnectedAccounts(Ljava/util/List;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/domain/ModelConnectedAccount;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "<set-?>"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserConnections;->connectedAccounts:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final submitPinCode(Ljava/lang/String;Lcom/discord/utilities/platform/Platform;Lcom/discord/utilities/dimmer/DimmerView;Lcom/discord/app/AppComponent;Landroid/app/Activity;Lrx/functions/Action1;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/utilities/platform/Platform;",
|
|
"Lcom/discord/utilities/dimmer/DimmerView;",
|
|
"Lcom/discord/app/AppComponent;",
|
|
"Landroid/app/Activity;",
|
|
"Lrx/functions/Action1<",
|
|
"Lcom/discord/utilities/error/Error;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "verificationCode"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "platform"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "appComponent"
|
|
|
|
invoke-static {p4, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "errorHandler"
|
|
|
|
invoke-static {p6, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/utilities/platform/Platform;->getPlatformId()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1, p1}, Lcom/discord/utilities/rest/RestAPI;->getConnectionState(Ljava/lang/String;Ljava/lang/String;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {p1, v0, v1, v2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreUserConnections$submitPinCode$1;
|
|
|
|
invoke-direct {v0, p2}, Lcom/discord/stores/StoreUserConnections$submitPinCode$1;-><init>(Lcom/discord/utilities/platform/Platform;)V
|
|
|
|
check-cast v0, Lrx/functions/b;
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->c(Lrx/functions/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p4}, Lcom/discord/app/g;->a(Lcom/discord/app/AppComponent;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p3}, Lcom/discord/app/g;->a(Lcom/discord/utilities/dimmer/DimmerView;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Lcom/discord/app/g;->tT:Lcom/discord/app/g;
|
|
|
|
move-object p3, p5
|
|
|
|
check-cast p3, Landroid/content/Context;
|
|
|
|
new-instance p4, Lcom/discord/stores/StoreUserConnections$submitPinCode$2;
|
|
|
|
invoke-direct {p4, p5}, Lcom/discord/stores/StoreUserConnections$submitPinCode$2;-><init>(Landroid/app/Activity;)V
|
|
|
|
check-cast p4, Lkotlin/jvm/functions/Function1;
|
|
|
|
invoke-virtual {p2, p3, p4, p6}, Lcom/discord/app/g;->a(Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lrx/functions/Action1;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final updateUserConnection(Lcom/discord/models/domain/ModelConnectedAccount;ZZZ)V
|
|
.locals 9
|
|
|
|
const-string v0, "connectedAccount"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->getType()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "connectedAccount.type"
|
|
|
|
invoke-static {v1, v2}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->getId()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "connectedAccount.id"
|
|
|
|
invoke-static {v2, v3}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lcom/discord/restapi/RestAPIParams$ConnectedAccount;->Companion:Lcom/discord/restapi/RestAPIParams$ConnectedAccount$Companion;
|
|
|
|
invoke-virtual {v3, p1, p2, p3, p4}, Lcom/discord/restapi/RestAPIParams$ConnectedAccount$Companion;->create(Lcom/discord/models/domain/ModelConnectedAccount;ZZI)Lcom/discord/restapi/RestAPIParams$ConnectedAccount;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, v1, v2, p1}, Lcom/discord/utilities/rest/RestAPI;->updateConnection(Ljava/lang/String;Ljava/lang/String;Lcom/discord/restapi/RestAPIParams$ConnectedAccount;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
const/4 p3, 0x1
|
|
|
|
const/4 p4, 0x0
|
|
|
|
invoke-static {p1, p2, p3, p4}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreUserConnections$updateUserConnection$1;
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/stores/StoreUserConnections$updateUserConnection$1;-><init>(Lcom/discord/stores/StoreUserConnections;)V
|
|
|
|
move-object v6, p1
|
|
|
|
check-cast v6, Lkotlin/jvm/functions/Function1;
|
|
|
|
const/16 v7, 0x1e
|
|
|
|
const/4 v8, 0x0
|
|
|
|
invoke-static/range {v0 .. v8}, 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
|
|
|
|
return-void
|
|
.end method
|