Merge pull request from zfox23/MS16012_emptyHistoryFix

Fix MS16012: Correct the criteria used to determine empty txn history
This commit is contained in:
Zach Fox 2018-06-19 12:01:51 -07:00 committed by GitHub
commit a4d47a0248
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -253,8 +253,12 @@ Item {
anchors.left: parent.left;
anchors.right: parent.right;
Item { // On empty history. We don't want to flash and then replace, so don't show until we know we're zero.
visible: transactionHistoryModel.count === 0 && transactionHistoryModel.currentPageToRetrieve < 0;
Item {
// On empty history. We don't want to flash and then replace, so don't show until we know we should.
// The history is empty when it contains 1 item (the pending item count) AND there are no pending items.
visible: transactionHistoryModel.count === 1 &&
transactionHistoryModel.retrievedAtLeastOnePage &&
transactionHistoryModel.get(0).count === 0;
anchors.centerIn: parent;
width: parent.width - 12;
height: parent.height;