add react-native-mmkv-storage

This commit is contained in:
ammarahm-ed
2020-03-10 13:36:33 +05:00
parent 4057d9bf19
commit f72295e39a
8 changed files with 33 additions and 33 deletions

View File

@@ -9,7 +9,7 @@ import {
Platform,
ToastAndroid,
} from 'react-native';
import FastStorage from 'react-native-fast-storage';
import MMKV from 'react-native-mmkv-storage';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {db, DDS} from '../../../App';
import {
@@ -283,10 +283,10 @@ export const ActionSheetComponent = ({
icon: 'theme-light-dark',
func: () => {
if (!colors.night) {
FastStorage.setString('theme', JSON.stringify({night: true}));
MMKV.setString('theme', JSON.stringify({night: true}));
changeColorScheme(COLOR_SCHEME_DARK);
} else {
FastStorage.setString('theme', JSON.stringify({night: false}));
MMKV.setString('theme', JSON.stringify({night: false}));
changeColorScheme(COLOR_SCHEME_LIGHT);
}
},