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

Issue 5872 fix search error #1

Merged

Conversation

zihanpan
Copy link
Owner

Description (required)

Fixes commons-app#5872

  1. Adjustments to error handling logic:
    Added the isInitialLoad status variable to track whether it was an initial load. This variable is set to true when the page starts loading and false for the first call to searchForCategories to ensure that no error messages are displayed during the initial loading.

  2. Null input processing:
    In the searchForCategories method, a check for whether the input is empty has been added. If the input is empty and the initial load is not categories_found, the call view.showError(r.sched.no_categories_found) shows an error.

  3. EditText handling:
    Ensure that edittext continues to receive input after ErrorShow is triggered, and that categories cannot be retrieved due to conflicts

Tests performed (required)

Tested Debug on Medium Phone with API level 34.

@zihanpan zihanpan added the bug Something isn't working label Oct 22, 2024
@zihanpan zihanpan requested a review from AlexG-2003 October 22, 2024 01:37
@zihanpan zihanpan self-assigned this Oct 22, 2024
Copy link
Collaborator

@AlexG-2003 AlexG-2003 left a comment

Choose a reason for hiding this comment

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

Looks good except for one commented line of code

@@ -79,8 +81,13 @@ class CategoriesPresenter
},
),
)

//isInitialLoad = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove commented code?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I have removed the suggested line. Please take another look when you have time. Thank you for your feedback!

Copy link
Collaborator

@AlexG-2003 AlexG-2003 left a comment

Choose a reason for hiding this comment

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

Looks good now. Accepting the merge

@AlexG-2003 AlexG-2003 merged commit a99e20f into issue-5872-fix-search-error-examined Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants