loading new txs using pagination
This commit is contained in:
parent
c27bfcb800
commit
0ae6f043ed
3 changed files with 105 additions and 13 deletions
|
|
@ -256,11 +256,18 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
return !tx.confirmations || tx.confirmations === 0;
|
||||
};
|
||||
|
||||
var loadingTxs = false;
|
||||
$scope.showMore = function() {
|
||||
if (loadingTxs)
|
||||
return;
|
||||
loadingTxs = true;
|
||||
$timeout(function() {
|
||||
currentTxHistoryPage++;
|
||||
$scope.showHistory();
|
||||
$scope.$broadcast('scroll.infiniteScrollComplete');
|
||||
walletService.getMoreTxs($scope.wallet, function() {
|
||||
currentTxHistoryPage++;
|
||||
$scope.showHistory();
|
||||
$scope.$broadcast('scroll.infiniteScrollComplete');
|
||||
loadingTxs = false;
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue