From 6a20ecd22e681973d3703f19041edca376667428 Mon Sep 17 00:00:00 2001 From: Jan Skrasek Date: Tue, 21 Feb 2023 16:23:44 +0100 Subject: [PATCH] fix restart of result sharing when new block lambda is used closes #33 this can happen quite often as the lambdas may not be correctly auto remembered --- .../kotlin/com/kiwi/navigationcompose/typed/ResultSharing.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/kotlin/com/kiwi/navigationcompose/typed/ResultSharing.kt b/core/src/main/kotlin/com/kiwi/navigationcompose/typed/ResultSharing.kt index 6b33530..0850eb7 100644 --- a/core/src/main/kotlin/com/kiwi/navigationcompose/typed/ResultSharing.kt +++ b/core/src/main/kotlin/com/kiwi/navigationcompose/typed/ResultSharing.kt @@ -82,7 +82,7 @@ public fun ResultEffectImpl( resultSerializer: KSerializer, block: (R) -> Unit, ) { - DisposableEffect(navController, block) { + DisposableEffect(navController) { // The implementation is based on the official documentation of the Result sharing. // It takes into consideration the possibility of a dialog usage (see the docs). // https://developer.android.com/guide/navigation/navigation-programmatic#additional_considerations