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

Fixes #5531 Circular Progress bar keeps on moving when nomination for deletion is successful. #5610

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

Conversation

neeldoshii
Copy link
Contributor

Fixes

Description

This pull request addresses an issue where the circular progress bar remains active and keeps moving even after a nomination for deletion is successful. The fix ensures that the progress bar is hidden and the UI is updated correctly upon successful deletion also the Snackbar is shown when the nomination is done successfully.

Changes

  • Modified the onDeleteClicked() & onDeleteClickeddialogtext & created a handleDeletionResult() for handling what to do on success, created a handleDeletionError() for handling what to do on failure.
  • Ensured that UI updates are performed on the UI thread to prevent potential CalledFromWrongThreadException.

Test Plan

Steps to Test

  1. Open the app.
  2. Open any contribution.
  3. Click on the nomination for deletion.
  4. Observe the progress bar behavior after the nomination process completes.

Expected Results

  • The circular progress bar should disappear, indicating that the process has completed.
  • The user should see a confirmation message indicating the successful nomination for deletion.

Screenshots

Additional Information

  • Tested on both emulators and physical devices to verify the fix.

@neeldoshii neeldoshii marked this pull request as draft March 6, 2024 16:16
@neeldoshii neeldoshii force-pushed the Circular-Progress-bar-nomination-for-deletion-#5531 branch from 9b387c7 to c298657 Compare March 6, 2024 17:30
@neeldoshii neeldoshii marked this pull request as ready for review March 6, 2024 18:57
@neeldoshii
Copy link
Contributor Author

Special thanks to @kanahia1 for giving me the opportunity to contribute to this issue and for the keen observation in identifying this bug.

@neeldoshii
Copy link
Contributor Author

Just a friendly ping @nicolas-raoul @RitikaPahwa4444 , can you please Review this pr and let me know if there is any change required.

@nicolas-raoul
Copy link
Member

Very strangely, even though CI is running fine, I am getting this when building, any idea why?

> Task :app:compileProdDebugJavaWithJavac
The following annotation processors are not incremental: dagger-android-processor-2.23.jar (com.google.dagger:dagger-android-processor:2.23), dagger-compiler-2.23.jar (com.google.dagger:dagger-compiler:2.23).
Make sure all annotation processors are incremental to improve your build speed.
/Users/nicolasraoul/src/commons-app/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java:1235: error: cannot find symbol
            if (progressBarDeletion != null) {
                ^
  symbol:   variable progressBarDeletion
  location: class MediaDetailFragment
/Users/nicolasraoul/src/commons-app/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java:1236: error: cannot find symbol
                progressBarDeletion.setVisibility(GONE);
                ^
  symbol:   variable progressBarDeletion
  location: class MediaDetailFragment
/Users/nicolasraoul/src/commons-app/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java:1244: error: cannot find symbol
            delete.setText("Nominated for Deletion");
            ^
  symbol:   variable delete
  location: class MediaDetailFragment

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI unfortunately fails after rebasing on the main branch.
Would you mind fixing?
Thanks a lot! :-)

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]: Circular Progress bar keeps on moving even though nomination for deletion is successful
2 participants