fix changing wallet when a tab is selected
This commit is contained in:
parent
c831f4ce8c
commit
0dfcde57f3
2 changed files with 10 additions and 5 deletions
|
|
@ -79,19 +79,19 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
$log.debug('Cleaning Index Instance');
|
||||
lodash.each(self, function(v, k) {
|
||||
if (lodash.isFunction(v)) return;
|
||||
if (vanillaScope[k]) {
|
||||
self[k] = vanillaScope[k];
|
||||
return;
|
||||
}
|
||||
|
||||
// This are to prevent flicker in mobile:
|
||||
if (k == 'hasProfile') return;
|
||||
if (k == 'tab') return;
|
||||
if (k == 'noFocusedWallet') return;
|
||||
if (k == 'backgroundColor') return;
|
||||
if (k == 'loadingWallet') {
|
||||
self.loadingWallet = true;
|
||||
return;
|
||||
}
|
||||
if (vanillaScope[k]) {
|
||||
self[k] = vanillaScope[k];
|
||||
return;
|
||||
}
|
||||
|
||||
delete self[k];
|
||||
});
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
var disableFocusListener = $rootScope.$on('Local/NewFocusedWallet', function() {
|
||||
self.addr = null;
|
||||
self.resetForm();
|
||||
if (profileService.focusedClient) {
|
||||
self.setAddress();
|
||||
self.setSendFormInputs();
|
||||
}
|
||||
|
||||
$log.debug('Cleaning WalletHome Instance');
|
||||
lodash.each(self, function(v, k) {
|
||||
|
|
@ -60,6 +64,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
self[k] = vanillaScope[k];
|
||||
return;
|
||||
}
|
||||
if (k == 'isRateAvailable') return;
|
||||
|
||||
delete self[k];
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue