324 lines
9.6 KiB
Smali
324 lines
9.6 KiB
Smali
.class public final Lcom/discord/stores/StoreTabsNavigation;
|
|
.super Ljava/lang/Object;
|
|
.source "StoreTabsNavigation.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
# instance fields
|
|
.field public final dismissTabsDialogEventSubject:Lrx/subjects/PublishSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/PublishSubject<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public isDirty:Z
|
|
|
|
.field public selectedTab:Lcom/discord/widgets/tabs/NavigationTab;
|
|
|
|
.field public final selectedTabSubject:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Lcom/discord/widgets/tabs/NavigationTab;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/stores/StoreStream;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreTabsNavigation;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreTabsNavigation;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
sget-object p1, Lcom/discord/widgets/tabs/NavigationTab;->HOME:Lcom/discord/widgets/tabs/NavigationTab;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreTabsNavigation;->selectedTab:Lcom/discord/widgets/tabs/NavigationTab;
|
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreTabsNavigation;->selectedTabSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->o()Lrx/subjects/PublishSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreTabsNavigation;->dismissTabsDialogEventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "storeStream"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "dispatcher"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$dismissTabsDialogs(Lcom/discord/stores/StoreTabsNavigation;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreTabsNavigation;->dismissTabsDialogs()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleTabSelection(Lcom/discord/stores/StoreTabsNavigation;Lcom/discord/widgets/tabs/NavigationTab;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreTabsNavigation;->handleTabSelection(Lcom/discord/widgets/tabs/NavigationTab;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$notifyHomeTabSelected(Lcom/discord/stores/StoreTabsNavigation;Lcom/discord/stores/StoreNavigation$DrawerAction;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreTabsNavigation;->notifyHomeTabSelected(Lcom/discord/stores/StoreNavigation$DrawerAction;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final dismissTabsDialogs()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreTabsNavigation;->dismissTabsDialogEventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleTabSelection(Lcom/discord/widgets/tabs/NavigationTab;)V
|
|
.locals 0
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreTabsNavigation;->selectedTab:Lcom/discord/widgets/tabs/NavigationTab;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreTabsNavigation;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final notifyHomeTabSelected(Lcom/discord/stores/StoreNavigation$DrawerAction;)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreTabsNavigation;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreStream;->handleHomeTabSelected(Lcom/discord/stores/StoreNavigation$DrawerAction;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic selectHomeTab$default(Lcom/discord/stores/StoreTabsNavigation;Lcom/discord/stores/StoreNavigation$DrawerAction;ZILjava/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/StoreTabsNavigation;->selectHomeTab(Lcom/discord/stores/StoreNavigation$DrawerAction;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic selectTab$default(Lcom/discord/stores/StoreTabsNavigation;Lcom/discord/widgets/tabs/NavigationTab;ZILjava/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/StoreTabsNavigation;->selectTab(Lcom/discord/widgets/tabs/NavigationTab;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getSelectedTab()Lcom/discord/widgets/tabs/NavigationTab;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreTabsNavigation;->selectedTab:Lcom/discord/widgets/tabs/NavigationTab;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handlePreLogout()V
|
|
.locals 4
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
sget-object v0, Lcom/discord/widgets/tabs/NavigationTab;->HOME:Lcom/discord/widgets/tabs/NavigationTab;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {p0, v0, v1, v2, v3}, Lcom/discord/stores/StoreTabsNavigation;->selectTab$default(Lcom/discord/stores/StoreTabsNavigation;Lcom/discord/widgets/tabs/NavigationTab;ZILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final observeDismissTabsDialogEvent()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreTabsNavigation;->dismissTabsDialogEventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
const-string v1, "dismissTabsDialogEventSubject"
|
|
|
|
invoke-static {v0, v1}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final observeSelectedTab()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/tabs/NavigationTab;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreTabsNavigation;->selectedTabSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "selectedTabSubject.distinctUntilChanged()"
|
|
|
|
invoke-static {v0, v1}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onDispatchEnded()V
|
|
.locals 2
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreTabsNavigation;->isDirty:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StoreTabsNavigation;->selectedTabSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreTabsNavigation;->selectedTab:Lcom/discord/widgets/tabs/NavigationTab;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreTabsNavigation;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final selectHomeTab(Lcom/discord/stores/StoreNavigation$DrawerAction;Z)V
|
|
.locals 2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreTabsNavigation;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreTabsNavigation$selectHomeTab$1;
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreTabsNavigation$selectHomeTab$1;-><init>(Lcom/discord/stores/StoreTabsNavigation;Lcom/discord/stores/StoreNavigation$DrawerAction;Z)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "drawerAction"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final selectTab(Lcom/discord/widgets/tabs/NavigationTab;Z)V
|
|
.locals 2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreTabsNavigation;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreTabsNavigation$selectTab$1;
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreTabsNavigation$selectTab$1;-><init>(Lcom/discord/stores/StoreTabsNavigation;Lcom/discord/widgets/tabs/NavigationTab;Z)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "navigationTab"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|