From 4a17989c96e1d02ed32b2f25ce3862227c78b9db Mon Sep 17 00:00:00 2001 From: imCrest <217463890+imCrest@users.noreply.github.com> Date: Tue, 14 Apr 2026 21:36:46 +0000 Subject: [PATCH] Narrow spotlight tab hiding to navigation ids only --- .../purrfectsnap/core/features/impl/ui/UITweaks.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/ui/UITweaks.kt b/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/ui/UITweaks.kt index 2e4d37bd..b3d6d627 100644 --- a/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/ui/UITweaks.kt +++ b/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/ui/UITweaks.kt @@ -87,6 +87,12 @@ class UITweaks : Feature("UITweaks") { getId("hova_nav_spotlight_tab", "id"), getId("hova_nav_spotlight_button", "id") ).filter { it != 0 }.toSet() + val spotlightNavNames = setOf( + "hova_nav_spotlight", + "ngs_hova_nav_spotlight", + "hova_nav_spotlight_tab", + "hova_nav_spotlight_button" + ) Resources::class.java.methods.first { it.name == "getDimensionPixelSize"}.hook( HookStage.AFTER, @@ -130,6 +136,11 @@ class UITweaks : Feature("UITweaks") { val parentClassName = event.parent.javaClass.name val isNavigationParent = parentClassName.contains("hova", ignoreCase = true) && (parentClassName.contains("nav", ignoreCase = true) || parentClassName.contains("tab", ignoreCase = true)) + val isSpotlightNavById = viewId in spotlightNavIds + val isSpotlightNavByName = resourceEntryName != null && spotlightNavNames.contains(resourceEntryName) + + if (isNavigationParent && (isSpotlightNavById || isSpotlightNavByName)) { + view.hideViewCompletely() val contentDescription = view.contentDescription?.toString() val isSpotlightNavById = viewId in spotlightNavIds val isSpotlightNavByName = resourceEntryName?.let {