Commit 987fca94 authored by Ronan's avatar Ronan

fix(ChatRoom): mark as read correctly chat message

parent 5c857c2d
......@@ -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) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment