Show message bottom sheet for 1-1 chat room

This commit is contained in:
Sylvain Berfini 2023-10-24 14:33:19 +02:00
parent c166c87479
commit 077e625512
2 changed files with 10 additions and 16 deletions

View file

@ -195,21 +195,13 @@ class ConversationFragment : GenericFragment() {
adapter.showDeliveryForChatMessageModelEvent.observe(viewLifecycleOwner) {
it.consume { model ->
if (viewModel.isGroup.value == true) {
showDeliveryBottomSheetDialog(model, showDelivery = true)
} else {
Log.w("$TAG Conversation is not a group, not showing delivery bottom sheet")
}
showDeliveryBottomSheetDialog(model, showDelivery = true)
}
}
adapter.showReactionForChatMessageModelEvent.observe(viewLifecycleOwner) {
it.consume { model ->
if (viewModel.isGroup.value == true) {
showDeliveryBottomSheetDialog(model, showReactions = true)
} else {
Log.w("$TAG Conversation is not a group, not showing reactions bottom sheet")
}
showDeliveryBottomSheetDialog(model, showReactions = true)
}
}

View file

@ -67,13 +67,15 @@ class ChatMessageDeliveryModel @WorkerThread constructor(
)
)
}
// Always add ourselves to prevent empty list
displayedModels.add(
ChatMessageBottomSheetParticipantModel(
chatMessage.localAddress,
TimestampUtils.timeToString(chatMessage.time)
if (!chatMessage.isOutgoing) {
// Always add ourselves to prevent empty list
displayedModels.add(
ChatMessageBottomSheetParticipantModel(
chatMessage.localAddress,
TimestampUtils.timeToString(chatMessage.time)
)
)
)
}
val readCount = displayedModels.size.toString()
readLabel.postValue(
AppUtils.getFormattedString(