Fix stack overflow when filtering timeline

This commit is contained in:
Nicolas Werner 2022-11-22 19:18:10 +01:00
parent 329b4310b3
commit f440b41195
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 5 additions and 3 deletions

View file

@ -69,7 +69,8 @@ TimelineFilter::setSource(TimelineModel *s)
this->setSourceModel(s); this->setSourceModel(s);
connect(s, &TimelineModel::currentIndexChanged, this, &TimelineFilter::currentIndexChanged); connect(s, &TimelineModel::currentIndexChanged, this, &TimelineFilter::currentIndexChanged);
connect(s, &TimelineModel::fetchedMore, this, &TimelineFilter::fetchAgain); connect(
s, &TimelineModel::fetchedMore, this, &TimelineFilter::fetchAgain, Qt::QueuedConnection);
emit sourceChanged(); emit sourceChanged();
invalidateFilter(); invalidateFilter();

View file

@ -880,6 +880,9 @@ TimelineModel::setPaginationInProgress(const bool paginationInProgress)
m_paginationInProgress = paginationInProgress; m_paginationInProgress = paginationInProgress;
emit paginationInProgressChanged(m_paginationInProgress); emit paginationInProgressChanged(m_paginationInProgress);
if (m_paginationInProgress)
events.fetchMore();
} }
void void
@ -891,8 +894,6 @@ TimelineModel::fetchMore(const QModelIndex &)
} }
setPaginationInProgress(true); setPaginationInProgress(true);
events.fetchMore();
} }
void void