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
|
@ -11,13 +11,13 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a ng-show="closeToHome" class="p10 "
|
<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>
|
<span class="text-close">{{'Close'|translate}}</span>
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="right-small" ng-show="showPreferences && !index.noFocusedWallet">
|
<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>
|
<i class="fi-widget size-24"></i>
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -926,7 +926,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
if (walletId == profileService.focusedClient.credentials.walletId) {
|
if (walletId == profileService.focusedClient.credentials.walletId) {
|
||||||
self.completeHistory = newHistory;
|
self.completeHistory = newHistory;
|
||||||
self.txHistory = newHistory.slice(0, self.historyShowLimit);
|
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() {
|
return storageService.setTxHistory(JSON.stringify(newHistory), walletId, function() {
|
||||||
|
@ -935,6 +935,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.showAllHistory = function() {
|
self.showAllHistory = function() {
|
||||||
self.historyShowShowAll = false;
|
self.historyShowShowAll = false;
|
||||||
self.historyRendering = true;
|
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.debounceUpdateHistory = lodash.debounce(function() {
|
||||||
self.updateHistory();
|
self.updateHistory();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
Loading…
Reference in New Issue