diff --git a/lib/android/app/src/main/java/com/reactnativenavigation/utils/UiUtils.java b/lib/android/app/src/main/java/com/reactnativenavigation/utils/UiUtils.java index 5389321c5e..3d202ca457 100644 --- a/lib/android/app/src/main/java/com/reactnativenavigation/utils/UiUtils.java +++ b/lib/android/app/src/main/java/com/reactnativenavigation/utils/UiUtils.java @@ -82,9 +82,9 @@ public void onWindowDetached() { public static void runOnMainThread(Runnable runnable) { if (Looper.myLooper() == Looper.getMainLooper()) { - new Handler(Looper.getMainLooper()).postAtFrontOfQueue(runnable); + runnable.run(); } else { - new Handler(Looper.getMainLooper()).post(runnable); + new Handler(Looper.getMainLooper()).postAtFrontOfQueue(runnable); } }