Merge pull request #239 from JDonadio/fix/spinner-history

Show loading spinner at the end of tx history list
This commit is contained in:
Gustavo Maximiliano Cortez 2016-10-03 16:23:29 -03:00 committed by GitHub
commit b9be248995
2 changed files with 24 additions and 25 deletions

View File

@ -9,6 +9,7 @@
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content delegate-handle="my-handle"> <ion-content delegate-handle="my-handle">
<div class="oh pr" ng-show="wallet && wallet.isComplete()"> <div class="oh pr" ng-show="wallet && wallet.isComplete()">
<div ng-style="{'background-color':wallet.color}" class="amount"> <div ng-style="{'background-color':wallet.color}" class="amount">
@ -103,7 +104,6 @@
</div> </div>
</div> </div>
<!-- Transactions --> <!-- Transactions -->
<div class="oh pr m20t text-gray size-12 text-center" <div class="oh pr m20t text-gray size-12 text-center"
@ -173,15 +173,12 @@
</div> </div>
<span class="label tu warning radius" ng-if="btx.action == 'invalid'" translate>Invalid</span> <span class="label tu warning radius" ng-if="btx.action == 'invalid'" translate>Invalid</span>
</h2> </h2>
</div> </div>
</div>
<ion-infinite-scroll <ion-infinite-scroll
ng-if="txHistoryShowMore" ng-if="txHistoryShowMore"
on-infinite="showMore()" on-infinite="showMore()"
distance="1%"> distance="1%">
</ion-infinite-scroll> </ion-infinite-scroll>
</div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View File

@ -153,9 +153,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
}; };
$scope.showMore = function() { $scope.showMore = function() {
$timeout(function() {
currentTxHistoryPage++; currentTxHistoryPage++;
$scope.showHistory(); $scope.showHistory();
$scope.$broadcast('scroll.infiniteScrollComplete'); $scope.$broadcast('scroll.infiniteScrollComplete');
}, 100);
}; };
$scope.updateAll = function(force, cb)  { $scope.updateAll = function(force, cb)  {