diff --git a/app/build.gradle b/app/build.gradle index c858c31bd..1cfd7b734 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:5566a9d221' + implementation 'com.github.SimpleMobileTools:Simple-Commons:fd08255626' implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.2' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt index 3189f91d5..541a84b24 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt @@ -811,8 +811,13 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { private fun updateViewPager(dayCode: String? = Formatter.getTodayCode()) { val fragment = getFragmentsHolder() currentFragments.forEach { - supportFragmentManager.beginTransaction().remove(it).commitNow() + try { + supportFragmentManager.beginTransaction().remove(it).commitNow() + } catch (ignored: Exception) { + return + } } + currentFragments.clear() currentFragments.add(fragment) val bundle = Bundle()