mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #3852 from tanojaja/fix/responsiveness
reduces the response time when close preferences
This commit is contained in:
commit
e8af7bdda3
|
@ -1,5 +1,5 @@
|
|||
<nav ng-controller="topbarController as topbar"
|
||||
class="tab-bar"
|
||||
<nav ng-controller="topbarController as topbar"
|
||||
class="tab-bar"
|
||||
ng-style="{'background-color': noColor ? '#4B6178' : index.backgroundColor}">
|
||||
<section class="left-small">
|
||||
<a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet"
|
||||
|
@ -11,13 +11,13 @@
|
|||
</a>
|
||||
|
||||
<a ng-show="closeToHome" class="p10 "
|
||||
ng-click="topbar.goHome(); closeToHome = null">
|
||||
ng-click="topbar.goHome(); index.setCompactTxHistory(); closeToHome = null">
|
||||
<span class="text-close">{{'Close'|translate}}</span>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section class="right-small" ng-show="showPreferences && !index.noFocusedWallet">
|
||||
<a class="p10" ng-click="topbar.goPreferences()">
|
||||
<a class="p10" ng-click="topbar.goPreferences(); index.setCompactTxHistory()">
|
||||
<i class="fi-widget size-24"></i>
|
||||
</a>
|
||||
</section>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue