From ab8cbf7726263a04b31c8d69c87115d8796bc45c Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 9 Feb 2018 23:16:37 +0100 Subject: [PATCH] commit fragment transactions asap, should fix blank/duplicate views --- .../simplemobiletools/calendar/activities/MainActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 7c61d53ef..17b580ef2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt @@ -518,7 +518,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { } fragment.arguments = bundle - supportFragmentManager.beginTransaction().add(R.id.fragments_holder, fragment).commit() + supportFragmentManager.beginTransaction().add(R.id.fragments_holder, fragment).commitNow() } fun openMonthFromYearly(dateTime: DateTime) { @@ -527,7 +527,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { val bundle = Bundle() bundle.putString(DAY_CODE, Formatter.getDayCodeFromDateTime(dateTime)) fragment.arguments = bundle - supportFragmentManager.beginTransaction().add(R.id.fragments_holder, fragment).commit() + supportFragmentManager.beginTransaction().add(R.id.fragments_holder, fragment).commitNow() resetActionBarTitle() calendar_fab.beVisible() supportActionBar?.setDisplayHomeAsUpEnabled(true) @@ -539,7 +539,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { val bundle = Bundle() bundle.putString(DAY_CODE, Formatter.getDayCodeFromDateTime(dateTime)) fragment.arguments = bundle - supportFragmentManager.beginTransaction().add(R.id.fragments_holder, fragment).commit() + supportFragmentManager.beginTransaction().add(R.id.fragments_holder, fragment).commitNow() supportActionBar?.setDisplayHomeAsUpEnabled(true) }