193 lines
5 KiB
Smali
193 lines
5 KiB
Smali
.class public final Lcom/discord/stores/StoreChannels$createPrivateChannel$1;
|
|
.super Ljava/lang/Object;
|
|
.source "StoreChannels.kt"
|
|
|
|
# interfaces
|
|
.implements Lg0/l/i;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/stores/StoreChannels;->createPrivateChannel(J)Lrx/Observable;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
"R:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lg0/l/i<",
|
|
"TT;",
|
|
"Lrx/Observable<",
|
|
"+TR;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic $userId:J
|
|
|
|
.field public final synthetic this$0:Lcom/discord/stores/StoreChannels;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/StoreChannels;J)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreChannels$createPrivateChannel$1;->this$0:Lcom/discord/stores/StoreChannels;
|
|
|
|
iput-wide p2, p0, Lcom/discord/stores/StoreChannels$createPrivateChannel$1;->$userId:J
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic call(Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/stores/StoreChannels$createPrivateChannel$1;->call(Ljava/util/Map;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final call(Ljava/util/Map;)Lrx/Observable;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;)",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getDMRecipient()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getDMRecipient()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
iget-wide v3, p0, Lcom/discord/stores/StoreChannels$createPrivateChannel$1;->$userId:J
|
|
|
|
cmp-long v5, v1, v3
|
|
|
|
if-nez v5, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lg0/m/e/j;
|
|
|
|
invoke-direct {v0, p1}, Lg0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
invoke-static {}, Ly/u/b/j;->throwNpe()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
|
|
:cond_2
|
|
sget-object p1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lcom/discord/restapi/RestAPIParams$CreateChannel;
|
|
|
|
iget-wide v1, p0, Lcom/discord/stores/StoreChannels$createPrivateChannel$1;->$userId:J
|
|
|
|
invoke-direct {v0, v1, v2}, Lcom/discord/restapi/RestAPIParams$CreateChannel;-><init>(J)V
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/utilities/rest/RestAPI;->userCreateChannel(Lcom/discord/restapi/RestAPIParams$CreateChannel;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {v0, v1}, Lf/a/b/k;->a(ZI)Lrx/Observable$c;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreChannels$createPrivateChannel$1$1;
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/stores/StoreChannels$createPrivateChannel$1$1;-><init>(Lcom/discord/stores/StoreChannels$createPrivateChannel$1;)V
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->b(Lrx/functions/Action1;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreChannels$createPrivateChannel$1$2;->INSTANCE:Lcom/discord/stores/StoreChannels$createPrivateChannel$1$2;
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->f(Lg0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|