Skip to content

Commit 4408209

Browse files
committed
feat(YouTube - Hide layout components): Hide search result recommendations
1 parent 987e4e7 commit 4408209

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package app.revanced.patches.youtube.layout.hide.general
22

3-
import app.revanced.util.exception
43
import app.revanced.patcher.data.BytecodeContext
54
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
65
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
@@ -18,6 +17,7 @@ import app.revanced.patches.youtube.layout.hide.general.fingerprints.ShowWaterma
1817
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
1918
import app.revanced.patches.youtube.misc.settings.SettingsPatch
2019
import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen
20+
import app.revanced.util.exception
2121
import com.android.tools.smali.dexlib2.Opcode
2222
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
2323
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
@@ -93,6 +93,21 @@ object HideLayoutComponentsPatch : BytecodePatch(
9393
StringResource("revanced_hide_timed_reactions_summary_on", "Timed reactions are hidden"),
9494
StringResource("revanced_hide_timed_reactions_summary_off", "Timed reactions are shown")
9595
),
96+
SwitchPreference(
97+
"revanced_hide_search_result_recommendations",
98+
StringResource(
99+
"revanced_hide_search_result_recommendations_title",
100+
"Hide search result recommendations (e.g People also watched)"
101+
),
102+
StringResource(
103+
"revanced_hide_search_result_recommendations_summary_on",
104+
"Recommendations are hidden"
105+
),
106+
StringResource(
107+
"revanced_hide_search_result_recommendations_summary_off",
108+
"Recommendations are shown"
109+
)
110+
),
96111
SwitchPreference(
97112
"revanced_hide_search_result_shelf_header",
98113
StringResource(

0 commit comments

Comments
 (0)