From 2d1706cbf0b094ceeb11f36d7009ea425a1d8539 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 29 Aug 2022 14:52:33 +0600 Subject: [PATCH] 5687-Fix_message_not_saved_when_crypto_not_setted_up_correctly issue: https://gitlab.e.foundation/e/backlog/-/issues/5687 Ignore UNIITIALIZED & UI_REQUIRED openPgpProviderState to show error on messageCreate state because it blocks user to save the draft. --- .../java/com/fsck/k9/activity/compose/ComposeCryptoStatus.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.kt index c646dd964f..7884e93094 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.kt @@ -117,6 +117,7 @@ data class ComposeCryptoStatus( val autocryptPendingIntent = recipientAutocryptStatus?.intent val sendErrorStateOrNull = when { + openPgpProviderState in listOf(OpenPgpProviderState.UNINITIALIZED, OpenPgpProviderState.UI_REQUIRED) -> null openPgpProviderState != OpenPgpProviderState.OK -> SendErrorState.PROVIDER_ERROR openPgpKeyId == null && (isEncryptionEnabled || isSignOnly) -> SendErrorState.KEY_CONFIG_ERROR isEncryptionEnabled && !allRecipientsCanEncrypt() -> SendErrorState.ENABLED_ERROR -- GitLab