Cleanup pgp decrypt code and show green when decrypted

This commit is contained in:
the-djmaze 2022-02-17 10:18:47 +01:00
parent b2a492bdab
commit f4bed88e39
8 changed files with 280 additions and 302 deletions

View file

@ -75,10 +75,11 @@ export class MessageModel extends AbstractModel {
hasExternals: false,
pgpSigned: null,
pgpEncrypted: null,
isPgpEncrypted: false,
pgpVerified: null,
pgpEncrypted: null,
pgpDecrypted: false,
readReceipt: '',
hasUnseenSubMessage: false,
@ -153,10 +154,11 @@ export class MessageModel extends AbstractModel {
this.attachments(new AttachmentCollectionModel);
this.pgpSigned(null);
this.pgpEncrypted(null);
this.isPgpEncrypted(false);
this.pgpVerified(null);
this.pgpEncrypted(null);
this.pgpDecrypted(false);
this.priority(MessagePriority.Normal);
this.readReceipt('');
@ -472,6 +474,7 @@ export class MessageModel extends AbstractModel {
initView() {
// init BlockquoteSwitcher
this.body.querySelectorAll('blockquote:not(.rl-bq-switcher)').forEach(node => {
node.removeAttribute('style')
if (node.textContent.trim() && !node.parentNode.closest('blockquote')) {
let h = node.clientHeight || getRealHeight(node);
if (0 === h || 100 < h) {