mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 09:31:47 +01:00
Fix opening download notification only going to More tab
This commit is contained in:
parent
843c9c7e57
commit
a8c732d67b
@ -45,6 +45,7 @@ import eu.kanade.presentation.util.Transition
|
|||||||
import eu.kanade.presentation.util.isTabletUi
|
import eu.kanade.presentation.util.isTabletUi
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.ui.browse.BrowseTab
|
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.history.HistoryTab
|
||||||
import eu.kanade.tachiyomi.ui.library.LibraryTab
|
import eu.kanade.tachiyomi.ui.library.LibraryTab
|
||||||
import eu.kanade.tachiyomi.ui.manga.MangaScreen
|
import eu.kanade.tachiyomi.ui.manga.MangaScreen
|
||||||
@ -68,7 +69,7 @@ object HomeScreen : Screen {
|
|||||||
UpdatesTab,
|
UpdatesTab,
|
||||||
HistoryTab,
|
HistoryTab,
|
||||||
BrowseTab(),
|
BrowseTab(),
|
||||||
MoreTab(),
|
MoreTab,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@ -147,12 +148,15 @@ object HomeScreen : Screen {
|
|||||||
Tab.Updates -> UpdatesTab
|
Tab.Updates -> UpdatesTab
|
||||||
Tab.History -> HistoryTab
|
Tab.History -> HistoryTab
|
||||||
is Tab.Browse -> BrowseTab(it.toExtensions)
|
is Tab.Browse -> BrowseTab(it.toExtensions)
|
||||||
is Tab.More -> MoreTab(it.toDownloads)
|
is Tab.More -> MoreTab
|
||||||
}
|
}
|
||||||
|
|
||||||
if (it is Tab.Library && it.mangaIdToOpen != null) {
|
if (it is Tab.Library && it.mangaIdToOpen != null) {
|
||||||
navigator.push(MangaScreen(it.mangaIdToOpen))
|
navigator.push(MangaScreen(it.mangaIdToOpen))
|
||||||
}
|
}
|
||||||
|
if (it is Tab.More && it.toDownloads) {
|
||||||
|
navigator.push(DownloadQueueScreen)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ import kotlinx.coroutines.flow.combine
|
|||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
|
|
||||||
data class MoreTab(private val toDownloads: Boolean = false) : Tab {
|
object MoreTab : Tab {
|
||||||
|
|
||||||
override val options: TabOptions
|
override val options: TabOptions
|
||||||
@Composable
|
@Composable
|
||||||
|
Loading…
Reference in New Issue
Block a user