mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed delete conversation history not updating chat messages list after going back
This commit is contained in:
parent
ce1cb3a15a
commit
d58edf0614
3 changed files with 13 additions and 0 deletions
|
|
@ -433,6 +433,13 @@ class ConversationFragment : GenericFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
sharedViewModel.forceRefreshConversationEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
Log.i("$TAG Force refreshing chat messages list")
|
||||
viewModel.applyFilter("")
|
||||
}
|
||||
}
|
||||
|
||||
binding.sendArea.messageToSend.setControlEnterListener(object :
|
||||
RichEditText.RichEditTextSendListener {
|
||||
override fun onControlEnterPressedAndReleased() {
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ class ConversationInfoFragment : GenericFragment() {
|
|||
(view.parent as? ViewGroup)?.doOnPreDraw {
|
||||
Log.e("$TAG Failed to find chat room, going back")
|
||||
goBack()
|
||||
// TODO: show toast ?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -139,6 +140,7 @@ class ConversationInfoFragment : GenericFragment() {
|
|||
it.consume {
|
||||
// TODO: show toast ?
|
||||
Log.i("$TAG History has been deleted, leaving conversation info...")
|
||||
sharedViewModel.forceRefreshConversationEvent.value = Event(true)
|
||||
goBack()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,10 @@ class SharedMainViewModel @UiThread constructor() : ViewModel() {
|
|||
// When using keyboard to share gif or other, see RichContentReceiver & RichEditText classes
|
||||
val richContentUri = MutableLiveData<Event<Uri>>()
|
||||
|
||||
val forceRefreshConversationEvent: MutableLiveData<Event<Boolean>> by lazy {
|
||||
MutableLiveData<Event<Boolean>>()
|
||||
}
|
||||
|
||||
/* Meetings related */
|
||||
|
||||
val forceRefreshMeetingsListEvent: MutableLiveData<Event<Boolean>> by lazy {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue