From 65ec42d0de809592ee23da642dbb57c166b9f067 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sun, 22 Feb 2015 21:58:49 +0100 Subject: [PATCH] Allow downloading new posts only if the running indicator is not running --- src/qml/danbooruimageview.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/qml/danbooruimageview.qml b/src/qml/danbooruimageview.qml index 716ca99..2fb0ad3 100644 --- a/src/qml/danbooruimageview.qml +++ b/src/qml/danbooruimageview.qml @@ -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(); }