Allow downloading new posts only if the running indicator is not running

This commit is contained in:
Luca Beltrame 2015-02-22 21:58:49 +01:00
parent d9db707e7c
commit 65ec42d0de

View file

@ -231,7 +231,15 @@ Rectangle {
onAtYEndChanged: {
if (grid.atYEnd && danbooruModel.rowCount() > 0 && !rootObj.poolMode && infiniteScroll) {
// Download only if at end, if there are posts, if
// we are not displaying a pool, if the option is set
// and if we're not already downloading something
if (grid.atYEnd && danbooruModel.rowCount() > 0 &&
!rootObj.poolMode &&
infiniteScroll &&
!runningIndicator.running) {
rootObj.downloadStarted()
danbooruService.nextPostPage();
}