Refresh all reply roles on loadReply

Make sure that all reply roles that depend on a pointer to the reply event being available are refreshed.
This commit is contained in:
James Graham
2023-05-10 16:41:22 +00:00
parent b362365609
commit 6e5b71888d

View File

@@ -1085,7 +1085,7 @@ void MessageEventModel::loadReply(const QModelIndex &index)
QPersistentModelIndex persistentIndex(index);
connect(job, &BaseJob::success, this, [this, job, persistentIndex] {
m_extraEvents.push_back(fromJson<event_ptr_tt<RoomEvent>>(job->jsonData()));
Q_EMIT dataChanged(persistentIndex, persistentIndex, {ReplyRole});
Q_EMIT dataChanged(persistentIndex, persistentIndex, {ReplyRole, ReplyMediaInfoRole, ReplyAuthor});
});
}