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

fixed issue #5829 #5869

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

GaoYizhuo2000
Copy link

Description (required)

Fixes #5829

What changes did you make and why?
Since currently when you pause all the upload and delete them, the app is still at paused state, making future uploads unable to start automatically(you need to click the restart button after creating new uploads)
i modified deleteUpload() in PendingUploadsFragment.kt.
To give future uploads a fresh start after pausing and deleting all the pending upload, I added some code to check if the deleted upload is the last one, if yes, set the app off paused.

Tests performed (required)

Tested ProdDebug build variant on Pixel 3a emulator with API level 34.

I manually tested the changes by pausing all uploads, deleting them, and confirming that new uploads start automatically without needing to click the restart button. Since this change only affects a small part of the code, I believe manual testing is sufficient to verify the functionality.

Screenshots (for UI changes only)

Need help? See https://support.google.com/android/answer/9075928


Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.

@FanKiona
Copy link

The suggested solution is clear and focused, and it effectively solves the current issue. Adding automated tests would greatly increase confidence in the fix and help prevent future issues. Specifically, unit tests for PendingUploadsPresenter or integration tests involving UploadProgressActivity could strengthen this change. If the app is expanded in the future to support multiple uploads at once, it would be best to clearly document the current design of "only one upload at a time" in the code. This would help avoid misunderstandings for other developers later on.

The overall direction of this fix is correct, and with the suggested tests and documentation improvements, it will make the upload process more reliable and user-friendly. Great job on efficiently identifying and fixing a key state management issue.

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

Successfully merging this pull request may close these issues.

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