Add a poolMode property to QML

Pools don't need infinite scrolling, so set a property which will be
handled from C++ to disable the behavior.

TODO: Ensure that pools with items > 100 are handled.
This commit is contained in:
Luca Beltrame 2015-02-15 00:59:25 +01:00
parent 5a4d2afa84
commit 21360fbe2f

View file

@ -32,6 +32,8 @@ Rectangle {
width: 500
height: 500
property bool poolMode: false;
KRun {
id: runner
@ -202,8 +204,8 @@ Rectangle {
Component.onCompleted: { currentIndex = -1; forceActiveFocus()}
onAtYEndChanged: {
if (grid.atYEnd) {
danbooruService.nextPostPage()
if (grid.atYEnd && danbooruModel.rowCount > 0 && !rootObj.poolMode) {
danbooruService.nextPostPage()
}
}