Commit a65694b8 authored by yPhil's avatar yPhil
Browse files

Merge branch 'dev'

parents 13380c1a a6040811
......@@ -56,32 +56,26 @@ MOB.sync = (function() {
},
readSync:function() {
if (synchronized) {
remoteStorage.petrolette.read()
.then((data) => {
remoteStorage.petrolette.read()
.then((data) => {
if (MOB.prefs.isValidSourcesFile(JSON.parse(data))) {
if (MOB.prefs.isValidSourcesFile(JSON.parse(data))) {
console.info('Petrolette | Validation OK');
console.error('Petrolette | Validation OK');
return MOB.tab.populate(JSON.parse(data));
return MOB.tab.populate(JSON.parse(data));
} else {
} else {
console.error('Petrolette | Validation NOT OK: Default sources');
console.error('Petrolette | Validation NOT OK: Default sources');
MOB.tab.populate(JSON.parse(MOB.prefs.readConfig('tabs')));
}
})
.catch((err) => {
console.error('Petrolette | Validation error:', err);
});
MOB.tab.populate(JSON.parse(MOB.prefs.readConfig('tabs')));
}
} else {
MOB.tab.populate(JSON.parse(MOB.prefs.readConfig('tabs')));
}
})
.catch((err) => {
console.error('Petrolette | Validation error:', err);
});
},
writeSync:function(sources) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment