...
 
Commits (2)
This diff is collapsed.
......@@ -9,6 +9,11 @@ import i18n from './i18n.service';
class MindsService {
settings;
/**
* Lazy load default settings
*/
loadDefault = () => require("../../../settings/default.json");
/**
* Get settings
*/
......@@ -22,7 +27,8 @@ class MindsService {
try {
settings = JSON.parse(await AsyncStorage.getItem('@MindsSettings'));
} catch {
settings = null;
settings = this.loadDefault();
AsyncStorage.setItem('@MindsSettings', JSON.stringify(settings));
}
}
......