Skip to content

Commit

Permalink
chore: cherry pick of #3740
Browse files Browse the repository at this point in the history
  • Loading branch information
yamilmedina committed Dec 16, 2024
1 parent d37cf33 commit 9426eeb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ fun DeviceDetailsContent(
) {
state.device.mlsClientIdentity?.let { identity ->
item {
FolderHeader(
name = stringResource(id = R.string.label_mls_signature, state.mlsCipherSuiteSignature.orEmpty()).uppercase(),
modifier = Modifier
.background(MaterialTheme.wireColorScheme.background)
.fillMaxWidth()
)
DeviceMLSSignatureItem(identity.thumbprint, screenState::copyMessage)
HorizontalDivider(color = MaterialTheme.wireColorScheme.background)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import com.wire.kalium.logic.CoreFailure
import com.wire.kalium.logic.data.client.ClientType
import com.wire.kalium.logic.data.client.DeleteClientParam
import com.wire.kalium.logic.data.conversation.ClientId
import com.wire.kalium.logic.data.mlspublickeys.MLSPublicKeyType
import com.wire.kalium.logic.data.user.UserId
import com.wire.kalium.logic.feature.client.ClientFingerprintUseCase
import com.wire.kalium.logic.feature.client.DeleteClientResult
Expand Down Expand Up @@ -198,6 +199,9 @@ class DeviceDetailsViewModel @Inject constructor(
isCurrentDevice = result.isCurrentClient,
removeDeviceDialogState = RemoveDeviceDialogState.Hidden,
canBeRemoved = !result.isCurrentClient && isSelfClient && result.client.type != ClientType.LegalHold,
mlsCipherSuiteSignature = MLSPublicKeyType.from(
result.client.mlsPublicKeys?.keys?.firstOrNull().orEmpty()
).value.toString()
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ data class DeviceDetailsState(
val isE2EICertificateEnrollSuccess: Boolean = false,
val isE2EICertificateEnrollError: Boolean = false,
val isE2EIEnabled: Boolean = false,
val startGettingE2EICertificate: Boolean = false
val startGettingE2EICertificate: Boolean = false,
val mlsCipherSuiteSignature: String? = null,
)

0 comments on commit 9426eeb

Please sign in to comment.