-
Notifications
You must be signed in to change notification settings - Fork 0
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
Issue 5872 fix search error #1
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code?
There was a problem hiding this comment.
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!
There was a problem hiding this 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
Description (required)
Fixes commons-app#5872
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.
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.
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.