feat: Add back navigation to clear source search query

This commit is contained in:
Cuong-Tran 2024-07-02 23:56:39 +07:00 committed by Tran M. Cuong
parent 799de48b7d
commit 0147f830be

View file

@ -1,5 +1,6 @@
package eu.kanade.presentation.browse
import androidx.activity.compose.BackHandler
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.expandVertically
import androidx.compose.animation.shrinkVertically
@ -94,6 +95,10 @@ fun SourcesScreen(
) {
// KMK -->
val lazyListState = rememberLazyListState()
BackHandler(enabled = !state.searchQuery.isNullOrBlank()) {
onChangeSearchQuery(null)
}
// KMK <--
when {