mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
refact(utils): Check current thread and dispatch only if needed
This commit is contained in:
@@ -373,7 +373,7 @@ Please ensure you have your manifest correctly configured with the FileProvider.
|
||||
}
|
||||
}
|
||||
|
||||
export function executeOnMainThread(func: () => void) {
|
||||
export function dispatchToMainThread(func: () => void) {
|
||||
new android.os.Handler(android.os.Looper.getMainLooper())
|
||||
.post(new java.lang.Runnable({
|
||||
run: func
|
||||
|
||||
Reference in New Issue
Block a user