Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rohit9625 opened this issue Sep 16, 2024 · 8 comments · May be fixed by #5869
Open

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

rohit9625 opened this issue Sep 16, 2024 · 8 comments · May be fixed by #5869

Comments

@rohit9625
Copy link
Contributor

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

@amyWenhui
Copy link

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

@rohit9625
Copy link
Contributor Author

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

@nicolas-raoul
Copy link
Member

@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! :-)

@GaoYizhuo2000
Copy link

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. :)

@amyWenhui
Copy link

Thank you so much!

@GaoYizhuo2000
Copy link

@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 pushed a commit to amyWenhui/apps-android-commons that referenced this issue Oct 18, 2024
GaoYizhuo2000 pushed a commit to amyWenhui/apps-android-commons that referenced this issue Oct 18, 2024
@GaoYizhuo2000 GaoYizhuo2000 linked a pull request Oct 18, 2024 that will close this issue
@GaoYizhuo2000
Copy link

GaoYizhuo2000 commented Oct 18, 2024

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. :)

@nicolas-raoul
Copy link
Member

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 beavior seems to make sense. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants