apkfuckery/com.discord/smali/f/a/a/t.smali
2020-04-17 21:35:49 +02:00

299 lines
7.4 KiB
Smali

.class public final Lf/a/a/t;
.super Lf/a/b/b0;
.source "WidgetUrgentMessageDialogViewModel.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lf/a/a/t$e;,
Lf/a/a/t$d;,
Lf/a/a/t$b;,
Lf/a/a/t$c;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lf/a/b/b0<",
"Lf/a/a/t$e;",
">;"
}
.end annotation
# instance fields
.field public final d:Lrx/subjects/PublishSubject;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/PublishSubject<",
"Lf/a/a/t$b;",
">;"
}
.end annotation
.end field
.field public final e:Lcom/discord/utilities/rest/RestAPI;
# direct methods
.method public constructor <init>(Lcom/discord/utilities/rest/RestAPI;Lrx/Observable;)V
.locals 10
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/discord/utilities/rest/RestAPI;",
"Lrx/Observable<",
"Lf/a/a/t$d;",
">;)V"
}
.end annotation
const/4 v0, 0x0
if-eqz p1, :cond_1
if-eqz p2, :cond_0
const/4 v1, 0x1
invoke-direct {p0, v0, v1, v0}, Lf/a/b/b0;-><init>(Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
iput-object p1, p0, Lf/a/a/t;->e:Lcom/discord/utilities/rest/RestAPI;
invoke-static {p2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
move-result-object p1
const/4 p2, 0x2
invoke-static {p1, p0, v0, p2, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
move-result-object v1
const-class v2, Lf/a/a/t;
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v5, 0x0
const/4 v6, 0x0
new-instance v7, Lf/a/a/t$a;
invoke-direct {v7, p0}, Lf/a/a/t$a;-><init>(Lf/a/a/t;)V
const/16 v8, 0x1e
const/4 v9, 0x0
invoke-static/range {v1 .. v9}, 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
invoke-static {}, Lrx/subjects/PublishSubject;->o()Lrx/subjects/PublishSubject;
move-result-object p1
iput-object p1, p0, Lf/a/a/t;->d:Lrx/subjects/PublishSubject;
return-void
:cond_0
const-string p1, "storeObservable"
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v0
:cond_1
const-string p1, "restAPI"
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public final a(Landroid/content/Context;)V
.locals 16
.annotation build Landroidx/annotation/MainThread;
.end annotation
move-object/from16 v0, p0
move-object/from16 v1, p1
if-eqz v1, :cond_1
sget-object v3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
invoke-virtual {v3}, Lcom/discord/stores/StoreStream$Companion;->getChannelsSelected()Lcom/discord/stores/StoreChannelsSelected;
move-result-object v3
const-wide v4, 0x8efc0ce7f420001L
invoke-virtual {v3, v1, v4, v5}, Lcom/discord/stores/StoreChannelsSelected;->findAndSetDirectMessage(Landroid/content/Context;J)V
invoke-virtual/range {p0 .. p0}, Lf/a/b/b0;->getViewState()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lf/a/a/t$e;
if-eqz v1, :cond_0
iget-object v3, v1, Lf/a/a/t$e;->a:Ljava/lang/Integer;
if-eqz v3, :cond_0
invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I
move-result v3
and-int/lit16 v3, v3, -0x2001
new-instance v15, Lcom/discord/restapi/RestAPIParams$UserInfo;
const/4 v5, 0x0
const/4 v6, 0x0
const/4 v7, 0x0
const/4 v8, 0x0
const/4 v9, 0x0
const/4 v10, 0x0
const/4 v11, 0x0
const/4 v12, 0x0
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v13
const/16 v14, 0xff
const/4 v3, 0x0
move-object v4, v15
move-object v2, v15
move-object v15, v3
invoke-direct/range {v4 .. v15}, Lcom/discord/restapi/RestAPIParams$UserInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
iget-object v3, v1, Lf/a/a/t$e;->a:Ljava/lang/Integer;
const/4 v4, 0x1
invoke-virtual {v1, v3, v4}, Lf/a/a/t$e;->a(Ljava/lang/Integer;Z)Lf/a/a/t$e;
move-result-object v1
invoke-virtual {v0, v1}, Lf/a/b/b0;->updateViewState(Ljava/lang/Object;)V
iget-object v1, v0, Lf/a/a/t;->e:Lcom/discord/utilities/rest/RestAPI;
invoke-virtual {v1, v2}, Lcom/discord/utilities/rest/RestAPI;->patchUser(Lcom/discord/restapi/RestAPIParams$UserInfo;)Lrx/Observable;
move-result-object v1
const/4 v2, 0x0
const/4 v3, 0x0
invoke-static {v1, v2, v4, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
move-result-object v1
const/4 v2, 0x2
invoke-static {v1, v0, v3, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
move-result-object v1
new-instance v2, Lf/a/a/t$f;
invoke-direct {v2, v0}, Lf/a/a/t$f;-><init>(Lf/a/a/t;)V
new-instance v3, Lf/a/a/t$g;
invoke-direct {v3, v0}, Lf/a/a/t$g;-><init>(Lf/a/a/t;)V
invoke-virtual {v1, v2, v3}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
:cond_0
return-void
:cond_1
const-string v1, "context"
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
const/4 v1, 0x0
throw v1
.end method
.method public final a(Lf/a/a/t$d;)V
.locals 2
.annotation build Landroidx/annotation/MainThread;
.end annotation
iget-object p1, p1, Lf/a/a/t$d;->a:Lcom/discord/models/domain/ModelUser;
invoke-virtual {p0}, Lf/a/b/b0;->getViewState()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lf/a/a/t$e;
if-nez v0, :cond_0
const/4 v0, 0x0
goto :goto_0
:cond_0
iget-boolean v0, v0, Lf/a/a/t$e;->b:Z
:goto_0
new-instance v1, Lf/a/a/t$e;
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getFlags()Ljava/lang/Integer;
move-result-object p1
invoke-direct {v1, p1, v0}, Lf/a/a/t$e;-><init>(Ljava/lang/Integer;Z)V
invoke-virtual {p0, v1}, Lf/a/b/b0;->updateViewState(Ljava/lang/Object;)V
return-void
.end method
.method public final observeEvents()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Lf/a/a/t$b;",
">;"
}
.end annotation
iget-object v0, p0, Lf/a/a/t;->d:Lrx/subjects/PublishSubject;
const-string v1, "eventSubject"
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object v0
.end method