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:
parent
e4b29832f5
commit
6381617f2c
@ -189,7 +189,9 @@ class LocalCalendarImportFragment : ListFragment() {
|
||||
}
|
||||
|
||||
override fun onPostExecute(result: ResultFragment.ImportResult) {
|
||||
progressDialog.dismiss()
|
||||
if (progressDialog.isShowing && !activity!!.isDestroyed) {
|
||||
progressDialog.dismiss()
|
||||
}
|
||||
(activity as ResultFragment.OnImportCallback).onImportResult(result)
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,9 @@ class LocalContactImportFragment : Fragment() {
|
||||
}
|
||||
|
||||
override fun onPostExecute(result: ResultFragment.ImportResult) {
|
||||
progressDialog.dismiss()
|
||||
if (progressDialog.isShowing && !activity!!.isDestroyed) {
|
||||
progressDialog.dismiss()
|
||||
}
|
||||
(activity as ResultFragment.OnImportCallback).onImportResult(result)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user