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);
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();
invalidateFilter();

View File

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