Expose ProgressInfoRole also for other type of attachments

This commit is contained in:
Carl Schwan
2025-01-10 11:05:25 +01:00
parent 21f5ee74ba
commit aa5ece8bfb

View File

@@ -505,7 +505,8 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
if (role == ProgressInfoRole) {
if (auto e = eventCast<const RoomMessageEvent>(&evt)) {
if (e->has<EventContent::FileContent>()) {
if (e->has<EventContent::FileContent>() || e->has<EventContent::ImageContent>() || e->has<EventContent::VideoContent>()
|| e->has<EventContent::AudioContent>()) {
return QVariant::fromValue(m_currentRoom->cachedFileTransferInfo(&evt));
}
}