Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

refactor

ammarahm-ed32af5b3b1b4b
diff --git a/apps/mobile/src/common/common.js b/apps/mobile/src/common/common.js
index fadae5dd4..e82e6f3be 100755
--- a/apps/mobile/src/common/common.js
+++ b/apps/mobile/src/common/common.js
@@ -90,21 +90,23 @@ export function setColorScheme(colors = COLOR_SCHEME, accent = ACCENT) {
return COLOR_SCHEME;
}
-export async function getColorScheme(colors) {
+export async function getColorScheme() {
let accentColor = await AsyncStorage.getItem('accentColor');
let t = await AsyncStorage.getItem('theme');
if (typeof accentColor !== 'string') {
- AsyncStorage.setItem('accentColor', colors.accent);
+ AsyncStorage.setItem('accentColor', '#0560FF');
+ setAccentColor('#0560FF');
} else {
setAccentColor(accentColor);
}
if (typeof t !== 'string') {
- AsyncStorage.setItem('theme', JSON.stringify(colors));
+ AsyncStorage.setItem('theme', JSON.stringify({night: false}));
setColorScheme(COLOR_SCHEME_LIGHT);
} else {
let themeToSet = JSON.parse(t);
+
themeToSet.night
? setColorScheme(COLOR_SCHEME_DARK)
: setColorScheme(COLOR_SCHEME_LIGHT);