handle back button

This commit is contained in:
Cuong M. Tran 2024-03-01 16:40:32 +07:00 committed by Cuong Tran
parent 459bbcc9bd
commit 468518bdc3
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.ui.browse.feed
import androidx.activity.compose.BackHandler
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Bookmark
import androidx.compose.material.icons.outlined.Add
@ -60,6 +61,14 @@ fun Screen.feedTab(
}
}
// KMK -->
BackHandler(enabled = state.selection.isNotEmpty()) {
when {
state.selection.isNotEmpty() -> screenModel.clearSelection()
}
}
// KMK <--
return TabContent(
titleRes = SYMR.strings.feed,
actions =