From 68b98479273e3c61ac2d46d76399d557b09ad1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Sat, 23 Mar 2019 16:35:33 +0100 Subject: [PATCH] Fix reselecting root fragments (#299) --- .../java/io/github/wulkanowy/ui/modules/main/MainActivity.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainActivity.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainActivity.kt index 0d9a6351..85aa94a1 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainActivity.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainActivity.kt @@ -5,6 +5,7 @@ import android.content.Intent import android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK import android.content.Intent.FLAG_ACTIVITY_NEW_TASK import android.os.Bundle +import android.os.Handler import android.view.Menu import android.view.MenuItem import androidx.appcompat.app.AlertDialog @@ -146,7 +147,9 @@ class MainActivity : BaseActivity(), MainView { } override fun notifyMenuViewReselected() { - (navController.currentStack?.get(0) as? MainView.MainChildView)?.onFragmentReselected() + Handler().postDelayed({ + (navController.currentStack?.get(0) as? MainView.MainChildView)?.onFragmentReselected() + }, 250) } fun showDialogFragment(dialog: DialogFragment) {