diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/suggestions/patch/SuggestionsShelfPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/suggestions/patch/SuggestionsShelfPatch.kt index 938aedac0..ea643d787 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/general/suggestions/patch/SuggestionsShelfPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/general/suggestions/patch/SuggestionsShelfPatch.kt @@ -14,7 +14,6 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.general.suggestions.fingerprints.BreakingNewsFingerprint import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility -import app.revanced.patches.youtube.utils.litho.patch.LithoFilterPatch import app.revanced.patches.youtube.utils.navbarindex.patch.NavBarIndexHookPatch import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.GENERAL @@ -25,7 +24,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction @Description("Hides the suggestions shelf.") @DependsOn( [ - LithoFilterPatch::class, NavBarIndexHookPatch::class, SettingsPatch::class ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsComponentPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsComponentPatch.kt index bc879159e..566c53f1c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsComponentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/shorts/shortscomponent/patch/ShortsComponentPatch.kt @@ -15,7 +15,6 @@ import app.revanced.patches.youtube.utils.litho.patch.LithoFilterPatch import app.revanced.patches.youtube.utils.navbarindex.patch.NavBarIndexHookPatch import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch -import app.revanced.util.bytecode.BytecodeHelper.updatePatchStatus import app.revanced.util.integrations.Constants.PATCHES_PATH @Patch diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/navbarindex/patch/NavBarIndexHookPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/navbarindex/patch/NavBarIndexHookPatch.kt index 16e5596da..b486acde5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/navbarindex/patch/NavBarIndexHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/navbarindex/patch/NavBarIndexHookPatch.kt @@ -11,10 +11,12 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.youtube.utils.fingerprints.OnBackPressedFingerprint +import app.revanced.patches.youtube.utils.litho.patch.LithoFilterPatch import app.revanced.patches.youtube.utils.navbarindex.fingerprints.NavBarBuilderFingerprint import app.revanced.patches.youtube.utils.navbarindex.fingerprints.TopBarButtonFingerprint import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch import app.revanced.util.bytecode.BytecodeHelper.injectInit +import app.revanced.util.integrations.Constants.PATCHES_PATH import app.revanced.util.integrations.Constants.UTILS_PATH import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction @@ -22,7 +24,12 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c import com.android.tools.smali.dexlib2.iface.reference.MethodReference -@DependsOn([SharedResourceIdPatch::class]) +@DependsOn( + [ + SharedResourceIdPatch::class, + LithoFilterPatch::class + ] +) class NavBarIndexHookPatch : BytecodePatch( listOf( NavBarBuilderFingerprint, @@ -72,6 +79,8 @@ class NavBarIndexHookPatch : BytecodePatch( } } ?: return NavBarBuilderFingerprint.toErrorResult() + LithoFilterPatch.addFilter("$PATCHES_PATH/ads/NavBarIndexFilter;") + context.injectInit("NavBarIndexPatch", "initializeIndex") return PatchResultSuccess()