ensure that cancelled uploads are really getting cancelled (#5367)

This commit is contained in:
Ritika Pahwa 2023-10-29 19:51:16 +05:30 committed by GitHub
parent 6166fde7cd
commit 39a2fbe3d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 15 deletions

View file

@ -36,6 +36,7 @@ import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import fr.free.nrw.commons.CommonsApplication;
import fr.free.nrw.commons.Media;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
@ -429,6 +430,7 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
() -> {
ViewUtil.showShortToast(getContext(), R.string.cancelling_upload);
contributionsListPresenter.deleteUpload(contribution);
CommonsApplication.cancelledUploads.add(contribution.getPageId());
}, () -> {
// Do nothing
});