Fixed issue with message received & dislay in a chat room for which the sliding pane was closed but fragment wasn't paused or destroyed
This commit is contained in:
parent
0404777c32
commit
fc6792687c
1 changed files with 2 additions and 1 deletions
|
@ -255,7 +255,7 @@ class DetailChatRoomFragment : MasterFragment<ChatRoomDetailFragmentBinding, Cha
|
||||||
|
|
||||||
override fun onScrolledToEnd() {
|
override fun onScrolledToEnd() {
|
||||||
viewModel.isUserScrollingUp.value = false
|
viewModel.isUserScrollingUp.value = false
|
||||||
if (viewModel.unreadMessagesCount.value != 0) {
|
if (viewModel.unreadMessagesCount.value != 0 && coreContext.notificationsManager.currentlyDisplayedChatRoomAddress != null) {
|
||||||
Log.i("[Chat Room] User has scrolled to the latest message, mark chat room as read")
|
Log.i("[Chat Room] User has scrolled to the latest message, mark chat room as read")
|
||||||
viewModel.chatRoom.markAsRead()
|
viewModel.chatRoom.markAsRead()
|
||||||
}
|
}
|
||||||
|
@ -649,6 +649,7 @@ class DetailChatRoomFragment : MasterFragment<ChatRoomDetailFragmentBinding, Cha
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun goBack() {
|
override fun goBack() {
|
||||||
|
coreContext.notificationsManager.currentlyDisplayedChatRoomAddress = null
|
||||||
if (!findNavController().popBackStack()) {
|
if (!findNavController().popBackStack()) {
|
||||||
if (sharedViewModel.isSlidingPaneSlideable.value == true) {
|
if (sharedViewModel.isSlidingPaneSlideable.value == true) {
|
||||||
if (_adapter != null) {
|
if (_adapter != null) {
|
||||||
|
|
Loading…
Reference in a new issue