Commit 4ece007e authored by Ronan's avatar Ronan

fix(ChatModel): fetch contents before insert message at end

parent 8d8fb551
...@@ -672,13 +672,14 @@ void ChatModel::insertMessageAtEnd (const shared_ptr<linphone::ChatMessage> &mes ...@@ -672,13 +672,14 @@ void ChatModel::insertMessageAtEnd (const shared_ptr<linphone::ChatMessage> &mes
int row = mEntries.count(); int row = mEntries.count();
beginInsertRows(QModelIndex(), row, row); beginInsertRows(QModelIndex(), row, row);
mEntries << qMakePair(
QVariantMap{ QVariantMap map{
{ "type", EntryType::MessageEntry }, { "type", EntryType::MessageEntry },
{ "timestamp", QDateTime::fromMSecsSinceEpoch(message->getTime() * 1000) } { "timestamp", QDateTime::fromMSecsSinceEpoch(message->getTime() * 1000) }
}, };
static_pointer_cast<void>(message) fillMessageEntry(map, message);
); mEntries << qMakePair(map, static_pointer_cast<void>(message));
endInsertRows(); endInsertRows();
} }
......
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