Return automatically after set unit/lang/alt/color
This commit is contained in:
parent
308616c254
commit
370fbd5924
9 changed files with 31 additions and 18 deletions
|
|
@ -868,6 +868,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
|
||||
self.updateHistory = function() {
|
||||
var fc = profileService.focusedClient;
|
||||
if (!fc) return;
|
||||
var walletId = fc.credentials.walletId;
|
||||
|
||||
if (!fc.isComplete() || self.updatingTxHistory[walletId]) return;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesAltCurrencyController',
|
||||
function($scope, $rootScope, configService, go, rateService, lodash) {
|
||||
function($scope, $timeout, $log, configService, rateService, lodash, go) {
|
||||
this.hideAdv = true;
|
||||
this.hidePriv = true;
|
||||
this.hideSecret = true;
|
||||
|
|
@ -48,8 +48,12 @@ angular.module('copayApp.controllers').controller('preferencesAltCurrencyControl
|
|||
};
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) console.log(err);
|
||||
if (err) $log.warn(err);
|
||||
go.preferencesGlobal();
|
||||
$scope.$emit('Local/UnitSettingUpdated');
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesColorController',
|
||||
function($scope, configService, profileService, go) {
|
||||
function($scope, $timeout, $log, configService, profileService, go) {
|
||||
var config = configService.getSync();
|
||||
this.colorOpts = [
|
||||
'#DD4B39',
|
||||
|
|
@ -33,12 +33,12 @@ angular.module('copayApp.controllers').controller('preferencesColorController',
|
|||
opts.colorFor[walletId] = color;
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) {
|
||||
$scope.$emit('Local/DeviceError', err);
|
||||
return;
|
||||
}
|
||||
self.color = color;
|
||||
if (err) $log.warn(err);
|
||||
go.preferences();
|
||||
$scope.$emit('Local/ColorUpdated');
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesLanguageController',
|
||||
function($scope, $log, $timeout, configService, uxLanguage) {
|
||||
function($scope, $log, $timeout, configService, uxLanguage, go) {
|
||||
|
||||
this.availableLanguages = uxLanguage.getLanguages();
|
||||
|
||||
|
|
@ -17,6 +17,7 @@ angular.module('copayApp.controllers').controller('preferencesLanguageController
|
|||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) $log.warn(err);
|
||||
go.preferencesGlobal();
|
||||
$scope.$emit('Local/LanguageSettingUpdated');
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue