clear timeout for app state

This commit is contained in:
Mustafa Buyukcelebi 2019-08-13 11:47:29 +03:00
parent cf4077dec1
commit 420fabd058

View File

@ -70,8 +70,9 @@ import lightTheme from '../../../themes/lightTheme';
// Workaround // Workaround
let previousAppState = 'background'; let previousAppState = 'background';
export const setPreviousAppState = () => { export const setPreviousAppState = () => {
setTimeout(() => { const appStateTimeout = setTimeout(() => {
previousAppState = AppState.currentState; previousAppState = AppState.currentState;
clearTimeout(appStateTimeout);
}, 2000); }, 2000);
}; };