mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
Speedup for #902
This commit is contained in:
parent
c6db5f1def
commit
b182372b83
2 changed files with 3 additions and 2 deletions
|
|
@ -22,7 +22,8 @@ const
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
blockquoteSwitcher = () => {
|
blockquoteSwitcher = () => {
|
||||||
tpl.content.querySelectorAll('blockquote').forEach(node => {
|
// tpl.content.querySelectorAll('blockquote').forEach(node => {
|
||||||
|
[...tpl.content.querySelectorAll('blockquote')].reverse().forEach(node => {
|
||||||
let h = node.clientHeight || getRealHeight(node);
|
let h = node.clientHeight || getRealHeight(node);
|
||||||
if (0 === h || 100 < h) {
|
if (0 === h || 100 < h) {
|
||||||
const el = Element.fromHTML('<details class="sm-bq-switcher"><summary>•••</summary></details>');
|
const el = Element.fromHTML('<details class="sm-bq-switcher"><summary>•••</summary></details>');
|
||||||
|
|
|
||||||
|
|
@ -426,7 +426,7 @@ export class MailMessageView extends AbstractViewRight {
|
||||||
registerShortcut('b', '', [Scope.MessageList, Scope.MessageView], () => {
|
registerShortcut('b', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||||
const message = currentMessage();
|
const message = currentMessage();
|
||||||
if (message?.body) {
|
if (message?.body) {
|
||||||
message.body.querySelectorAll('.sm-bq-switcher > summary').forEach(node => node.click());
|
message.body.querySelectorAll('details').forEach(node => node.open = !node.open);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue