From 9cf2c99fb546476ea4b5be608488bfed4e502ac5 Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Sat, 26 Sep 2026 04:09:17 +0000 Subject: [PATCH] suppress the restricted NavController.currentBackStack in navigateDetail currentBackStack is @RestrictTo(LIBRARY_GROUP), which CI's Android Lint rejected. There is no public API that matches a back-stack entry by its arguments, so keep it and suppress the check rather than fall back to argument-blind popBackStack(route). --- app/src/main/kotlin/com/subtracks/ui/AppRoot.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt b/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt index a8da2d1d..76bddca1 100644 --- a/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt +++ b/app/src/main/kotlin/com/subtracks/ui/AppRoot.kt @@ -197,6 +197,9 @@ private fun MainNavigation() { } } + // currentBackStack is restricted to androidx.navigation, but it is the only way to find a + // detail entry by its arguments; popBackStack(route) matches the destination and ignores them. + @Suppress("RestrictedApi") fun navigateDetail( pattern: String, argument: String,