From 4edd3af2026ff23ad6c63339c2e6571958c1daac Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 1 Feb 2018 00:07:41 +0100 Subject: [PATCH] make sure removing fragments is synchronous, hopefully fixes blank screens --- .../com/simplemobiletools/calendar/activities/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt index 6aac1e10e..b075fd69b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt @@ -499,7 +499,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { private fun updateViewPager(dayCode: String? = Formatter.getTodayCode(applicationContext)) { val fragment = getFragmentsHolder() currentFragments.forEach { - supportFragmentManager.beginTransaction().remove(it).commit() + supportFragmentManager.beginTransaction().remove(it).commitNow() } currentFragments.clear() currentFragments.add(fragment)