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:
@@ -1085,7 +1085,7 @@ void MessageEventModel::loadReply(const QModelIndex &index)
|
|||||||
QPersistentModelIndex persistentIndex(index);
|
QPersistentModelIndex persistentIndex(index);
|
||||||
connect(job, &BaseJob::success, this, [this, job, persistentIndex] {
|
connect(job, &BaseJob::success, this, [this, job, persistentIndex] {
|
||||||
m_extraEvents.push_back(fromJson<event_ptr_tt<RoomEvent>>(job->jsonData()));
|
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});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user