Skip to content

Commit

Permalink
add back button on smartsearch source (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-tran authored Aug 28, 2024
1 parent 9a12a90 commit 9def7e7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import cafe.adriel.voyager.navigator.LocalNavigator
import eu.kanade.presentation.components.AppBar
import eu.kanade.presentation.components.AppBarActions
import eu.kanade.presentation.components.TabContent
Expand All @@ -13,6 +14,7 @@ import tachiyomi.presentation.core.i18n.stringResource
@Composable
fun BrowseTabWrapper(tab: TabContent) {
val snackbarHostState = remember { SnackbarHostState() }
val navigator = LocalNavigator.current
Scaffold(
topBar = { scrollBehavior ->
AppBar(
Expand All @@ -21,6 +23,7 @@ fun BrowseTabWrapper(tab: TabContent) {
AppBarActions(tab.actions)
},
scrollBehavior = scrollBehavior,
navigateUp = { navigator?.pop() },
)
},
snackbarHost = { SnackbarHost(hostState = snackbarHostState) },
Expand Down

0 comments on commit 9def7e7

Please sign in to comment.