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

View file

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