mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Fix invites not being sent during the room creation (#7018)
* Proceed to the room only from the 'Trust (user) On First Use' confirmation screen
This commit is contained in:
+10
-1
@@ -13,6 +13,9 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.rememberUpdatedState
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
@@ -36,6 +39,13 @@ fun AddPeopleView(
|
||||
modifier: Modifier = Modifier,
|
||||
invitePeopleView: @Composable () -> Unit,
|
||||
) {
|
||||
val currentOnFinish by rememberUpdatedState(onFinish)
|
||||
LaunchedEffect(state.sendInvitesAction, state.createRoomFromDmAction) {
|
||||
if (state.sendInvitesAction.isSuccess() || state.createRoomFromDmAction.isSuccess()) {
|
||||
currentOnFinish()
|
||||
}
|
||||
}
|
||||
|
||||
HeaderFooterPage(
|
||||
modifier = modifier,
|
||||
contentPadding = PaddingValues(0.dp),
|
||||
@@ -47,7 +57,6 @@ fun AddPeopleView(
|
||||
text = stringResource(CommonStrings.action_finish),
|
||||
onClick = {
|
||||
state.eventSink(InvitePeopleEvents.SendInvites)
|
||||
onFinish()
|
||||
},
|
||||
enabled = state.canInvite,
|
||||
modifier = Modifier
|
||||
|
||||
Reference in New Issue
Block a user