-
-
Notifications
You must be signed in to change notification settings - Fork 609
fix(YouTube - Settings): Resolve settings search crash when searching for specific words #6231
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
Conversation
use Locale.ROOT in normalizeTextToLowercase() for consistent case folding The search index and matching must be independent of the user's UI language. Using BaseSettings.REVANCED_LANGUAGE.get().getLocale() can break case-insensitive matching in certain locales (e.g., Turkish 'tr_TR' where 'İ'.toLowerCase() → 'i' without dot, while 'i'.toUpperCase() → 'İ' — causing mismatches). Locale.ROOT provides standardized, locale-neutral case conversion: - 'İ' → 'i' (correct) - 'ß' → 'ss' - Consistent behavior across all languages This ensures reliable search for Korean, Arabic, Vietnamese, and Latin scripts regardless of the selected ReVanced language. Fixes incorrect search behavior when UI language is Turkish, German, etc.
|
@LisoUseInAIKyrios Hello, Look into the description of the this commit. In my language (Ukrainian), the letter "І" (or lowercase "i") in a sorted list is always at the end of the list, although in alphabetical order it should be approximately in the middle. Maybe using a Root locale for the sorted list will solve this problem. |
|
It must be because those letters are different Unicode characters even though they look the same. If the root locale conversion works then use that. |
Replaces raw String.compareTo() with Collator to ensure correct alphabetical order for all languages (e.g., Ukrainian "і", German "ä", French "é")
|
It seems to me that after changing the sorting method, the ReVanced settings open with some delay. |
|
Add some temporary performance logging to check if the sorting is slow. Line 208 in cd9ef81
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I only glanced at the code, but it may be repeating the string normalization for each sorting comparison. If that is the case then normalized before sorting could fix it. |
|
I was wrong, the delay is not caused by sorting, but by using new method |
|
Probably fixed. |
|
Ready to merge? |
|
If there are no reviews, then yes. |
# [5.46.0-dev.2](v5.46.0-dev.1...v5.46.0-dev.2) (2025-11-04) ### Bug Fixes * **YouTube - Settings:** Resolve settings search crash when searching for specific words ([#6231](#6231)) ([76dcfae](76dcfae))
Fix ReVanced settings crashes when type some symbols in search #6131 (comment) and possible fixed crashes when search in Korean #6131