Skip to content

Commit 17a0352

Browse files
author
yz.gao
committed
fixed issue commons-app#5829
1 parent c7065e1 commit 17a0352

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/main/java/fr/free/nrw/commons/upload/PendingUploadsFragment.kt

+3
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class PendingUploadsFragment :
116116

117117
/**
118118
* Cancels a specific upload after getting a confirmation from the user using Dialog.
119+
* And if the deleted upload is the last one, will set app off paused, allowing a fresh new start for future uploads.
119120
*/
120121
override fun deleteUpload(contribution: Contribution?) {
121122
showAlertDialog(
@@ -131,6 +132,8 @@ class PendingUploadsFragment :
131132
String.format(Locale.getDefault(), requireActivity().getString(R.string.yes)),
132133
String.format(Locale.getDefault(), requireActivity().getString(R.string.no)),
133134
{
135+
if(contributionsList.size== 1)
136+
{CommonsApplication.isPaused = false}
134137
ViewUtil.showShortToast(context, R.string.cancelling_upload)
135138
pendingUploadsPresenter.deleteUpload(
136139
contribution,

0 commit comments

Comments
 (0)