mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
fix(ChatRoom): mark as read correctly chat message
This commit is contained in:
parent
5c857c2db1
commit
987fca9499
2 changed files with 6 additions and 10 deletions
|
|
@ -228,7 +228,7 @@ void ChatRoomPrivate::storeOrUpdateMessage (const shared_ptr<ChatMessage> &msg)
|
|||
|
||||
void ChatRoomPrivate::sendMessage (const shared_ptr<ChatMessage> &msg) {
|
||||
L_Q();
|
||||
|
||||
|
||||
msg->getPrivate()->setDirection(ChatMessage::Direction::Outgoing);
|
||||
|
||||
/* Add to transient list */
|
||||
|
|
@ -556,6 +556,11 @@ void ChatRoom::markAsRead () {
|
|||
chatMessage->sendDisplayNotification();
|
||||
|
||||
dCore->mainDb->markChatMessagesAsRead(peerAddress);
|
||||
|
||||
if (d->pendingMessage) {
|
||||
d->pendingMessage->updateState(ChatMessage::State::Displayed);
|
||||
d->pendingMessage->sendDisplayNotification();
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -129,15 +129,6 @@ LinphoneCall *RealTimeTextChatRoom::getCall () const {
|
|||
return d->call;
|
||||
}
|
||||
|
||||
void RealTimeTextChatRoom::markAsRead () {
|
||||
L_D();
|
||||
ChatRoom::markAsRead();
|
||||
if (d->pendingMessage) {
|
||||
d->pendingMessage->updateState(ChatMessage::State::Displayed);
|
||||
d->pendingMessage->sendDisplayNotification();
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void RealTimeTextChatRoom::onChatMessageReceived(const shared_ptr<ChatMessage> &msg) {}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue