mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Close search bar when opening bottom sheet and vice versa
This commit is contained in:
parent
3f868e02fe
commit
3b561275a4
2 changed files with 5 additions and 0 deletions
|
|
@ -790,6 +790,9 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
||||||
viewModel.focusSearchBarEvent.observe(viewLifecycleOwner) {
|
viewModel.focusSearchBarEvent.observe(viewLifecycleOwner) {
|
||||||
it.consume { show ->
|
it.consume { show ->
|
||||||
if (show) {
|
if (show) {
|
||||||
|
val bottomSheetBehavior = BottomSheetBehavior.from(binding.messageBottomSheet.root)
|
||||||
|
bottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||||
|
|
||||||
// To automatically open keyboard
|
// To automatically open keyboard
|
||||||
binding.search.showKeyboard()
|
binding.search.showKeyboard()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1346,6 +1349,7 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
||||||
showDelivery: Boolean = false,
|
showDelivery: Boolean = false,
|
||||||
showReactions: Boolean = false
|
showReactions: Boolean = false
|
||||||
) {
|
) {
|
||||||
|
viewModel.closeSearchBar()
|
||||||
binding.sendArea.messageToSend.hideKeyboard()
|
binding.sendArea.messageToSend.hideKeyboard()
|
||||||
backPressedCallback.isEnabled = true
|
backPressedCallback.isEnabled = true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -647,6 +647,7 @@ class MessageModel
|
||||||
if (textContent != null) {
|
if (textContent != null) {
|
||||||
computeTextContent(textContent, highlight)
|
computeTextContent(textContent, highlight)
|
||||||
}
|
}
|
||||||
|
isSelected.postValue(highlight.isNotEmpty())
|
||||||
}
|
}
|
||||||
|
|
||||||
@WorkerThread
|
@WorkerThread
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue