Skip to content

Commit

Permalink
fixed issue commons-app#5829
Browse files Browse the repository at this point in the history
  • Loading branch information
yz.gao committed Oct 18, 2024
1 parent c7065e1 commit bdb39bd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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,
Expand Down

0 comments on commit bdb39bd

Please sign in to comment.