mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
performance: put smaller data in db
This commit is contained in:
@@ -212,10 +212,10 @@ export const ActionSheetComponent = ({
|
||||
icon: 'moon',
|
||||
func: () => {
|
||||
if (!colors.night) {
|
||||
AsyncStorage.setItem('theme', JSON.stringify(COLOR_SCHEME_DARK));
|
||||
AsyncStorage.setItem('theme', JSON.stringify({night: true}));
|
||||
changeColorScheme(COLOR_SCHEME_DARK);
|
||||
} else {
|
||||
AsyncStorage.setItem('theme', JSON.stringify(COLOR_SCHEME_LIGHT));
|
||||
AsyncStorage.setItem('theme', JSON.stringify({night: false}));
|
||||
changeColorScheme(COLOR_SCHEME_LIGHT);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -61,10 +61,10 @@ export const Menu = ({close = () => {}, hide, update = () => {}}) => {
|
||||
icon: 'moon',
|
||||
func: () => {
|
||||
if (!colors.night) {
|
||||
AsyncStorage.setItem('theme', JSON.stringify(COLOR_SCHEME_DARK));
|
||||
AsyncStorage.setItem('theme', JSON.stringify({night: true}));
|
||||
changeColorScheme(COLOR_SCHEME_DARK);
|
||||
} else {
|
||||
AsyncStorage.setItem('theme', JSON.stringify(COLOR_SCHEME_LIGHT));
|
||||
AsyncStorage.setItem('theme', JSON.stringify({night: false}));
|
||||
|
||||
changeColorScheme(COLOR_SCHEME_LIGHT);
|
||||
}
|
||||
|
||||
@@ -109,13 +109,13 @@ export const Settings = ({navigation}) => {
|
||||
if (!colors.night) {
|
||||
AsyncStorage.setItem(
|
||||
'theme',
|
||||
JSON.stringify(COLOR_SCHEME_DARK),
|
||||
JSON.stringify({night: true}),
|
||||
);
|
||||
changeColorScheme(COLOR_SCHEME_DARK);
|
||||
} else {
|
||||
AsyncStorage.setItem(
|
||||
'theme',
|
||||
JSON.stringify(COLOR_SCHEME_LIGHT),
|
||||
JSON.stringify({night: false}),
|
||||
);
|
||||
|
||||
changeColorScheme(COLOR_SCHEME_LIGHT);
|
||||
|
||||
Reference in New Issue
Block a user