Browse Source

Cancel start DM if there is no more selected user

test/jme/compound-poc
Florian Renaud 1 year ago
parent
commit
5bb31c1c3b
  1. 7
      features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt

7
features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt

@ -113,9 +113,10 @@ fun CreateRoomRootView( @@ -113,9 +113,10 @@ fun CreateRoomRootView(
content = stringResource(id = StringR.string.screen_start_chat_error_starting_chat),
onDismiss = { state.eventSink(CreateRoomRootEvents.CancelStartDM) },
onRetry = {
state.userListState.selectedUsers.firstOrNull()?.let {
state.eventSink(CreateRoomRootEvents.StartDM(it))
}
state.userListState.selectedUsers.firstOrNull()
?.let { state.eventSink(CreateRoomRootEvents.StartDM(it)) }
// Cancel start DM if there is no more selected user (should not happen)
?: state.eventSink(CreateRoomRootEvents.CancelStartDM)
},
)
}

Loading…
Cancel
Save