1
0
mirror of https://github.com/etesync/android synced 2024-11-22 07:58:09 +00:00

Import: only dismiss import dialog if already showing.

This should fix a crash when the os kills the activity before import is done.
This commit is contained in:
Tom Hacohen 2019-05-01 13:40:05 +01:00
parent e4b29832f5
commit 6381617f2c
2 changed files with 6 additions and 2 deletions

View File

@ -189,7 +189,9 @@ class LocalCalendarImportFragment : ListFragment() {
}
override fun onPostExecute(result: ResultFragment.ImportResult) {
if (progressDialog.isShowing && !activity!!.isDestroyed) {
progressDialog.dismiss()
}
(activity as ResultFragment.OnImportCallback).onImportResult(result)
}

View File

@ -124,7 +124,9 @@ class LocalContactImportFragment : Fragment() {
}
override fun onPostExecute(result: ResultFragment.ImportResult) {
if (progressDialog.isShowing && !activity!!.isDestroyed) {
progressDialog.dismiss()
}
(activity as ResultFragment.OnImportCallback).onImportResult(result)
}