Merge pull request #4064 from cmgustavo/bug/delete-last-wallet

Fix delete last wallet
This commit is contained in:
Gustavo Maximiliano Cortez 2016-04-11 14:23:48 -03:00
commit 975bd99834
3 changed files with 5 additions and 5 deletions

View file

@ -523,4 +523,4 @@
</div> </div>
</div> </div>
<div class="extra-margin-bottom"></div> <div class="extra-margin-bottom"></div>
<div ng-hide="$root.shouldHideMenuBar" ng-include="'views/includes/menu.html'" ng-show="!index.noFocusedWallet"></div> <div ng-include="'views/includes/menu.html'" ng-show="!index.noFocusedWallet && !$root.shouldHideMenuBar"></div>

View file

@ -1082,9 +1082,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.setCompactTxHistory = function() { self.setCompactTxHistory = function() {
self.isSearching = false; self.isSearching = false;
self.nextTxHistory = self.historyShowMoreLimit; self.nextTxHistory = self.historyShowMoreLimit;
self.txHistory = self.completeHistory.slice(0, self.historyShowLimit); self.txHistory = self.completeHistory ? self.completeHistory.slice(0, self.historyShowLimit) : null;
self.txHistorySearchResults = self.txHistory; self.txHistorySearchResults = self.txHistory;
self.historyShowMore = self.completeHistory.length > self.historyShowLimit; self.historyShowMore = self.completeHistory ? self.completeHistory.length > self.historyShowLimit : null;
}; };
self.debounceUpdateHistory = lodash.debounce(function() { self.debounceUpdateHistory = lodash.debounce(function() {

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController', angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
function($scope, $rootScope, $filter, $timeout, $modal, $log, storageService, notification, profileService, isCordova, go, gettext, gettextCatalog, animationService) { function($scope, $rootScope, $filter, $timeout, $modal, $log, storageService, notification, profileService, isCordova, go, gettext, gettextCatalog, animationService, applicationService) {
this.isCordova = isCordova; this.isCordova = isCordova;
this.error = null; this.error = null;
$scope.isDeletingWallet = false; $scope.isDeletingWallet = false;
@ -59,7 +59,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
notification.success(gettextCatalog.getString('Success'), gettextCatalog.getString('The wallet "{{walletName}}" was deleted', { notification.success(gettextCatalog.getString('Success'), gettextCatalog.getString('The wallet "{{walletName}}" was deleted', {
walletName: walletName walletName: walletName
})); }));
go.walletHome(); applicationService.restart();
} }
}); });
}; };