Merge pull request #7827 from element-hq/feature/bma/multiAccountIncomingUserVerification

Multi account incoming user verification
This commit is contained in:
Benoit Marty
2026-10-02 18:56:58 +02:00
committed by GitHub
24 changed files with 113 additions and 168 deletions
@@ -73,8 +73,6 @@ enum class AvatarSize(val dp: Dp) {
DmCreationConfirmation(64.dp),
UserVerification(52.dp),
OrganizationHeader(64.dp),
SpaceHeader(64.dp),
RoomPreviewHeader(64.dp),
@@ -58,19 +58,6 @@ fun AccountInfoCard(
.border(1.dp, ElementTheme.colors.borderDisabled, RoundedCornerShape(8.dp))
.padding(20.dp),
) {
when (state.mode) {
AccountInfoCardMode.Simple -> Unit
is AccountInfoCardMode.DeviceVerification -> Unit
is AccountInfoCardMode.UserVerification -> {
Text(
// TODO
text = "User requesting verification:",
style = ElementTheme.typography.fontBodySmRegular,
color = ElementTheme.colors.textSecondary,
)
Spacer(modifier = Modifier.height(8.dp))
}
}
AccountInfoCardUser(
matrixUser = state.matrixUser,
)
@@ -82,6 +69,12 @@ fun AccountInfoCard(
}
is AccountInfoCardMode.UserVerification -> {
AccountInfoSeparator()
Text(
text = state.mode.hint,
style = ElementTheme.typography.fontBodySmRegular,
color = ElementTheme.colors.textSecondary,
)
Spacer(modifier = Modifier.height(8.dp))
AccountInfoCardUser(
matrixUser = state.mode.otherUser,
)
@@ -22,6 +22,7 @@ sealed interface AccountInfoCardMode {
data class UserVerification(
val otherUser: MatrixUser,
val hint: String,
) : AccountInfoCardMode
data class DeviceVerification(
@@ -20,6 +20,7 @@ open class AccountInfoCardStatePreviewParam : PreviewParameterProvider<AccountIn
anAccountInfoCardState(
mode = AccountInfoCardMode.UserVerification(
otherUser = aMatrixUser(displayName = "Other User"),
hint = "User request verification hint",
)
),
anAccountInfoCardState(