diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index abfe28a9..7b3f0729 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -344,6 +344,7 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj
&EventStore::dataChanged,
this,
[this](int from, int to) {
+ relatedEventCacheBuster++;
nhlog::ui()->debug(
"data changed {} to {}", events.size() - to - 1, events.size() - from - 1);
emit dataChanged(index(events.size() - to - 1, 0),
@@ -443,6 +444,7 @@ TimelineModel::roleNames() const
{RoomTopic, "roomTopic"},
{CallType, "callType"},
{Dump, "dump"},
+ {RelatedEventCacheBuster, "relatedEventCacheBuster"},
};
}
int
@@ -676,6 +678,8 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r
return QVariant(m);
}
+ case RelatedEventCacheBuster:
+ return relatedEventCacheBuster;
default:
return QVariant();
}
diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index 0e2895d4..3c80ade8 100644
--- a/src/timeline/TimelineModel.h
+++ b/src/timeline/TimelineModel.h
@@ -208,6 +208,7 @@ public:
RoomTopic,
CallType,
Dump,
+ RelatedEventCacheBuster,
};
Q_ENUM(Roles);
@@ -400,6 +401,8 @@ private:
int notification_count = 0, highlight_count = 0;
+ unsigned int relatedEventCacheBuster = 0;
+
bool decryptDescription = true;
bool m_paginationInProgress = false;
bool isSpace_ = false;
|