1
0
mirror of https://github.com/etesync/android synced 2025-01-10 15:51:08 +00:00

Migration: fix crash after the end of migration.

This commit is contained in:
Tom Hacohen 2020-10-20 13:25:07 +03:00
parent f7314a5cca
commit 3a96e16af3

View File

@ -724,17 +724,17 @@ class MigrateCollectionsDoFragment(private val etebase: EtebaseAccount,
.setMessage(message) .setMessage(message)
.setPositiveButton(android.R.string.yes) { _, _ -> } .setPositiveButton(android.R.string.yes) { _, _ -> }
.setOnDismissListener { .setOnDismissListener {
requireFragmentManager().beginTransaction() requireFragmentManager().commit {
.replace(android.R.id.content, CreateAccountFragment.newInstance(configurationModel.account.value!!)) replace(android.R.id.content, CreateAccountFragment.newInstance(configurationModel.account.value!!))
.addToBackStack(null) addToBackStack(null)
.commitAllowingStateLoss() }
dismissAllowingStateLoss()
} }
.show() .show()
} }
} catch (e: Exception) { } catch (e: Exception) {
uiThread { reportErrorHelper(requireContext(), e) }
} finally {
uiThread { uiThread {
reportErrorHelper(requireContext(), e)
dismissAllowingStateLoss() dismissAllowingStateLoss()
} }
} }