Skip to content

Commit

Permalink
Fix back not going to starting tab when enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nonproto committed Jan 16, 2025
1 parent ef9bb88 commit 9498816
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FeedController : BaseComposeController<FeedPresenter>() {

val context = LocalContext.current

BackHandler((this.activity as? MainActivity)?.shouldGoToStartingTab() == true) {
BackHandler((this.activity as? MainActivity)?.shouldGoToStartingTab() == false) {
(this.activity as? MainActivity)?.backCallback?.invoke()
}

Expand All @@ -56,6 +56,7 @@ class FeedController : BaseComposeController<FeedPresenter>() {
chapterClick = { mangaId, chapterId ->
openChapter(context, mangaId, chapterId)
},
chapterSwipe = presenter::toggleChapterRead,
switchViewType = presenter::switchViewType,
deleteAllHistoryClick = presenter::deleteAllHistory,
deleteHistoryClick = presenter::deleteHistory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class BrowseController(incomingQuery: String = "") : BaseComposeController<Brows
val windowSizeClass = calculateWindowSizeClass(this.activity!!)
val isSideNav = (this.activity as? MainActivity)?.isSideNavigation() == true

BackHandler((this.activity as? MainActivity)?.shouldGoToStartingTab() == true) {
BackHandler((this.activity as? MainActivity)?.shouldGoToStartingTab() == false) {
(this.activity as? MainActivity)?.backCallback?.invoke()
}

Expand Down

0 comments on commit 9498816

Please sign in to comment.