From bdb39bd6b8216d18ced500bc36798f1b0529ae75 Mon Sep 17 00:00:00 2001 From: "yz.gao" Date: Sat, 19 Oct 2024 01:13:03 +1100 Subject: [PATCH] fixed issue #5829 --- .../java/fr/free/nrw/commons/upload/PendingUploadsFragment.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/fr/free/nrw/commons/upload/PendingUploadsFragment.kt b/app/src/main/java/fr/free/nrw/commons/upload/PendingUploadsFragment.kt index 4d79bc88e8..cec7f9b74d 100644 --- a/app/src/main/java/fr/free/nrw/commons/upload/PendingUploadsFragment.kt +++ b/app/src/main/java/fr/free/nrw/commons/upload/PendingUploadsFragment.kt @@ -116,6 +116,7 @@ class PendingUploadsFragment : /** * Cancels a specific upload after getting a confirmation from the user using Dialog. + * And if the deleted upload is the last one, will set app off paused, allowing a fresh new start for future uploads. */ override fun deleteUpload(contribution: Contribution?) { showAlertDialog( @@ -132,6 +133,9 @@ class PendingUploadsFragment : String.format(Locale.getDefault(), requireActivity().getString(R.string.no)), { ViewUtil.showShortToast(context, R.string.cancelling_upload) + + if(contributionsList.size == 1) + {CommonsApplication.isPaused = false} pendingUploadsPresenter.deleteUpload( contribution, this.requireContext().applicationContext,