Use id to determine current destination
This commit is contained in:
@@ -84,9 +84,7 @@ class RecipesListFragment : Fragment(R.layout.fragment_recipes_list) {
|
|||||||
|
|
||||||
private fun isNavigatingSomewhere(): Boolean {
|
private fun isNavigatingSomewhere(): Boolean {
|
||||||
logger.v { "isNavigatingSomewhere() called" }
|
logger.v { "isNavigatingSomewhere() called" }
|
||||||
val label = findNavController().currentDestination?.label
|
return findNavController().currentDestination?.id != R.id.recipesListFragment
|
||||||
logger.d { "isNavigatingSomewhere: current destination is $label" }
|
|
||||||
return label != "fragment_recipes"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupRecipeAdapter() {
|
private fun setupRecipeAdapter() {
|
||||||
|
|||||||
Reference in New Issue
Block a user