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:
@@ -159,7 +159,7 @@ export function openUrl(location: string): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function executeOnMainThread(func: () => void) {
|
||||
export function dispatchToMainThread(func: () => void) {
|
||||
NSOperationQueue.mainQueue.addOperationWithBlock(func);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user