Return automatically after set unit/lang/alt/color

This commit is contained in:
Gustavo Maximiliano Cortez 2015-11-13 16:00:28 -03:00
commit 370fbd5924
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
9 changed files with 31 additions and 18 deletions

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesUnitController',
function($rootScope, $scope, $log, configService, go) {
function($scope, $timeout, $log, configService, go) {
var config = configService.getSync();
this.unitName = config.wallet.settings.unitName;
this.unitOpts = [
@ -52,8 +52,11 @@ angular.module('copayApp.controllers').controller('preferencesUnitController',
configService.set(opts, function(err) {
if (err) $log.warn(err);
go.preferencesGlobal();
$scope.$emit('Local/UnitSettingUpdated');
go.preferences();
$timeout(function() {
$scope.$apply();
}, 100);
});
};