mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: format
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
export function dispatchToMainThread(func: () => void) {
|
||||
new android.os.Handler(android.os.Looper.getMainLooper())
|
||||
.post(new java.lang.Runnable({
|
||||
run: func
|
||||
}));
|
||||
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();
|
||||
return android.os.Looper.myLooper() === android.os.Looper.getMainLooper();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user