refact(utils): Resolve circular dependency without duplicating any code

This commit is contained in:
Martin Bektchiev
2019-05-08 17:28:29 +03:00
parent a2ef6cbb4b
commit 7aed770871
7 changed files with 32 additions and 31 deletions

View File

@@ -372,14 +372,3 @@ Please ensure you have your manifest correctly configured with the FileProvider.
return false;
}
}
export function dispatchToMainThread(func: () => void) {
new android.os.Handler(android.os.Looper.getMainLooper())
.post(new java.lang.Runnable({
run: func
}));
}
export function isMainThread(): Boolean {
return android.os.Looper.myLooper() === android.os.Looper.getMainLooper();
}