mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
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).
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user