diff --git a/app/src/main/java/eu/kanade/presentation/components/TabbedScreen.kt b/app/src/main/java/eu/kanade/presentation/components/TabbedScreen.kt index 6f4c1ea76..806318d52 100644 --- a/app/src/main/java/eu/kanade/presentation/components/TabbedScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/components/TabbedScreen.kt @@ -21,6 +21,8 @@ fun TabbedScreen( @StringRes titleRes: Int, tabs: List, 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(), diff --git a/app/src/main/java/eu/kanade/presentation/library/components/LibraryTabs.kt b/app/src/main/java/eu/kanade/presentation/library/components/LibraryTabs.kt index 388f96917..b256805f1 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/LibraryTabs.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/LibraryTabs.kt @@ -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, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowseController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowseController.kt index 60bc43ad2..af35024ce 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowseController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowseController.kt @@ -39,6 +39,8 @@ class BrowseController : FullComposeController, RootController migrateSourcesTab(router, presenter.migrationSourcesPresenter), ), startIndex = 1.takeIf { toExtensions }, + incognitoMode = presenter.isIncognitoMode, + downloadedOnlyMode = presenter.isDownloadOnly, ) LaunchedEffect(Unit) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowsePresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowsePresenter.kt index 7ced73592..194e7ddeb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowsePresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowsePresenter.kt @@ -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() { +class BrowsePresenter( + preferences: PreferencesHelper = Injekt.get(), +) : BasePresenter() { + + val isDownloadOnly: Boolean by preferences.downloadedOnly().asState() + val isIncognitoMode: Boolean by preferences.incognitoMode().asState() val sourcesPresenter = SourcesPresenter(presenterScope) val extensionsPresenter = ExtensionsPresenter(presenterScope)