Skip to content

Commit

Permalink
knock : close screen when canceling knock
Browse files Browse the repository at this point in the history
  • Loading branch information
ganfra committed Oct 22, 2024
1 parent bc4a9a4 commit 512b362
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class JoinRoomNode @AssistedInject constructor(
state = state,
onBackClick = ::navigateUp,
onJoinSuccess = ::navigateUp,
onCancelKnockSuccess = ::navigateUp,
onKnockSuccess = { },
modifier = modifier
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ fun JoinRoomView(
onBackClick: () -> Unit,
onJoinSuccess: () -> Unit,
onKnockSuccess: () -> Unit,
onCancelKnockSuccess: () -> Unit,
modifier: Modifier = Modifier,
) {
Box(
Expand Down Expand Up @@ -139,7 +140,7 @@ fun JoinRoomView(
)
AsyncActionView(
async = state.cancelKnockAction,
onSuccess = { state.eventSink(JoinRoomEvents.ClearActionStates) },
onSuccess = { onCancelKnockSuccess() },
onErrorDismiss = { state.eventSink(JoinRoomEvents.ClearActionStates) },
confirmationDialog = {
ConfirmationDialog(
Expand Down Expand Up @@ -464,5 +465,6 @@ internal fun JoinRoomViewPreview(@PreviewParameter(JoinRoomStateProvider::class)
onBackClick = { },
onJoinSuccess = { },
onKnockSuccess = { },
onCancelKnockSuccess = { },
)
}

0 comments on commit 512b362

Please sign in to comment.