Skip to content

Commit

Permalink
feat(YouTube Music/Video playback): add an option to disable toasts w…
Browse files Browse the repository at this point in the history
…hen changing the default values
  • Loading branch information
inotia00 committed Aug 28, 2024
1 parent 010a19f commit c992f4a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,22 @@ object VideoPlaybackPatch : BaseBytecodePatch(
"revanced_remember_playback_speed_last_selected",
"true"
)
SettingsPatch.addSwitchPreference(
CategoryType.VIDEO,
"revanced_remember_playback_speed_last_selected_toast",
"true",
"revanced_remember_playback_speed_last_selected"
)
SettingsPatch.addSwitchPreference(
CategoryType.VIDEO,
"revanced_remember_video_quality_last_selected",
"true"
)
SettingsPatch.addSwitchPreference(
CategoryType.VIDEO,
"revanced_remember_video_quality_last_selected_toast",
"true",
"revanced_remember_video_quality_last_selected"
)
}
}
4 changes: 4 additions & 0 deletions src/main/resources/music/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,12 @@ Some features may not work properly in the old player layout."</string>
<string name="revanced_custom_playback_speeds_summary">Add or change available playback speeds.</string>
<string name="revanced_remember_playback_speed_last_selected_title">Remember playback speed changes</string>
<string name="revanced_remember_playback_speed_last_selected_summary">Remembers the last playback speed selected.</string>
<string name="revanced_remember_playback_speed_last_selected_toast_title">Show a toast</string>
<string name="revanced_remember_playback_speed_last_selected_toast_summary">Show a toast when changing the default playback speed.</string>
<string name="revanced_remember_video_quality_last_selected_title">Remember video quality changes</string>
<string name="revanced_remember_video_quality_last_selected_summary">Remembers the last video quality selected.</string>
<string name="revanced_remember_video_quality_last_selected_toast_title">Show a toast</string>
<string name="revanced_remember_video_quality_last_selected_toast_summary">Show a toast when changing the default video quality.</string>
<string name="revanced_custom_playback_speeds_invalid">Custom speeds must be less than %sx. Using default values.</string>
<string name="revanced_custom_playback_speeds_parse_exception">Invalid custom playback speeds. Using default values.</string>
<string name="revanced_remember_playback_speed_toast">Changing default speed to %s.</string>
Expand Down

0 comments on commit c992f4a

Please sign in to comment.