From a8c732d67bc4565792f0b28efcde101210885323 Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 5 Dec 2022 16:09:55 -0500 Subject: [PATCH] Fix opening download notification only going to More tab --- .../main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt | 8 ++++++-- app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreTab.kt | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt index 1f422b571..023b18cab 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt @@ -45,6 +45,7 @@ import eu.kanade.presentation.util.Transition import eu.kanade.presentation.util.isTabletUi import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.browse.BrowseTab +import eu.kanade.tachiyomi.ui.download.DownloadQueueScreen import eu.kanade.tachiyomi.ui.history.HistoryTab import eu.kanade.tachiyomi.ui.library.LibraryTab import eu.kanade.tachiyomi.ui.manga.MangaScreen @@ -68,7 +69,7 @@ object HomeScreen : Screen { UpdatesTab, HistoryTab, BrowseTab(), - MoreTab(), + MoreTab, ) @Composable @@ -147,12 +148,15 @@ object HomeScreen : Screen { Tab.Updates -> UpdatesTab Tab.History -> HistoryTab is Tab.Browse -> BrowseTab(it.toExtensions) - is Tab.More -> MoreTab(it.toDownloads) + is Tab.More -> MoreTab } if (it is Tab.Library && it.mangaIdToOpen != null) { navigator.push(MangaScreen(it.mangaIdToOpen)) } + if (it is Tab.More && it.toDownloads) { + navigator.push(DownloadQueueScreen) + } } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreTab.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreTab.kt index 8fb94f2c2..d7774f8be 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreTab.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreTab.kt @@ -38,7 +38,7 @@ import kotlinx.coroutines.flow.combine import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -data class MoreTab(private val toDownloads: Boolean = false) : Tab { +object MoreTab : Tab { override val options: TabOptions @Composable