Commit fbc3d880 authored by Martin Klapetek's avatar Martin Klapetek Committed by Alexander Akulich

[declarative] Update the previous message when sending message too

parent 26942071
......@@ -245,6 +245,14 @@ void MessagesModel::onMessageReceived(const Tp::ReceivedMessage &message)
endInsertRows();
// Update the previous message in the view
// This will redraw the part of the bubble to not
// be bottom but middle one, if this is a consecutive
// message to the previous one
if (d->messages.count() > 1) {
Q_EMIT dataChanged(createIndex(newMessageIndex - 1, 0), createIndex(newMessageIndex - 1, 0));
}
if (d->visible) {
acknowledgeAllMessages();
} else {
......@@ -271,6 +279,14 @@ void MessagesModel::onMessageSent(const Tp::Message &message, Tp::MessageSending
}
endInsertRows();
// Update the previous message in the view
// This will redraw the part of the bubble to not
// be bottom but middle one, if this is a consecutive
// message to the previous one
if (d->messages.count() > 1) {
Q_EMIT dataChanged(createIndex(newMessageIndex - 1, 0), createIndex(newMessageIndex - 1, 0));
}
}
void MessagesModel::onPendingMessageRemoved()
......
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