Skip to content

Commit d8774bc

Browse files
authored
Fix runOnMainThread to run at front of queue (#7792)
1 parent b5f6c59 commit d8774bc

File tree

1 file changed

+2
-2
lines changed
  • lib/android/app/src/main/java/com/reactnativenavigation/utils

1 file changed

+2
-2
lines changed

lib/android/app/src/main/java/com/reactnativenavigation/utils/UiUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ public void onWindowDetached() {
8282

8383
public static void runOnMainThread(Runnable runnable) {
8484
if (Looper.myLooper() == Looper.getMainLooper()) {
85-
new Handler(Looper.getMainLooper()).postAtFrontOfQueue(runnable);
85+
runnable.run();
8686
} else {
87-
new Handler(Looper.getMainLooper()).post(runnable);
87+
new Handler(Looper.getMainLooper()).postAtFrontOfQueue(runnable);
8888
}
8989
}
9090

0 commit comments

Comments
 (0)