mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +02:00
chore: Lint code
This commit is contained in:
@ -20,6 +20,8 @@ import app.revanced.extension.youtube.utils.VideoUtils;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class CustomPlaybackSpeedPatch {
|
||||
private static final float PLAYBACK_SPEED_AUTO = Settings.DEFAULT_PLAYBACK_SPEED.defaultValue;
|
||||
|
||||
/**
|
||||
* Maximum playback speed, exclusive value. Custom speeds must be less than this value.
|
||||
* <p>
|
||||
@ -27,7 +29,7 @@ public class CustomPlaybackSpeedPatch {
|
||||
* and the UI selector starts flickering and acting weird.
|
||||
* Over 10x and the speeds show up out of order in the UI selector.
|
||||
*/
|
||||
public static final float MAXIMUM_PLAYBACK_SPEED = 8;
|
||||
public static final float PLAYBACK_SPEED_MAXIMUM = 8;
|
||||
private static final String[] defaultSpeedEntries;
|
||||
private static final String[] defaultSpeedEntryValues;
|
||||
/**
|
||||
@ -128,8 +130,8 @@ public class CustomPlaybackSpeedPatch {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
if (speedFloat > MAXIMUM_PLAYBACK_SPEED) {
|
||||
resetCustomSpeeds(str("revanced_custom_playback_speeds_invalid", MAXIMUM_PLAYBACK_SPEED));
|
||||
if (speedFloat > PLAYBACK_SPEED_MAXIMUM) {
|
||||
resetCustomSpeeds(str("revanced_custom_playback_speeds_invalid", PLAYBACK_SPEED_MAXIMUM));
|
||||
loadCustomSpeeds();
|
||||
return;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public class PlaybackSpeedPatch {
|
||||
// With the 0.05x menu, if the speed is set by integrations to higher than 2.0x
|
||||
// then the menu will allow increasing without bounds but the max speed is
|
||||
// still capped to under 8.0x.
|
||||
playbackSpeed = Math.min(playbackSpeed, CustomPlaybackSpeedPatch.MAXIMUM_PLAYBACK_SPEED - 0.05f);
|
||||
playbackSpeed = Math.min(playbackSpeed, CustomPlaybackSpeedPatch.PLAYBACK_SPEED_MAXIMUM - 0.05f);
|
||||
|
||||
// Prevent toast spamming if using the 0.05x adjustments.
|
||||
// Show exactly one toast after the user stops interacting with the speed menu.
|
||||
|
Reference in New Issue
Block a user