Skip to content

Commit def1ec4

Browse files
author
LisoUseInAIKyrios
authored
fix(YouTube - Settings): Move some settings to different menus, adjust default setting values (#3415)
1 parent 72f02c8 commit def1ec4

File tree

5 files changed

+5
-21
lines changed

5 files changed

+5
-21
lines changed

src/main/kotlin/app/revanced/patches/music/misc/backgroundplayback/BackgroundPlaybackPatch.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import app.revanced.util.resultOrThrow
1212

1313
@Patch(
1414
name = "Remove background playback restrictions",
15-
description = "Removes restrictions on background playback.",
15+
description = "Removes restrictions on background playback, including playing kids videos in the background.",
1616
compatiblePackages = [
1717
CompatiblePackage(
1818
"com.google.android.apps.youtube.music",

src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ object HideLayoutComponentsPatch : BytecodePatch(
102102
),
103103
),
104104
SwitchPreference("revanced_hide_emergency_box"),
105-
SwitchPreference("revanced_hide_expandable_chip"),
106105
SwitchPreference("revanced_hide_info_panels"),
107106
SwitchPreference("revanced_hide_join_membership_button"),
108107
SwitchPreference("revanced_disable_like_subscribe_glow"),
@@ -143,6 +142,7 @@ object HideLayoutComponentsPatch : BytecodePatch(
143142
)
144143

145144
SettingsPatch.PreferenceScreen.GENERAL_LAYOUT.addPreferences(
145+
SwitchPreference("revanced_hide_expandable_chip"),
146146
SwitchPreference("revanced_hide_gray_separator"),
147147
PreferenceScreen(
148148
key = "revanced_custom_filter_screen",
@@ -155,10 +155,6 @@ object HideLayoutComponentsPatch : BytecodePatch(
155155
),
156156
)
157157

158-
SettingsPatch.PreferenceScreen.VIDEO.addPreferences(
159-
SwitchPreference("revanced_hide_video_quality_menu_footer"),
160-
)
161-
162158
LithoFilterPatch.addFilter(LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR)
163159
LithoFilterPatch.addFilter(DESCRIPTION_COMPONENTS_FILTER_CLASS_NAME)
164160
LithoFilterPatch.addFilter(KEYWORD_FILTER_CLASS_NAME)

src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ object HidePlayerFlyoutMenuPatch : ResourcePatch() {
7474
SwitchPreference("revanced_hide_player_flyout_more_info"),
7575
SwitchPreference("revanced_hide_player_flyout_audio_track"),
7676
SwitchPreference("revanced_hide_player_flyout_watch_in_vr"),
77+
SwitchPreference("revanced_hide_video_quality_menu_footer"),
7778
)
7879
)
7980
)

src/main/kotlin/app/revanced/patches/youtube/misc/backgroundplayback/BackgroundPlaybackPatch.kt

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ import app.revanced.patcher.patch.BytecodePatch
77
import app.revanced.patcher.patch.annotation.CompatiblePackage
88
import app.revanced.patcher.patch.annotation.Patch
99
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
10-
import app.revanced.patches.all.misc.resources.AddResourcesPatch
11-
import app.revanced.patches.shared.misc.settings.preference.NonInteractivePreference
12-
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
13-
import app.revanced.patches.youtube.misc.backgroundplayback.fingerprints.KidsBackgroundPlaybackPolicyControllerFingerprint
1410
import app.revanced.patches.youtube.misc.backgroundplayback.fingerprints.BackgroundPlaybackManagerFingerprint
1511
import app.revanced.patches.youtube.misc.backgroundplayback.fingerprints.BackgroundPlaybackSettingsFingerprint
12+
import app.revanced.patches.youtube.misc.backgroundplayback.fingerprints.KidsBackgroundPlaybackPolicyControllerFingerprint
13+
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
1614
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
1715
import app.revanced.patches.youtube.misc.settings.SettingsPatch
1816
import app.revanced.patches.youtube.video.information.VideoInformationPatch
@@ -29,7 +27,6 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
2927
PlayerTypeHookPatch::class,
3028
VideoInformationPatch::class,
3129
SettingsPatch::class,
32-
AddResourcesPatch::class
3330
],
3431
compatiblePackages = [
3532
CompatiblePackage(
@@ -69,12 +66,6 @@ object BackgroundPlaybackPatch : BytecodePatch(
6966
"Lapp/revanced/integrations/youtube/patches/BackgroundPlaybackPatch;"
7067

7168
override fun execute(context: BytecodeContext) {
72-
AddResourcesPatch(this::class)
73-
74-
SettingsPatch.PreferenceScreen.MISC.addPreferences(
75-
NonInteractivePreference("revanced_background_playback")
76-
)
77-
7869
BackgroundPlaybackManagerFingerprint.resultOrThrow().mutableMethod.addInstructions(
7970
0,
8071
"""

src/main/resources/addresources/values/strings.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,10 +1064,6 @@ This is because Crowdin requires temporarily flattening this file and removing t
10641064
<string name="revanced_external_browser_summary_on">Opening links externally</string>
10651065
<string name="revanced_external_browser_summary_off">Opening links in app</string>
10661066
</patch>
1067-
<patch id="misc.backgroundplayback.BackgroundPlaybackPatch">
1068-
<string name="revanced_background_playback_title">Background playback</string>
1069-
<string name="revanced_background_playback_summary">This setting can be found in Settings -&gt; Background</string>
1070-
</patch>
10711067
<patch id="misc.privacy.RemoveTrackingQueryParameterPatch">
10721068
<string name="revanced_remove_tracking_query_parameter_title">Remove tracking query parameter</string>
10731069
<string name="revanced_remove_tracking_query_parameter_summary_on">Tracking query parameter is removed from links</string>

0 commit comments

Comments
 (0)