mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:18:52 +02:00
Fix MS17469: Fix conditionals for needing more paginated results when ListView changes
This commit is contained in:
parent
16b483b338
commit
4248f342b4
1 changed files with 3 additions and 1 deletions
|
@ -57,9 +57,9 @@ ListModel {
|
||||||
// Not normally set directly, but rather by giving a truthy argument to getFirstPage(true);
|
// Not normally set directly, but rather by giving a truthy argument to getFirstPage(true);
|
||||||
property bool delayedClear: false;
|
property bool delayedClear: false;
|
||||||
function resetModel() {
|
function resetModel() {
|
||||||
if (!delayedClear) { root.clear(); }
|
|
||||||
currentPageToRetrieve = 1;
|
currentPageToRetrieve = 1;
|
||||||
retrievedAtLeastOnePage = false;
|
retrievedAtLeastOnePage = false;
|
||||||
|
if (!delayedClear) { root.clear(); }
|
||||||
totalPages = 0;
|
totalPages = 0;
|
||||||
totalEntries = 0;
|
totalEntries = 0;
|
||||||
}
|
}
|
||||||
|
@ -94,11 +94,13 @@ ListModel {
|
||||||
function needsMoreHorizontalResults() {
|
function needsMoreHorizontalResults() {
|
||||||
return flickable
|
return flickable
|
||||||
&& currentPageToRetrieve > 0
|
&& currentPageToRetrieve > 0
|
||||||
|
&& retrievedAtLeastOnePage
|
||||||
&& flickable.contentWidth < flickable.width;
|
&& flickable.contentWidth < flickable.width;
|
||||||
}
|
}
|
||||||
function needsMoreVerticalResults() {
|
function needsMoreVerticalResults() {
|
||||||
return flickable
|
return flickable
|
||||||
&& currentPageToRetrieve > 0
|
&& currentPageToRetrieve > 0
|
||||||
|
&& retrievedAtLeastOnePage
|
||||||
&& flickable.contentHeight < flickable.height;
|
&& flickable.contentHeight < flickable.height;
|
||||||
}
|
}
|
||||||
function getNextPageIfNotEnoughHorizontalResults() {
|
function getNextPageIfNotEnoughHorizontalResults() {
|
||||||
|
|
Loading…
Reference in a new issue