mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 00:15:08 +01:00
Fix missing downloaded only/incognito banners in Browse
This commit is contained in:
parent
3fa68ed217
commit
bbf5c86b46
@ -21,6 +21,8 @@ fun TabbedScreen(
|
||||
@StringRes titleRes: Int,
|
||||
tabs: List<TabContent>,
|
||||
startIndex: Int? = null,
|
||||
incognitoMode: Boolean,
|
||||
downloadedOnlyMode: Boolean,
|
||||
) {
|
||||
val scope = rememberCoroutineScope()
|
||||
val state = rememberPagerState()
|
||||
@ -57,6 +59,13 @@ fun TabbedScreen(
|
||||
}
|
||||
}
|
||||
|
||||
if (downloadedOnlyMode) {
|
||||
DownloadedOnlyModeBanner()
|
||||
}
|
||||
if (incognitoMode) {
|
||||
IncognitoModeBanner()
|
||||
}
|
||||
|
||||
HorizontalPager(
|
||||
count = tabs.size,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
|
@ -1,6 +1,5 @@
|
||||
package eu.kanade.presentation.library.components
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.material3.ScrollableTabRow
|
||||
import androidx.compose.material3.Tab
|
||||
@ -31,8 +30,6 @@ fun LibraryTabs(
|
||||
) {
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
val pillAlpha = if (isSystemInDarkTheme()) 0.12f else 0.08f
|
||||
|
||||
Column {
|
||||
ScrollableTabRow(
|
||||
selectedTabIndex = state.currentPage,
|
||||
|
@ -39,6 +39,8 @@ class BrowseController : FullComposeController<BrowsePresenter>, RootController
|
||||
migrateSourcesTab(router, presenter.migrationSourcesPresenter),
|
||||
),
|
||||
startIndex = 1.takeIf { toExtensions },
|
||||
incognitoMode = presenter.isIncognitoMode,
|
||||
downloadedOnlyMode = presenter.isDownloadOnly,
|
||||
)
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
|
@ -1,13 +1,21 @@
|
||||
package eu.kanade.tachiyomi.ui.browse
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.compose.runtime.getValue
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||
import eu.kanade.tachiyomi.ui.browse.extension.ExtensionsPresenter
|
||||
import eu.kanade.tachiyomi.ui.browse.migration.sources.MigrationSourcesPresenter
|
||||
import eu.kanade.tachiyomi.ui.browse.source.SourcesPresenter
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
|
||||
class BrowsePresenter : BasePresenter<BrowseController>() {
|
||||
class BrowsePresenter(
|
||||
preferences: PreferencesHelper = Injekt.get(),
|
||||
) : BasePresenter<BrowseController>() {
|
||||
|
||||
val isDownloadOnly: Boolean by preferences.downloadedOnly().asState()
|
||||
val isIncognitoMode: Boolean by preferences.incognitoMode().asState()
|
||||
|
||||
val sourcesPresenter = SourcesPresenter(presenterScope)
|
||||
val extensionsPresenter = ExtensionsPresenter(presenterScope)
|
||||
|
Loading…
Reference in New Issue
Block a user