-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
feat(YouTube Music): Add Settings
patch
#2708
base: dev
Are you sure you want to change the base?
Conversation
<string name="revanced_debug_toast_on_error_summary_on">Toast shown if error occurs</string> | ||
<string name="revanced_debug_toast_on_error_summary_off">Toast not shown if error occurs</string> | ||
<string name="revanced_debug_toast_on_error_user_dialog_message">Turning off error toasts hides all ReVanced | ||
error notifications.\n\nYou will not be notified of any unexpected events. |
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.
When the strings were extracted a month ago, I noticed that if the strings have line wrap spacing and new line characters (actual new line, and not \n
), then the strings incorrectly show up in the settings UI with some of that formatting.
I did not take a screen shot of it, but every summary string with \n
would incorrectly show a space or two between the \n
and the text after it.
Removing the extra line wrapping and indentation fixed the summary text layout.
It's not so pretty, but using no line wrapping may be needed.
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.
Maybe it's just an issue with using \n
character with indentation immediately before or after it. Maybe it'll work if there's only 1 indentation after the tag such as:
<string name="revanced_debug_toast_on_error_user_dialog_message">
Turning off error toasts hides all ReVanced error notifications.\n\nYou will not be notified of any unexpected events.</string>
But I haven't looked into this.
d964b8f
to
fd27725
Compare
# Conflicts: # src/main/kotlin/app/revanced/patches/youtube/misc/debugging/DebuggingPatch.kt # src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsResourcePatch.kt # src/main/resources/addresources/values/strings.xml
In YTM v6.43+, Google removed |
feefb56
to
a371631
Compare
c0cd9d2
to
2ace07d
Compare
ThemeHelper is old code when dark mode was not well supported on Android, but things are different now. Maybe ThemeHelper can be deleted/modified to use the newer Android methods such as here |
That could work. What about apps for older Android versions? |
Actually, the library methods for night mode detection has been around since Android 2.2 (2010 Froyo). Should be no issue with older devices. |
About
WsaClient_ukEwU1uHCr.mp4
This PR adds a patch that adds ReVanced settings to YouTube Music.
This is achieved through recent abstractions regarding settings and resource patches.
The PR works like this:
Add a new settings patch, similar to YouTube, to YouTube Music. It extends existing abstract classes.
Because
BaseSettings
in integrations has to debug strings by default, the Debugging patch was abstracted in a similar fashion to aBaseDebuggingPatch
. YouTube adds an additional debugging preference (Litho buffer logging), which does not exist in YouTube Music yet. Refer to the current implementation.RE: ReVanced/revanced-integrations#568
Todo
SettingsPatch
toBaseSettingsPatch
similar toBaseSettingsResourcePatch
ThemeHelper
" which is currently responsible in YouTube for selecting the correct theme for the settings screensThemeHelper
in YouTube MusicThemeHelper
may be merged intoSettingsPatch
in some way or another; it is exclusively used for that purpose, IIRCstrings.xml
, maybe fix them, but IDEs have the option to hide such changes in the diff viewer: