Skip to content
Snippets Groups Projects
Commit 32136470 authored by Nicolas Vengeon's avatar Nicolas Vengeon Committed by Sébastien Blin
Browse files

messageListModel: improve load time

Change-Id: Ica33126a1d75b4880c70c1e7f654f82db6499bbd
parent 8dda44b5
No related branches found
No related tags found
No related merge requests found
......@@ -417,8 +417,11 @@ MessageListModel::isOnlyEmoji(const QString& text) const
QVariant
MessageListModel::dataForItem(item_t item, int, int role) const
{
auto replyId = item.second.commit["reply-to"];
auto repliedMsg = getIndexOfMessage(replyId);
QString replyId = item.second.commit["reply-to"];
int repliedMsg;
if (!replyId.isEmpty() && (role == Role::ReplyToAuthor || role == Role::ReplyToBody)) {
repliedMsg = getIndexOfMessage(replyId);
}
switch (role) {
case Role::Id:
return QVariant(item.first);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment