mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-30 18:29:21 +00:00
Show message bottom sheet for 1-1 chat room
This commit is contained in:
parent
c166c87479
commit
077e625512
2 changed files with 10 additions and 16 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue