Unhighlight highlightes search result on scroll
This commit is contained in:
parent
336be61521
commit
5c44276b26
@ -284,6 +284,7 @@ fun PagerScaffold(
|
|||||||
override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
|
override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
|
||||||
if (source == NestedScrollSource.Drag && available.y.absoluteValue > available.x.absoluteValue * 2) {
|
if (source == NestedScrollSource.Drag && available.y.absoluteValue > available.x.absoluteValue * 2) {
|
||||||
keyboardController?.hide()
|
keyboardController?.hide()
|
||||||
|
searchVM.bestMatch.value = null
|
||||||
}
|
}
|
||||||
return super.onPreScroll(available, source)
|
return super.onPreScroll(available, source)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -279,6 +279,7 @@ fun PullDownScaffold(
|
|||||||
if (isWidgetEditMode || source != NestedScrollSource.Drag) return Offset.Zero
|
if (isWidgetEditMode || source != NestedScrollSource.Drag) return Offset.Zero
|
||||||
if (available.y.absoluteValue > available.x.absoluteValue * 2) {
|
if (available.y.absoluteValue > available.x.absoluteValue * 2) {
|
||||||
keyboardController?.hide()
|
keyboardController?.hide()
|
||||||
|
searchVM.bestMatch.value = null
|
||||||
}
|
}
|
||||||
val canPullDown = if (isSearchOpen) {
|
val canPullDown = if (isSearchOpen) {
|
||||||
isSearchAtTop
|
isSearchAtTop
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user