foldersReload promises populator to the new FolderCollectionModel

This commit is contained in:
djmaze 2020-09-16 09:32:36 +02:00
parent d33f9710c2
commit 8f07cf4ac6
5 changed files with 182 additions and 192 deletions

View file

@ -543,6 +543,13 @@ class MessageUserStore {
+ '</div>');
body.rlCacheCount = iMessageBodyCacheCount;
// Drop Microsoft Office style properties
const rgbRE = /rgb\((\d+),\s*(\d+),\s*(\d+)\)/g,
hex = n => ('0' + parseInt(n).toString(16)).slice(-2);
body.querySelectorAll('[style*=mso]').forEach(el =>
el.setAttribute('style', el.style.cssText.replace(rgbRE, (m,r,g,b) => '#' + hex(r) + hex(g) + hex(b)))
);
message.body = body;
message.isHtml(!!isHtml);