From 5bff9df4ae3291598549fc0904725a1ec3c416e3 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 15 Sep 2021 23:38:01 +0200 Subject: [PATCH] Workaround for broken fetchMore() with reuseItems --- src/timeline/TimelineModel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index ca303040..e03c32a7 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -717,6 +717,10 @@ TimelineModel::data(const QModelIndex &index, int role) const if (index.row() < 0 && index.row() >= rowCount()) return QVariant(); + // HACK(Nico): fetchMore likes to break with dynamically sized delegates and reuseItems + if (index.row() + 1 == rowCount() && !m_paginationInProgress) + const_cast(this)->fetchMore(index); + auto event = events.get(rowCount() - index.row() - 1); if (!event)