Skip to content

Commit bdb39bd

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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
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(
@@ -132,6 +133,9 @@ class PendingUploadsFragment :
132133
String.format(Locale.getDefault(), requireActivity().getString(R.string.no)),
133134
{
134135
ViewUtil.showShortToast(context, R.string.cancelling_upload)
136+
137+
if(contributionsList.size == 1)
138+
{CommonsApplication.isPaused = false}
135139
pendingUploadsPresenter.deleteUpload(
136140
contribution,
137141
this.requireContext().applicationContext,

0 commit comments

Comments
 (0)