From ab66753cbd06e532c9d9595a783132c773463ad3 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 5 Mar 2023 23:10:08 +0600 Subject: [PATCH] get back filter not instead of filter in drop of NavigationChain --- core/src/commonMain/kotlin/NavigationChain.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/commonMain/kotlin/NavigationChain.kt b/core/src/commonMain/kotlin/NavigationChain.kt index 40bd8a2f..e9eba23f 100644 --- a/core/src/commonMain/kotlin/NavigationChain.kt +++ b/core/src/commonMain/kotlin/NavigationChain.kt @@ -76,8 +76,8 @@ class NavigationChain( val node = nodesIds[id] ?: return null node.state = NavigationNodeState.NEW log.d { "Stack before removing of $node: ${stackFlow.value.joinToString("; ") { it.toString() }}" } - _stackFlow.value = _stackFlow.value.filter { currentNode -> - (currentNode.id != id).also { + _stackFlow.value = _stackFlow.value.filterNot { currentNode -> + (currentNode.id == id).also { log.d { "Id of $currentNode (${currentNode.id}) is equal to $id: $it" } } }