Merge pull request #4337 from JDonadio/bug/select-lang
Fix language selection - IOs
This commit is contained in:
commit
fc27b05d13
2 changed files with 13 additions and 29 deletions
|
|
@ -1,13 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesLanguageController',
|
||||
function($scope, $log, $timeout, configService, profileService, uxLanguage, walletService, go) {
|
||||
function($scope, $log, configService, profileService, uxLanguage, walletService, go) {
|
||||
|
||||
this.availableLanguages = uxLanguage.getLanguages();
|
||||
this.currentLanguage = uxLanguage.getCurrentLanguage();
|
||||
|
||||
this.save = function(newLang) {
|
||||
$scope.availableLanguages = uxLanguage.getLanguages();
|
||||
$scope.currentLanguage = uxLanguage.getCurrentLanguage();
|
||||
|
||||
$scope.save = function(newLang) {
|
||||
var opts = {
|
||||
wallet: {
|
||||
settings: {
|
||||
|
|
@ -20,16 +19,10 @@ angular.module('copayApp.controllers').controller('preferencesLanguageController
|
|||
if (err) $log.warn(err);
|
||||
go.preferencesGlobal();
|
||||
|
||||
|
||||
uxLanguage.update(function() {
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
|
||||
walletService.updateRemotePreferences(profileService.getClients(), {},
|
||||
function() {
|
||||
$log.debug('Remote preferences saved');
|
||||
});
|
||||
walletService.updateRemotePreferences(profileService.getClients(), {}, function() {
|
||||
$log.debug('Remote preferences saved');
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue