diff --git a/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/root/SpaceView.kt b/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/root/SpaceView.kt index a15f9cb94d..05fb75ee5e 100644 --- a/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/root/SpaceView.kt +++ b/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/root/SpaceView.kt @@ -109,10 +109,12 @@ fun SpaceView( modifier: Modifier = Modifier, acceptDeclineInviteView: @Composable () -> Unit, ) { - BackHandler { + var handledBack by remember { mutableStateOf(false) } + BackHandler(enabled = !handledBack) { if (state.isManageMode) { state.eventSink(SpaceEvents.ExitManageMode) } else { + handledBack = true onBackClick() } }