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
int row = mEntries.count();
beginInsertRows(QModelIndex(), row, row);
mEntries << qMakePair(
QVariantMap{
{ "type", EntryType::MessageEntry },
{ "timestamp", QDateTime::fromMSecsSinceEpoch(message->getTime() * 1000) }
},
static_pointer_cast<void>(message)
);
QVariantMap map{
{ "type", EntryType::MessageEntry },
{ "timestamp", QDateTime::fromMSecsSinceEpoch(message->getTime() * 1000) }
};
fillMessageEntry(map, message);
mEntries << qMakePair(map, static_pointer_cast<void>(message));
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