mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 21:01:31 +03:00
clear timeout for app state
This commit is contained in:
parent
cf4077dec1
commit
420fabd058
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user