hide wallet name if alias exists

This commit is contained in:
Gabriel Bazán 2017-08-03 10:17:38 -03:00
commit c8a27dabc1
2 changed files with 3 additions and 4 deletions

View file

@ -2,7 +2,7 @@
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController', angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
function($scope, $ionicHistory, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService, pushNotificationsService) { function($scope, $ionicHistory, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService, pushNotificationsService) {
$scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.$on("$ionicView.beforeEnter", function(event, data) {
if (!data.stateParams || !data.stateParams.walletId) { if (!data.stateParams || !data.stateParams.walletId) {
popupService.showAlert(null, gettextCatalog.getString('No wallet selected'), function() { popupService.showAlert(null, gettextCatalog.getString('No wallet selected'), function() {
@ -17,8 +17,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
}); });
return; return;
} }
$scope.alias = lodash.isEqual($scope.wallet.name, $scope.wallet.credentials.walletName) ? null : $scope.wallet.name + ' '; $scope.walletName = $scope.wallet.name;
$scope.walletName = $scope.wallet.credentials.walletName;
}); });
$scope.showDeletePopup = function() { $scope.showDeletePopup = function() {

View file

@ -18,7 +18,7 @@
</p> </p>
</div> </div>
<button class="button button-standard button-assertive" ng-click="showDeletePopup()"> <button class="button button-standard button-assertive" ng-click="showDeletePopup()">
{{'Delete'|translate}} <span ng-show="alias">{{alias}}</span>{{walletName}} {{'Delete'|translate}} {{walletName}}
</button> </button>
</div> </div>
</ion-content> </ion-content>