mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-27 12:25:49 +01:00
refactor(YouTube - Miniplayer): Use 'Default' language to describe unpatched Miniplayer type
This commit is contained in:
parent
f5769ec4ae
commit
be3630afaf
@ -18,7 +18,7 @@ public final class ChangeStartPagePatch {
|
||||
/**
|
||||
* Unmodified type, and same as un-patched.
|
||||
*/
|
||||
ORIGINAL("", null),
|
||||
DEFAULT("", null),
|
||||
|
||||
/**
|
||||
* Browse id.
|
||||
|
@ -30,7 +30,7 @@ public final class MiniplayerPatch {
|
||||
*/
|
||||
DISABLED(false, null),
|
||||
/** Unmodified type, and same as un-patched. */
|
||||
ORIGINAL(null, null),
|
||||
DEFAULT(null, null),
|
||||
/**
|
||||
* Exactly the same as MINIMAL and only here for migration of user settings.
|
||||
* Eventually this should be deleted.
|
||||
@ -182,7 +182,7 @@ public final class MiniplayerPatch {
|
||||
* effectively disabling the miniplayer.
|
||||
*/
|
||||
public static boolean getMiniplayerOnCloseHandler(boolean original) {
|
||||
return CURRENT_TYPE == ORIGINAL
|
||||
return CURRENT_TYPE == DEFAULT
|
||||
? original
|
||||
: CURRENT_TYPE == DISABLED;
|
||||
}
|
||||
@ -201,7 +201,7 @@ public final class MiniplayerPatch {
|
||||
* Injection point.
|
||||
*/
|
||||
public static boolean getModernMiniplayerOverride(boolean original) {
|
||||
return CURRENT_TYPE == ORIGINAL
|
||||
return CURRENT_TYPE == DEFAULT
|
||||
? original
|
||||
: CURRENT_TYPE.isModern();
|
||||
}
|
||||
@ -229,7 +229,7 @@ public final class MiniplayerPatch {
|
||||
* Injection point.
|
||||
*/
|
||||
public static boolean getModernFeatureFlagsActiveOverride(boolean original) {
|
||||
if (CURRENT_TYPE == ORIGINAL) {
|
||||
if (CURRENT_TYPE == DEFAULT) {
|
||||
return original;
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ public final class MiniplayerPatch {
|
||||
* Injection point.
|
||||
*/
|
||||
public static boolean enableMiniplayerDoubleTapAction(boolean original) {
|
||||
if (CURRENT_TYPE == ORIGINAL) {
|
||||
if (CURRENT_TYPE == DEFAULT) {
|
||||
return original;
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ public final class MiniplayerPatch {
|
||||
* Injection point.
|
||||
*/
|
||||
public static boolean enableMiniplayerDragAndDrop(boolean original) {
|
||||
if (CURRENT_TYPE == ORIGINAL) {
|
||||
if (CURRENT_TYPE == DEFAULT) {
|
||||
return original;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ public class Settings extends BaseSettings {
|
||||
public static final IntegerSetting PLAYER_OVERLAY_OPACITY = new IntegerSetting("revanced_player_overlay_opacity", 100, true);
|
||||
public static final BooleanSetting OPEN_VIDEOS_FULLSCREEN_PORTRAIT = new BooleanSetting("revanced_open_videos_fullscreen_portrait", FALSE);
|
||||
// Miniplayer
|
||||
public static final EnumSetting<MiniplayerType> MINIPLAYER_TYPE = new EnumSetting<>("revanced_miniplayer_type", MiniplayerType.ORIGINAL, true);
|
||||
public static final EnumSetting<MiniplayerType> MINIPLAYER_TYPE = new EnumSetting<>("revanced_miniplayer_type", MiniplayerType.DEFAULT, true);
|
||||
private static final Availability MINIPLAYER_ANY_MODERN = MINIPLAYER_TYPE.availability(MODERN_1, MODERN_2, MODERN_3, MODERN_4);
|
||||
public static final BooleanSetting MINIPLAYER_DOUBLE_TAP_ACTION = new BooleanSetting("revanced_miniplayer_double_tap_action", TRUE, true, MINIPLAYER_ANY_MODERN);
|
||||
public static final BooleanSetting MINIPLAYER_DRAG_AND_DROP = new BooleanSetting("revanced_miniplayer_drag_and_drop", TRUE, true, MINIPLAYER_ANY_MODERN);
|
||||
@ -204,7 +204,7 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting SPOOF_APP_VERSION = new BooleanSetting("revanced_spoof_app_version", FALSE, true, "revanced_spoof_app_version_user_dialog_message");
|
||||
public static final BooleanSetting TABLET_LAYOUT = new BooleanSetting("revanced_tablet_layout", FALSE, true, "revanced_tablet_layout_user_dialog_message");
|
||||
public static final BooleanSetting WIDE_SEARCHBAR = new BooleanSetting("revanced_wide_searchbar", FALSE, true);
|
||||
public static final EnumSetting<StartPage> CHANGE_START_PAGE = new EnumSetting<>("revanced_change_start_page", StartPage.ORIGINAL, true);
|
||||
public static final EnumSetting<StartPage> CHANGE_START_PAGE = new EnumSetting<>("revanced_change_start_page", StartPage.DEFAULT, true);
|
||||
public static final StringSetting SPOOF_APP_VERSION_TARGET = new StringSetting("revanced_spoof_app_version_target", IS_19_17_OR_GREATER ? "19.35.36" : "17.33.42", true, parent(SPOOF_APP_VERSION));
|
||||
// Custom filter
|
||||
public static final BooleanSetting CUSTOM_FILTER = new BooleanSetting("revanced_custom_filter", FALSE);
|
||||
|
@ -155,7 +155,7 @@
|
||||
<string-array name="revanced_miniplayer_type_entry_values">
|
||||
<!-- Enum names from the extension. -->
|
||||
<item>DISABLED</item>
|
||||
<item>ORIGINAL</item>
|
||||
<item>DEFAULT</item>
|
||||
<item>MINIMAL</item>
|
||||
<item>TABLET</item>
|
||||
<item>MODERN_1</item>
|
||||
@ -172,7 +172,7 @@
|
||||
</string-array>
|
||||
<string-array name="revanced_miniplayer_type_legacy_entry_values">
|
||||
<!-- Enum names from the extension. -->
|
||||
<item>ORIGINAL</item>
|
||||
<item>DEFAULT</item>
|
||||
<item>MINIMAL</item>
|
||||
<item>TABLET</item>
|
||||
<item>MODERN_1</item>
|
||||
@ -201,7 +201,7 @@
|
||||
</string-array>
|
||||
<string-array name="revanced_change_start_page_entry_values">
|
||||
<!-- Enum names from extension -->
|
||||
<item>ORIGINAL</item>
|
||||
<item>DEFAULT</item>
|
||||
<!-- Intent Action -->
|
||||
<item>SEARCH</item>
|
||||
<item>SHORTS</item>
|
||||
|
@ -1028,7 +1028,7 @@ This is because Crowdin requires temporarily flattening this file and removing t
|
||||
<string name="revanced_miniplayer_screen_summary">Change the style of the in app minimized player</string>
|
||||
<string name="revanced_miniplayer_type_title">Miniplayer type</string>
|
||||
<string name="revanced_miniplayer_type_entry_0">Disabled</string>
|
||||
<string name="revanced_miniplayer_type_entry_1">Original</string>
|
||||
<string name="revanced_miniplayer_type_entry_1">Default</string>
|
||||
<string name="revanced_miniplayer_type_entry_2">Minimal</string>
|
||||
<string name="revanced_miniplayer_type_entry_3">Tablet</string>
|
||||
<string name="revanced_miniplayer_type_entry_4">Modern 1</string>
|
||||
|
Loading…
Reference in New Issue
Block a user