[Android] Navigator: Commit transactions immediately
Geoffrey Métais
git at videolan.org
Mon Jan 14 16:15:24 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 14 15:27:53 2019 +0100| [8f1b2e6d1058870306517f36d5fad3df80416dae] | committer: Geoffrey Métais
Navigator: Commit transactions immediately
Should prevent IllegalStateException when commit happens after activity
onSaveInstanceState callback.
> https://code.videolan.org/videolan/vlc-android/commit/8f1b2e6d1058870306517f36d5fad3df80416dae
---
vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt b/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt
index 63e94affd..a0d77ca62 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt
@@ -108,7 +108,7 @@ class Navigator(private val activity: MainActivity,
fm.popBackStackImmediate("root", androidx.fragment.app.FragmentManager.POP_BACK_STACK_INCLUSIVE)
val ft = fm.beginTransaction()
ft.replace(R.id.fragment_placeholder, fragment, tag)
- ft.commit()
+ ft.commitNow()
activity.updateCheckedItem(id)
currentFragment = fragment
currentFragmentId = id
More information about the Android
mailing list