apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

[Bug]: Cancelled upload is considered as Queued even when try to upload again

Open rohit9625 opened this issue 1 year ago • 8 comments
trafficstars

Summary

On the pending upload screen, if the user pauses any ongoing image upload and then discards it from the pending uploads, then that image is considered queued even if the user uploads the image again.

Steps to reproduce

  1. Upload an image normally from the custom selector.
  2. After the uploads start, the app navigates to the contributions screen
  3. Navigate to the pending uploads screen and pause the upload you just started.
  4. After pausing, click the cross icon to cancel the upload.
  5. Again upload the same image and navigate to the pending uploads screen.

Expected behaviour

The upload should fresh start again.

Actual behaviour

The upload is queued.

Device name

Samsung A14

Android version

Android 14

Commons app version

5.0.2

Device logs

No response

Screen-shots

No response

Would you like to work on the issue?

None

rohit9625 avatar Sep 16 '24 07:09 rohit9625

Hi, I am a student from ANU, I am interested in working on this issue. Is it possible to assign this issue to me?

amyWenhui avatar Oct 08 '24 05:10 amyWenhui

Hello @amyWenhui, you'll get assigned to this issue soon. Till then, please try to reproduce the problem on your device. Happy coding :)

rohit9625 avatar Oct 08 '24 05:10 rohit9625

@amyWenhui Oops I assigned you to the other issue already... once done, feel free to ask for this one again. Thanks a lot for your enthusiasm! :-)

nicolas-raoul avatar Oct 08 '24 06:10 nicolas-raoul

Hi Nicolas, i'm one of the teammates of amyWenhui, could you please assign this task to me so that i can work on this issue while amy is working on the other one. :)

GaoYizhuo2000 avatar Oct 08 '24 09:10 GaoYizhuo2000

Thank you so much!

amyWenhui avatar Oct 08 '24 09:10 amyWenhui

@rohit9625 @nicolas-raoul Hi there! I reproduced what you have experienced and found that if you upload any image after clicking the pausing button, it will be queued and only after clicking the resume button it will start uploading again. Then i delved into the source code and found that the pausing button is commented to pause "all the upload", if this means all the past and future uploads, then the situation you experienced isn't a bug. But now i'm confused about for what purpose the pausing button is initially designed. If it is supposed to pause all the exiting uploads rather than future uploads, i can try to fix this(if maintainer approves).

GaoYizhuo2000 avatar Oct 18 '24 11:10 GaoYizhuo2000

I've fixed it anyway, making it possible to give future uploads a fresh start after pausing and deleting all the previous pending uploads. :) And I created a merge request by the way. Looking forward to the approval. :)

GaoYizhuo2000 avatar Oct 18 '24 14:10 GaoYizhuo2000

Sorry I believe that after the issue was reported, the pause button became one for all files, rather than one per file.

So the bug in its initial importance is not really existent anymore, but the fix might still make sense. I tested the fix branch and its behavior seems to make sense. 🙂

nicolas-raoul avatar Oct 20 '24 04:10 nicolas-raoul