refactor(youtube): separate patches into two

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
oSumAtrIX 2023-02-19 23:53:08 +01:00
parent e040b7de2f
commit 45c3f6e774
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
4 changed files with 20 additions and 11 deletions

View File

@ -0,0 +1,9 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class HideSeekbarPatch {
public static boolean hideSeekbar() {
return SettingsEnum.HIDE_SEEKBAR.getBoolean();
}
}

View File

@ -1,10 +0,0 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class HideTimeAndSeekbarPatch {
//Used by app.revanced.patches.youtube.layout.hidetimeandseekbar.patch.HideTimeAndSeekbarPatch
public static boolean hideTimeAndSeekbar() {
return SettingsEnum.HIDE_TIME_AND_SEEKBAR.getBoolean();
}
}

View File

@ -0,0 +1,9 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class HideTimePatch {
public static boolean hideTime() {
return SettingsEnum.HIDE_TIME.getBoolean();
}
}

View File

@ -89,7 +89,8 @@ public enum SettingsEnum {
HIDE_REEL_BUTTON("revanced_hide_reel_button", true, ReturnType.BOOLEAN, true),
HIDE_SHORTS_BUTTON("revanced_hide_shorts_button", true, ReturnType.BOOLEAN, true),
HIDE_SHORTS_COMMENTS_BUTTON("revanced_hide_shorts_comments_button", false, ReturnType.BOOLEAN),
HIDE_TIME_AND_SEEKBAR("revanced_hide_time_and_seekbar", false, ReturnType.BOOLEAN),
HIDE_TIME("revanced_hide_time", false, ReturnType.BOOLEAN),
HIDE_SEEKBAR("revanced_hide_seekbar", false, ReturnType.BOOLEAN),
HIDE_WATCH_IN_VR("revanced_hide_watch_in_vr", false, ReturnType.BOOLEAN, true),
HIDE_BREAKING_NEWS("revanced_hide_breaking_news", true, ReturnType.BOOLEAN, true),
HIDE_PLAYER_BUTTONS("revanced_hide_player_buttons", false, ReturnType.BOOLEAN, false),