From a7cb33d8c9d84e41977b488d4b7a54afc48cb61f Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 12 Feb 2023 18:17:03 -0500 Subject: [PATCH] Open global search when Browse is tapped twice Closes #3925 --- .../main/java/eu/kanade/tachiyomi/ui/browse/BrowseTab.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowseTab.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowseTab.kt index d748779a6..58ee5a047 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowseTab.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/BrowseTab.kt @@ -10,6 +10,7 @@ import androidx.compose.runtime.getValue import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import cafe.adriel.voyager.core.model.rememberScreenModel +import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.tab.LocalTabNavigator import cafe.adriel.voyager.navigator.tab.TabOptions import eu.kanade.presentation.components.TabbedScreen @@ -18,6 +19,7 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.browse.extension.ExtensionsScreenModel import eu.kanade.tachiyomi.ui.browse.extension.extensionsTab import eu.kanade.tachiyomi.ui.browse.migration.sources.migrateSourceTab +import eu.kanade.tachiyomi.ui.browse.source.globalsearch.GlobalSearchScreen import eu.kanade.tachiyomi.ui.browse.source.sourcesTab import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.util.storage.DiskUtil @@ -38,6 +40,10 @@ data class BrowseTab( ) } + override suspend fun onReselect(navigator: Navigator) { + navigator.push(GlobalSearchScreen()) + } + @Composable override fun Content() { val context = LocalContext.current