fix store config
This commit is contained in:
parent
7f6b41e11d
commit
e38f9a4611
5 changed files with 14 additions and 8 deletions
|
|
@ -29,7 +29,10 @@ angular.module('copayApp.controllers').controller('preferencesColorController',
|
|||
opts.colorFor[walletId] = color;
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) console.log(err);
|
||||
if (err) {
|
||||
$scope.$emit('Local/DeviceError', err);
|
||||
return;
|
||||
}
|
||||
self.color = color;
|
||||
$scope.$emit('Local/ColorUpdated');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -43,11 +43,14 @@ angular
|
|||
}
|
||||
return v;
|
||||
});
|
||||
historicLog.add(level, args.join(' '));
|
||||
if (window.cordova)
|
||||
console.log(args.join(' '));
|
||||
|
||||
orig.apply(null, args)
|
||||
try {
|
||||
if (window.cordova)
|
||||
console.log(args.join(' '));
|
||||
orig.apply(null, args)
|
||||
historicLog.add(level, args.join(' '));
|
||||
} catch (e) {
|
||||
console.log('Error at log decorator:', e);
|
||||
}
|
||||
};
|
||||
});
|
||||
return $delegate;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
lodash.merge(config, oldOpts, newOpts);
|
||||
configCache = config;
|
||||
|
||||
storageService.setConfig(JSON.stringify(config), cb);
|
||||
storageService.storeConfig(JSON.stringify(config), cb);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,5 @@ angular.module('copayApp.services')
|
|||
$log.info('Starting Copay v' + window.version + ' #' + window.commitHash);
|
||||
$log.info('Client: isCordova:', isCordova, 'isChromeApp:', isChromeApp);
|
||||
$log.info('Navigator:', navigator.userAgent);
|
||||
|
||||
return {};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -156,6 +156,7 @@ angular.module('copayApp.services')
|
|||
};
|
||||
|
||||
root.storeConfig = function(val, cb) {
|
||||
$log.debug('Storing Preferences', val);
|
||||
storage.set('config', val, cb);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue