mirror of
https://github.com/etesync/android
synced 2024-11-26 01:48:34 +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) {
|
override fun onPostExecute(result: ResultFragment.ImportResult) {
|
||||||
|
if (progressDialog.isShowing && !activity!!.isDestroyed) {
|
||||||
progressDialog.dismiss()
|
progressDialog.dismiss()
|
||||||
|
}
|
||||||
(activity as ResultFragment.OnImportCallback).onImportResult(result)
|
(activity as ResultFragment.OnImportCallback).onImportResult(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,9 @@ class LocalContactImportFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onPostExecute(result: ResultFragment.ImportResult) {
|
override fun onPostExecute(result: ResultFragment.ImportResult) {
|
||||||
|
if (progressDialog.isShowing && !activity!!.isDestroyed) {
|
||||||
progressDialog.dismiss()
|
progressDialog.dismiss()
|
||||||
|
}
|
||||||
(activity as ResultFragment.OnImportCallback).onImportResult(result)
|
(activity as ResultFragment.OnImportCallback).onImportResult(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user