Merge pull request #2890 from cmgustavo/bug/select-same-wallet-sidebar
Do not refresh if the same wallet is selected from sidebar
This commit is contained in:
commit
658ee1c821
2 changed files with 4 additions and 3 deletions
|
|
@ -8,7 +8,7 @@
|
|||
ng-repeat="item in sidebar.wallets track by $index"
|
||||
ng-class="{'selected': item.id == index.walletId}"
|
||||
class="nav-item">
|
||||
<a ng-click="sidebar.switchWallet(item.id)" class="oh">
|
||||
<a ng-click="sidebar.switchWallet(item.id, index.walletId)" class="oh">
|
||||
<div class="avatar-wallet"
|
||||
ng-style="{'background-color':item.color}">{{(item.name || item.id) | limitTo: 1}}</div>
|
||||
<div class="name-wallet" ng-class="{'m8t':item.n == 1}">{{item.name || item.id}}</div>
|
||||
|
|
|
|||
|
|
@ -24,9 +24,10 @@ angular.module('copayApp.controllers').controller('sidebarController',
|
|||
profileService.signout();
|
||||
};
|
||||
|
||||
self.switchWallet = function(wid) {
|
||||
self.switchWallet = function(selectedWalletId, currentWalletId) {
|
||||
if (selectedWalletId == currentWalletId) return;
|
||||
self.walletSelection = false;
|
||||
profileService.setAndStoreFocus(wid, function() {
|
||||
profileService.setAndStoreFocus(selectedWalletId, function() {
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue