Skip to content

Commit

Permalink
get back filter not instead of filter in drop of NavigationChain
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanusMokrassar committed Mar 5, 2023
1 parent 6bd7995 commit ab66753
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/commonMain/kotlin/NavigationChain.kt
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class NavigationChain<Base>(
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" }
}
}
Expand Down

0 comments on commit ab66753

Please sign in to comment.