mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix stack overflow when filtering timeline
This commit is contained in:
parent
329b4310b3
commit
f440b41195
2 changed files with 5 additions and 3 deletions
|
@ -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();
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue