Fix opening download notification only going to More tab

This commit is contained in:
arkon 2022-12-05 16:09:55 -05:00
parent 843c9c7e57
commit a8c732d67b
2 changed files with 7 additions and 3 deletions

View file

@ -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)
}
}
}
}

View file

@ -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