From 7f2929f06c4dbfe10bb263dd272ff9181a41f950 Mon Sep 17 00:00:00 2001 From: Gideon Okuro Date: Thu, 4 Apr 2024 19:49:25 +0300 Subject: [PATCH] sync: better download check (fixes #3348) (#3352) Co-authored-by: dogi --- app/build.gradle | 4 ++-- .../ole/planet/myplanet/ui/sync/ProcessUserDataActivity.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 051d0dc49b..8698a4d3ed 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 21 targetSdkVersion 34 - versionCode 1468 - versionName "0.14.68" + versionCode 1469 + versionName "0.14.69" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/sync/ProcessUserDataActivity.kt b/app/src/main/java/org/ole/planet/myplanet/ui/sync/ProcessUserDataActivity.kt index da86726621..fbfce9c8b9 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/sync/ProcessUserDataActivity.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/sync/ProcessUserDataActivity.kt @@ -61,7 +61,7 @@ abstract class ProcessUserDataActivity : PermissionActivity(), SuccessListener { fun checkDownloadResult(download: Download?) { runOnUiThread { - if (!isFinishing) { + if (!isFinishing && !isDestroyed) { customProgressDialog?.show() customProgressDialog?.setText("${getString(R.string.downloading)} ${download?.progress}% ${getString(R.string.complete)}") customProgressDialog?.setProgress(download?.progress ?: 0)