Use id to determine current destination

This commit is contained in:
Kirill Kamakin
2022-11-20 14:41:38 +01:00
parent 3cc3658544
commit fd235c43c7

View File

@@ -84,9 +84,7 @@ class RecipesListFragment : Fragment(R.layout.fragment_recipes_list) {
private fun isNavigatingSomewhere(): Boolean {
logger.v { "isNavigatingSomewhere() called" }
val label = findNavController().currentDestination?.label
logger.d { "isNavigatingSomewhere: current destination is $label" }
return label != "fragment_recipes"
return findNavController().currentDestination?.id != R.id.recipesListFragment
}
private fun setupRecipeAdapter() {