diff --git a/app/src/main/java/app/revanced/integrations/music/patches/video/PlaybackSpeedPatch.java b/app/src/main/java/app/revanced/integrations/music/patches/video/PlaybackSpeedPatch.java index 713ce24ad1..e816931699 100644 --- a/app/src/main/java/app/revanced/integrations/music/patches/video/PlaybackSpeedPatch.java +++ b/app/src/main/java/app/revanced/integrations/music/patches/video/PlaybackSpeedPatch.java @@ -23,6 +23,10 @@ public static void userSelectedPlaybackSpeed(final float playbackSpeed) { return; Settings.DEFAULT_PLAYBACK_SPEED.save(playbackSpeed); + + if (!Settings.REMEMBER_PLAYBACK_SPEED_LAST_SELECTED_TOAST.get()) + return; + showToastShort(str("revanced_remember_playback_speed_toast", playbackSpeed + "x")); } } diff --git a/app/src/main/java/app/revanced/integrations/music/patches/video/VideoQualityPatch.java b/app/src/main/java/app/revanced/integrations/music/patches/video/VideoQualityPatch.java index 93a1790407..f0a5f6fb9a 100644 --- a/app/src/main/java/app/revanced/integrations/music/patches/video/VideoQualityPatch.java +++ b/app/src/main/java/app/revanced/integrations/music/patches/video/VideoQualityPatch.java @@ -60,6 +60,9 @@ private static void userSelectedVideoQuality(final int defaultQuality) { default -> wifiQualitySetting.save(defaultQuality); } + if (!Settings.REMEMBER_VIDEO_QUALITY_LAST_SELECTED_TOAST.get()) + return; + Utils.showToastShort(str("revanced_remember_video_quality_" + networkType.getName(), defaultQuality + "p")); } } \ No newline at end of file diff --git a/app/src/main/java/app/revanced/integrations/music/settings/Settings.java b/app/src/main/java/app/revanced/integrations/music/settings/Settings.java index e6b9180354..382cf0d60e 100644 --- a/app/src/main/java/app/revanced/integrations/music/settings/Settings.java +++ b/app/src/main/java/app/revanced/integrations/music/settings/Settings.java @@ -145,7 +145,9 @@ public class Settings extends BaseSettings { // PreferenceScreen: Video public static final StringSetting CUSTOM_PLAYBACK_SPEEDS = new StringSetting("revanced_custom_playback_speeds", "0.5\n0.8\n1.0\n1.2\n1.5\n1.8\n2.0", true); public static final BooleanSetting REMEMBER_PLAYBACK_SPEED_LAST_SELECTED = new BooleanSetting("revanced_remember_playback_speed_last_selected", TRUE); + public static final BooleanSetting REMEMBER_PLAYBACK_SPEED_LAST_SELECTED_TOAST = new BooleanSetting("revanced_remember_playback_speed_last_selected_toast", TRUE); public static final BooleanSetting REMEMBER_VIDEO_QUALITY_LAST_SELECTED = new BooleanSetting("revanced_remember_video_quality_last_selected", TRUE); + public static final BooleanSetting REMEMBER_VIDEO_QUALITY_LAST_SELECTED_TOAST = new BooleanSetting("revanced_remember_video_quality_last_selected_toast", TRUE); public static final FloatSetting DEFAULT_PLAYBACK_SPEED = new FloatSetting("revanced_default_playback_speed", 1.0f); public static final IntegerSetting DEFAULT_VIDEO_QUALITY_MOBILE = new IntegerSetting("revanced_default_video_quality_mobile", -2); public static final IntegerSetting DEFAULT_VIDEO_QUALITY_WIFI = new IntegerSetting("revanced_default_video_quality_wifi", -2);