reduce save note timer

This commit is contained in:
ammarahm-ed
2020-03-05 15:01:11 +05:00
parent 3b75d45517
commit f81ad5c9b4

View File

@@ -4,12 +4,11 @@ import {
KeyboardAvoidingView, KeyboardAvoidingView,
Linking, Linking,
Platform, Platform,
SafeAreaView,
StatusBar, StatusBar,
Text, Text,
TouchableOpacity, TouchableOpacity,
View, View,
SafeAreaView,
Keyboard,
} from 'react-native'; } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import WebView from 'react-native-webview'; import WebView from 'react-native-webview';
@@ -41,7 +40,6 @@ import {
timeConverter, timeConverter,
ToastEvent, ToastEvent,
} from '../../utils/utils'; } from '../../utils/utils';
import {TabRouter} from 'react-navigation';
const EditorWebView = createRef(); const EditorWebView = createRef();
let note = {}; let note = {};
@@ -151,7 +149,7 @@ const Editor = ({navigation, noMenu}) => {
onChange(evt.nativeEvent.data); onChange(evt.nativeEvent.data);
timer = setTimeout(() => { timer = setTimeout(() => {
saveNote.call(this, true); saveNote.call(this, true);
}, 1000); }, 500);
} }
}; };