make sure removing fragments is synchronous, hopefully fixes blank screens

This commit is contained in:
tibbi 2018-02-01 00:07:41 +01:00
parent 7bf1d92532
commit 4edd3af202
1 changed files with 1 additions and 1 deletions

View File

@ -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)