apkfuckery/com.discord/smali/com/discord/stores/StoreNavigation.smali

573 lines
18 KiB
Smali

.class public final Lcom/discord/stores/StoreNavigation;
.super Ljava/lang/Object;
.source "StoreNavigation.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/discord/stores/StoreNavigation$DrawerAction;,
Lcom/discord/stores/StoreNavigation$ActivityNavigationLifecycleCallbacks;
}
.end annotation
# instance fields
.field public final isAnyNavigationDrawerOpen:Lrx/Observable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/Observable<",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.end field
.field public final navigationDrawerActionSubject:Lrx/subjects/SerializedSubject;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/SerializedSubject<",
"Lcom/discord/stores/StoreNavigation$DrawerAction;",
"Lcom/discord/stores/StoreNavigation$DrawerAction;",
">;"
}
.end annotation
.end field
.field public final navigationDrawerIsLeftOpenSubject:Lrx/subjects/SerializedSubject;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/SerializedSubject<",
"Ljava/lang/Boolean;",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.end field
.field public final navigationDrawerIsRightOpenSubject:Lrx/subjects/SerializedSubject;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/SerializedSubject<",
"Ljava/lang/Boolean;",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.end field
.field public final stream:Lcom/discord/stores/StoreStream;
# direct methods
.method public constructor <init>(Lcom/discord/stores/StoreStream;)V
.locals 2
if-eqz p1, :cond_0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/discord/stores/StoreNavigation;->stream:Lcom/discord/stores/StoreStream;
new-instance p1, Lrx/subjects/SerializedSubject;
const/4 v0, 0x0
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v1
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
move-result-object v1
invoke-direct {p1, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
iput-object p1, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerIsLeftOpenSubject:Lrx/subjects/SerializedSubject;
new-instance p1, Lrx/subjects/SerializedSubject;
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v0
invoke-static {v0}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
move-result-object v0
invoke-direct {p1, v0}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
iput-object p1, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerIsRightOpenSubject:Lrx/subjects/SerializedSubject;
new-instance p1, Lrx/subjects/SerializedSubject;
sget-object v0, Lcom/discord/stores/StoreNavigation$DrawerAction;->NOOP:Lcom/discord/stores/StoreNavigation$DrawerAction;
invoke-static {v0}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
move-result-object v0
invoke-direct {p1, v0}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
iput-object p1, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerActionSubject:Lrx/subjects/SerializedSubject;
iget-object p1, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerIsLeftOpenSubject:Lrx/subjects/SerializedSubject;
iget-object v0, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerIsRightOpenSubject:Lrx/subjects/SerializedSubject;
sget-object v1, Lcom/discord/stores/StoreNavigation$isAnyNavigationDrawerOpen$1;->INSTANCE:Lcom/discord/stores/StoreNavigation$isAnyNavigationDrawerOpen$1;
invoke-static {p1, v0, v1}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
move-result-object p1
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
move-result-object p1
iput-object p1, p0, Lcom/discord/stores/StoreNavigation;->isAnyNavigationDrawerOpen:Lrx/Observable;
return-void
:cond_0
const-string p1, "stream"
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method
.method public static final synthetic access$displayConnectionErrorNotice(Lcom/discord/stores/StoreNavigation;)V
.locals 0
invoke-direct {p0}, Lcom/discord/stores/StoreNavigation;->displayConnectionErrorNotice()V
return-void
.end method
.method public static final synthetic access$isAnyNavigationDrawerOpen$p(Lcom/discord/stores/StoreNavigation;)Lrx/Observable;
.locals 0
iget-object p0, p0, Lcom/discord/stores/StoreNavigation;->isAnyNavigationDrawerOpen:Lrx/Observable;
return-object p0
.end method
.method private final displayConnectionErrorNotice()V
.locals 10
sget-object v0, Lcom/discord/widgets/notice/WidgetNoticePopup;->Companion:Lcom/discord/widgets/notice/WidgetNoticePopup$Companion;
sget-object v2, Lcom/discord/stores/StoreNavigation$displayConnectionErrorNotice$1;->INSTANCE:Lcom/discord/stores/StoreNavigation$displayConnectionErrorNotice$1;
sget-object v3, Lcom/discord/stores/StoreNavigation$displayConnectionErrorNotice$2;->INSTANCE:Lcom/discord/stores/StoreNavigation$displayConnectionErrorNotice$2;
sget-object v9, Lcom/discord/stores/StoreNavigation$displayConnectionErrorNotice$3;->INSTANCE:Lcom/discord/stores/StoreNavigation$displayConnectionErrorNotice$3;
const-string v1, "CONNECTION_ISSUES"
const v4, 0x7f0803dc
const/4 v8, 0x1
const/16 v5, 0x1e
const-wide/32 v6, 0x1d4c0
invoke-virtual/range {v0 .. v9}, Lcom/discord/widgets/notice/WidgetNoticePopup$Companion;->enqueue(Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;IIJZLkotlin/jvm/functions/Function1;)V
return-void
.end method
.method public static synthetic setNavigationDrawerAction$default(Lcom/discord/stores/StoreNavigation;Lcom/discord/stores/StoreNavigation$DrawerAction;Landroidx/drawerlayout/widget/DrawerLayout;ILjava/lang/Object;)V
.locals 0
and-int/lit8 p3, p3, 0x2
if-eqz p3, :cond_0
const/4 p2, 0x0
:cond_0
invoke-virtual {p0, p1, p2}, Lcom/discord/stores/StoreNavigation;->setNavigationDrawerAction(Lcom/discord/stores/StoreNavigation$DrawerAction;Landroidx/drawerlayout/widget/DrawerLayout;)V
return-void
.end method
# virtual methods
.method public final getNavigationDrawerAction()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Lcom/discord/stores/StoreNavigation$DrawerAction;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerActionSubject:Lrx/subjects/SerializedSubject;
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
move-result-object v0
invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable;
move-result-object v0
const-string v1, "navigationDrawerActionSu\u2026 .distinctUntilChanged()"
invoke-static {v0, v1}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object v0
.end method
.method public final getNavigationDrawerIsLeftOpen()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerIsLeftOpenSubject:Lrx/subjects/SerializedSubject;
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
move-result-object v0
invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable;
move-result-object v0
const-string v1, "navigationDrawerIsLeftOp\u2026 .distinctUntilChanged()"
invoke-static {v0, v1}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object v0
.end method
.method public final getNavigationDrawerIsRightOpen()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerIsRightOpenSubject:Lrx/subjects/SerializedSubject;
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
move-result-object v0
invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable;
move-result-object v0
const-string v1, "navigationDrawerIsRightO\u2026 .distinctUntilChanged()"
invoke-static {v0, v1}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object v0
.end method
.method public final init(Landroid/app/Application;)V
.locals 10
if-eqz p1, :cond_0
new-instance v0, Lcom/discord/stores/StoreNavigation$ActivityNavigationLifecycleCallbacks;
iget-object v1, p0, Lcom/discord/stores/StoreNavigation;->stream:Lcom/discord/stores/StoreStream;
invoke-direct {v0, v1}, Lcom/discord/stores/StoreNavigation$ActivityNavigationLifecycleCallbacks;-><init>(Lcom/discord/stores/StoreStream;)V
invoke-virtual {p1, v0}, Landroid/app/Application;->registerActivityLifecycleCallbacks(Landroid/app/Application$ActivityLifecycleCallbacks;)V
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getAuthentication()Lcom/discord/stores/StoreAuthentication;
move-result-object v0
invoke-virtual {v0}, Lcom/discord/stores/StoreAuthentication;->getIsAuthed$app_productionDiscordExternalRelease()Lrx/Observable;
move-result-object v0
invoke-static {}, Lcom/miguelgaeta/backgrounded/Backgrounded;->get()Lrx/Observable;
move-result-object v1
new-instance v2, Lcom/discord/utilities/networking/NetworkMonitor;
invoke-direct {v2, p1}, Lcom/discord/utilities/networking/NetworkMonitor;-><init>(Landroid/content/Context;)V
invoke-virtual {v2}, Lcom/discord/utilities/networking/NetworkMonitor;->isStablyConnected()Lrx/Observable;
move-result-object p1
iget-object v2, p0, Lcom/discord/stores/StoreNavigation;->stream:Lcom/discord/stores/StoreStream;
invoke-virtual {v2}, Lcom/discord/stores/StoreStream;->getGatewaySocket$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreGatewayConnection;
move-result-object v2
invoke-virtual {v2}, Lcom/discord/stores/StoreGatewayConnection;->getConnected()Lrx/Observable;
move-result-object v2
sget-object v3, Lcom/discord/stores/StoreNavigation$init$1;->INSTANCE:Lcom/discord/stores/StoreNavigation$init$1;
invoke-static {v0, v1, p1, v2, v3}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func4;)Lrx/Observable;
move-result-object p1
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
move-result-object p1
sget-object v0, Lcom/discord/stores/StoreNavigation$init$2;->INSTANCE:Lcom/discord/stores/StoreNavigation$init$2;
invoke-virtual {p1, v0}, Lrx/Observable;->k(Lb0/l/i;)Lrx/Observable;
move-result-object p1
const-string v0, "Observable\n .comb\u2026y()\n }\n }"
invoke-static {p1, v0}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationBuffered(Lrx/Observable;)Lrx/Observable;
move-result-object v1
const-class v2, Lcom/discord/stores/StoreNavigation;
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v5, 0x0
const/4 v6, 0x0
new-instance v7, Lcom/discord/stores/StoreNavigation$init$3;
invoke-direct {v7, p0}, Lcom/discord/stores/StoreNavigation$init$3;-><init>(Lcom/discord/stores/StoreNavigation;)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
return-void
:cond_0
const-string p1, "application"
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method
.method public final launchNotice(Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
.locals 18
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Lkotlin/jvm/functions/Function1<",
"-",
"Landroidx/fragment/app/FragmentActivity;",
"Ljava/lang/Boolean;",
">;)V"
}
.end annotation
move-object/from16 v1, p1
move-object/from16 v0, p2
const/4 v2, 0x0
if-eqz v1, :cond_1
if-eqz v0, :cond_0
new-instance v15, Lcom/discord/stores/StoreNotices$Notice;
const/4 v2, 0x0
const-wide/16 v3, 0x0
const/4 v6, 0x0
const/4 v5, 0x0
const/4 v7, 0x0
const/4 v8, 0x0
const-wide/16 v9, 0x0
const-wide/16 v11, 0x0
new-instance v13, Lcom/discord/stores/StoreNavigation$launchNotice$notice$1;
invoke-direct {v13, v1, v0}, Lcom/discord/stores/StoreNavigation$launchNotice$notice$1;-><init>(Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
const/16 v14, 0x66
const/16 v16, 0x0
move-object v0, v15
move-object/from16 v1, p1
move-object/from16 v17, v15
move-object/from16 v15, v16
invoke-direct/range {v0 .. v15}, Lcom/discord/stores/StoreNotices$Notice;-><init>(Ljava/lang/String;Lcom/discord/utilities/time/Clock;JIZZLjava/util/List;JJLkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getNotices()Lcom/discord/stores/StoreNotices;
move-result-object v0
move-object/from16 v1, v17
invoke-virtual {v0, v1}, Lcom/discord/stores/StoreNotices;->requestToShow(Lcom/discord/stores/StoreNotices$Notice;)V
return-void
:cond_0
const-string v0, "showAction"
invoke-static {v0}, Lt/u/b/j;->a(Ljava/lang/String;)V
throw v2
:cond_1
const-string v0, "noticeName"
invoke-static {v0}, Lt/u/b/j;->a(Ljava/lang/String;)V
throw v2
.end method
.method public final setNavigationDrawerAction(Lcom/discord/stores/StoreNavigation$DrawerAction;)V
.locals 2
const/4 v0, 0x0
const/4 v1, 0x2
invoke-static {p0, p1, v0, v1, v0}, Lcom/discord/stores/StoreNavigation;->setNavigationDrawerAction$default(Lcom/discord/stores/StoreNavigation;Lcom/discord/stores/StoreNavigation$DrawerAction;Landroidx/drawerlayout/widget/DrawerLayout;ILjava/lang/Object;)V
return-void
.end method
.method public final setNavigationDrawerAction(Lcom/discord/stores/StoreNavigation$DrawerAction;Landroidx/drawerlayout/widget/DrawerLayout;)V
.locals 1
if-eqz p1, :cond_3
if-nez p2, :cond_0
iget-object p2, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerActionSubject:Lrx/subjects/SerializedSubject;
invoke-virtual {p2, p1}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V
return-void
:cond_0
sget-object v0, Lcom/discord/stores/StoreNavigation$WhenMappings;->$EnumSwitchMapping$0:[I
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
move-result p1
aget p1, v0, p1
const/4 v0, 0x1
if-eq p1, v0, :cond_2
const/4 v0, 0x2
if-eq p1, v0, :cond_1
goto :goto_0
:cond_1
invoke-virtual {p2}, Landroidx/drawerlayout/widget/DrawerLayout;->closeDrawers()V
goto :goto_0
:cond_2
const p1, 0x800003
invoke-virtual {p2, p1}, Landroidx/drawerlayout/widget/DrawerLayout;->openDrawer(I)V
:goto_0
iget-object p1, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerActionSubject:Lrx/subjects/SerializedSubject;
sget-object p2, Lcom/discord/stores/StoreNavigation$DrawerAction;->NOOP:Lcom/discord/stores/StoreNavigation$DrawerAction;
invoke-virtual {p1, p2}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V
return-void
:cond_3
const-string p1, "actionType"
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method
.method public final setNavigationDrawerLeftOpen(Z)V
.locals 1
iget-object v0, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerIsLeftOpenSubject:Lrx/subjects/SerializedSubject;
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object p1
invoke-virtual {v0, p1}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V
return-void
.end method
.method public final setNavigationDrawerRightOpen(Z)V
.locals 1
iget-object v0, p0, Lcom/discord/stores/StoreNavigation;->navigationDrawerIsRightOpenSubject:Lrx/subjects/SerializedSubject;
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object p1
invoke-virtual {v0, p1}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V
return-void
.end method