Fix issue detected by lint.

This commit is contained in:
Benoit Marty 2025-12-17 10:36:23 +01:00
parent e8d7c0bf2d
commit b5d15ee787
6 changed files with 16 additions and 11 deletions

View file

@ -116,11 +116,12 @@ private fun Content(
) {
val context = LocalContext.current
val formattedRecoveryKey = state.recoveryKeyViewState.formattedRecoveryKey
val toastMessage = stringResource(R.string.screen_recovery_key_copied_to_clipboard)
val clickLambda = if (formattedRecoveryKey != null) {
{
context.copyToClipboard(
formattedRecoveryKey,
context.getString(R.string.screen_recovery_key_copied_to_clipboard)
text = formattedRecoveryKey,
toastMessage = toastMessage,
)
state.eventSink.invoke(SecureBackupSetupEvents.RecoveryKeyHasBeenSaved)
}