-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Made preferences searchable #7586
Conversation
Sweeeeeet. |
app/src/main/java/org/schabi/newpipe/settings/SettingsResourceRegistry.java
Outdated
Show resolved
Hide resolved
Good work! 👍 |
Here a quick "How to" for testing the release version with Android Studio:
Run the app on your device/emulator as ususal. |
Note: Set the PR status to draft because when you e.g. rotate the screen the UI crashes due to Androids |
app/src/debug/java/org/schabi/newpipe/settings/DebugSettingsBVLeakCanary.java
Outdated
Show resolved
Hide resolved
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 reviewed ~1/3 of the files, will continue later
app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchConfiguration.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java
Outdated
Show resolved
Hide resolved
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.
Great PR! The code you took, though not perfect, is easily readable and makes sense. I still haven't tested, will do later I tested, and it seems to work well :-D
...rc/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceFuzzySearchFunction.java
Show resolved
Hide resolved
...rc/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceFuzzySearchFunction.java
Show resolved
Hide resolved
...rc/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceFuzzySearchFunction.java
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceParser.java
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceParser.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchConfiguration.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchAdapter.java
Outdated
Show resolved
Hide resolved
...ain/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchResultHighlighter.java
Show resolved
Hide resolved
...ain/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchResultHighlighter.java
Show resolved
Hide resolved
27bed01
to
6405a06
Compare
Forgot to commit them before...
so that the search works as expected
* Removed unused method * Only index all settings once -> Saves performance * Fixed some SonarLint reported problems
* Consolidated main-setttings into a single file * Debug settings are only enabled in the DEBUG build * Moved LeakCanary (debug) specific stuff into a small class that's only shipped with the debug build * Other minor fixes
* Renamed methods so that they are more understandable * Removed ``SearchIndexItem``
cef71f8
to
82de35d
Compare
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.
Thank you, code looks good :-)
I tested on API 19 emulated, API 31 emulated and API 29 device and everything worked as expected. The highlighting on API 19 correctly shows the play button next to the setting to highlight, debug & updates settings are correctly removed, every setting category shows up.
app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchFragment.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Stypox <stypox@pm.me>
@Stypox |
Kudos, SonarCloud Quality Gate passed! |
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.
Oh no the commit that removes the commented out code removed your approval :(
@litetex No worries. Here you go.
What is it?
Description of the changes in your PR
This is one of the PR which will improve the search according to #3192 (comment).
Currently it's under the "Content"-area and removed by default. I did this so that it's possible to search this setting.
Demo:
NPDemoPrefSearch1.gif.mp4
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence