From 55cc7f1c7722f56af6d33ea2bd09a1b99d635209 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 24 Dec 2023 18:07:01 +0100 Subject: [PATCH] feat(YouTube - Hide layout components): Hide search result recommendations --- .../hide/general/HideLayoutComponentsPatch.kt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt index f9775cf881..ce33d4878f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt @@ -1,6 +1,5 @@ package app.revanced.patches.youtube.layout.hide.general -import app.revanced.util.exception import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels @@ -18,6 +17,7 @@ import app.revanced.patches.youtube.layout.hide.general.fingerprints.ShowWaterma import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch import app.revanced.patches.youtube.misc.settings.SettingsPatch import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen +import app.revanced.util.exception import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction @@ -93,6 +93,21 @@ object HideLayoutComponentsPatch : BytecodePatch( StringResource("revanced_hide_timed_reactions_summary_on", "Timed reactions are hidden"), StringResource("revanced_hide_timed_reactions_summary_off", "Timed reactions are shown") ), + SwitchPreference( + "revanced_hide_search_result_recommendations", + StringResource( + "revanced_hide_search_result_recommendations_title", + "Hide search result recommendations (e.g People also watched)" + ), + StringResource( + "revanced_hide_search_result_recommendations_summary_on", + "Recommendations are hidden" + ), + StringResource( + "revanced_hide_search_result_recommendations_summary_off", + "Recommendations are shown" + ) + ), SwitchPreference( "revanced_hide_search_result_shelf_header", StringResource(