better update order at walletHome

This commit is contained in:
Matias Alejo Garcia 2015-04-15 13:39:48 -03:00
parent 2297ff3156
commit 9ee1ceb46f
2 changed files with 14 additions and 12 deletions

View File

@ -2,7 +2,7 @@
<div class="row" ng-show="!index.noFocusedWallet">
<div class="amount" ng-style="{'background-color':index.backgroundColor}">
<div ng-show="index.updateError && !index.notAuthorized" ng-click='index.openWallet()'>
<div ng-show="index.updateError && !index.notAuthorized && !index.anyOnGoingProcess" ng-click='index.openWallet()'>
Could not update Wallet
<br> [Tap to retry]
</div>
@ -30,8 +30,8 @@
<span translate ng-show="index.onGoingProcessName == 'scanning'">Scanning Wallet funds...</span>
<span translate ng-show="index.onGoingProcessName == 'recreating'">Recreating Wallet on BWS...</span>
</div>
<div class="size-14" ng-show="!index.anyOnGoingProcess">
<span ng-if="index.alternativeBalanceAvailable" ng-class="{'animated fadeIn':!index.hideBalance}">{{index.totalBalanceAlternative}} {{index.alternativeIsoCode}}</span>
<div class="size-14" ng-show="!index.anyOnGoingProcess && index.alternativeBalanceAvailable">
<span ng-class="{'animated fadeIn':!index.hideBalance}">{{index.totalBalanceAlternative}} {{index.alternativeIsoCode}}</span>
</div>
</div>
<div class="pr columns line-b">

View File

@ -32,6 +32,16 @@ angular.module('copayApp.controllers').controller('indexController', function($r
var fc = profileService.focusedClient;
if (!fc) return;
// Clean status
self.lockedBalance = null;
self.totalBalanceStr = null;
self.alternativeBalanceAvailable = false;
self.totalBalanceAlternative = null;
self.notAuthorized = false;
self.clientError = null;
self.txHistory = [];
self.txHistoryPaging = false;
$timeout(function() {
self.hasProfile = true;
self.noFocusedWallet = false;
@ -50,12 +60,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.isComplete = fc.isComplete();
self.txps = [];
self.copayers = [];
self.lockedBalance = null;
self.totalBalanceStr = null;
self.notAuthorized = false;
self.clientError = null;
self.txHistory = [];
self.txHistoryPaging = false;
storageService.getBackupFlag(self.walletId, function(err, val) {
self.needsBackup = !val;
@ -314,8 +318,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.lockedBalanceAlternative = $filter('noFractionNumber')(lockedBalanceAlternative, 2);
self.alternativeConversionRate = $filter('noFractionNumber')(alternativeConversionRate, 2);
self.alternativeBalanceAvailable = true;
self.alternativeBalanceAvailable = true;
self.updatingBalance = false;
@ -422,7 +424,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
});
$rootScope.$on('Local/Offline', function(event) {
$log.debug('========== Offline event');
$log.debug('Offline event');
self.isOffline = true;
});