feat(YouTube - Hide layout components): Hide search result recommendations

This commit is contained in:
oSumAtrIX 2023-12-24 18:07:01 +01:00
parent 24d50045ac
commit 55cc7f1c77
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -1,6 +1,5 @@
package app.revanced.patches.youtube.layout.hide.general package app.revanced.patches.youtube.layout.hide.general
import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels 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.litho.filter.LithoFilterPatch
import app.revanced.patches.youtube.misc.settings.SettingsPatch import app.revanced.patches.youtube.misc.settings.SettingsPatch
import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen 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.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction 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_on", "Timed reactions are hidden"),
StringResource("revanced_hide_timed_reactions_summary_off", "Timed reactions are shown") 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( SwitchPreference(
"revanced_hide_search_result_shelf_header", "revanced_hide_search_result_shelf_header",
StringResource( StringResource(