From 0cbca605ec6f66ea400831d59b61a55bf645170d Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 26 Feb 2024 16:59:50 +0100 Subject: [PATCH] Bugfix: mailvelope editor failed --- dev/View/Popup/Compose.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/dev/View/Popup/Compose.js b/dev/View/Popup/Compose.js index 8ced18616..2fd0e23bd 100644 --- a/dev/View/Popup/Compose.js +++ b/dev/View/Popup/Compose.js @@ -1383,7 +1383,7 @@ export class ComposePopupView extends AbstractViewPopup { this.signOptions(options); } - initEncrypt() { + async initEncrypt() { const recipients = this.allRecipients(), options = []; @@ -1394,14 +1394,12 @@ export class ComposePopupView extends AbstractViewPopup { OpenPGPUserStore.hasPublicKeyForEmails(recipients) && options.push('OpenPGP'); - MailvelopeUserStore.hasPublicKeyForEmails(recipients).then(result => { - if (result) { - options.push('Mailvelope'); - } else { - 'mailvelope' === this.viewArea() && this.bodyArea(); - // this.dropMailvelope(); - } - }); + if (await MailvelopeUserStore.hasPublicKeyForEmails(recipients)) { + options.push('Mailvelope'); + } else { + 'mailvelope' === this.viewArea() && this.bodyArea(); +// this.dropMailvelope(); + } const count = recipients.length, identity = this.currentIdentity(),