diff --git a/composeApp/src/commonMain/kotlin/at/torch/compose/ui/composable/HomeScreen.kt b/composeApp/src/commonMain/kotlin/at/torch/compose/ui/composable/HomeScreen.kt index 2caa33f3..6e08f092 100644 --- a/composeApp/src/commonMain/kotlin/at/torch/compose/ui/composable/HomeScreen.kt +++ b/composeApp/src/commonMain/kotlin/at/torch/compose/ui/composable/HomeScreen.kt @@ -258,16 +258,18 @@ fun HomeScreen( ) Card( onClick = { - onNavigateToRoute.invoke( - ImplementationPendingRoute("Direct Message via npub") - ) + scope.launch { sheetState.hide() }.invokeOnCompletion { + onNavigateToRoute.invoke( + ImplementationPendingRoute("Direct Message via npub") + ) + } } ) { ListItem( leadingContent = { Icon( Icons.Default.Key, - contentDescription = "Start npub with key" + contentDescription = "Direct Message via npub" ) }, headlineContent = { @@ -276,7 +278,7 @@ fun HomeScreen( trailingContent = { Icon( Icons.Default.ChevronRight, - contentDescription = "Start chat with npub" + contentDescription = "Direct Message via npub" ) } ) @@ -284,7 +286,9 @@ fun HomeScreen( Card( onClick = { - onNavigateToChatRoomCreation.invoke() + scope.launch { sheetState.hide() }.invokeOnCompletion { + onNavigateToChatRoomCreation.invoke() + } } ) { ListItem(