diff --git a/public/views/includes/topbar.html b/public/views/includes/topbar.html index bbda0916c..1a7f28d40 100644 --- a/public/views/includes/topbar.html +++ b/public/views/includes/topbar.html @@ -1,5 +1,5 @@ - + ng-click="topbar.goHome(); index.setCompactTxHistory(); closeToHome = null"> {{'Close'|translate}} - + diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index 928c830e9..87a564471 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -926,7 +926,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r if (walletId == profileService.focusedClient.credentials.walletId) { self.completeHistory = newHistory; self.txHistory = newHistory.slice(0, self.historyShowLimit); - self.historyShowShowAll = newHistory.length >= self.historyShowLimit; + self.historyShowShowAll = newHistory.length > self.historyShowLimit; } return storageService.setTxHistory(JSON.stringify(newHistory), walletId, function() { @@ -935,6 +935,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r }); }); } + self.showAllHistory = function() { self.historyShowShowAll = false; self.historyRendering = true; @@ -995,6 +996,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r }); }; + self.setCompactTxHistory = function() { + self.txHistory = self.completeHistory.slice(0, self.historyShowLimit); + if (self.completeHistory.length > self.historyShowLimit) + self.historyShowShowAll = true; + }; + self.debounceUpdateHistory = lodash.debounce(function() { self.updateHistory(); }, 1000);