174 lines
4.7 KiB
Smali
174 lines
4.7 KiB
Smali
.class final Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion$getInvite$1;
|
|
.super Ljava/lang/Object;
|
|
|
|
# interfaces
|
|
.implements Lrx/functions/b;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion;->getInvite()Lrx/Observable;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x18
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
"R:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lrx/functions/b<",
|
|
"TT;",
|
|
"Lrx/Observable<",
|
|
"+TR;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion$getInvite$1;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion$getInvite$1;
|
|
|
|
invoke-direct {v0}, Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion$getInvite$1;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion$getInvite$1;->INSTANCE:Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion$getInvite$1;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final bridge synthetic call(Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, Lcom/discord/stores/StoreInviteSettings$InviteCode;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion$getInvite$1;->call(Lcom/discord/stores/StoreInviteSettings$InviteCode;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final call(Lcom/discord/stores/StoreInviteSettings$InviteCode;)Lrx/Observable;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/stores/StoreInviteSettings$InviteCode;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/stores/StoreInstantInvites$InviteState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreInviteSettings$InviteCode;->getInviteCode()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
move-object v2, v1
|
|
|
|
check-cast v2, Ljava/lang/CharSequence;
|
|
|
|
invoke-static {v2}, Lkotlin/text/l;->j(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v2
|
|
|
|
xor-int/lit8 v2, v2, 0x1
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getInstantInvites()Lcom/discord/stores/StoreInstantInvites;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreInviteSettings$InviteCode;->getSource()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v1, v3}, Lcom/discord/stores/StoreInstantInvites;->requestInvite(Ljava/lang/String;Ljava/lang/String;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion$getInvite$1$2$1;->INSTANCE:Lcom/discord/widgets/auth/WidgetAuthRegisterInvite$Companion$getInvite$1$2$1;
|
|
|
|
check-cast v2, Lrx/functions/b;
|
|
|
|
invoke-virtual {v1, v2}, Lrx/Observable;->b(Lrx/functions/b;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
:cond_1
|
|
new-instance v1, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, "Invite code blank. Source="
|
|
|
|
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreInviteSettings$InviteCode;->getSource()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_2
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v1, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast v1, Ljava/lang/Throwable;
|
|
|
|
invoke-static {v1}, Lrx/Observable;->A(Ljava/lang/Throwable;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-string p1, "Observable.error(Illegal\u2026e=${extInvite?.source}\"))"
|
|
|
|
invoke-static {v1, p1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:cond_3
|
|
return-object v1
|
|
.end method
|