mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
Added message maximum quoted text level for speed.
Read https://github.com/the-djmaze/snappymail/issues/902#issuecomment-1416777217
This commit is contained in:
parent
b0a4fb77be
commit
fc5b26dfc2
44 changed files with 59 additions and 1 deletions
|
|
@ -119,6 +119,8 @@ export const
|
|||
debug = false, // Config()->Get('debug', 'enable', false);
|
||||
detectHiddenImages = true, // !!SettingsGet('try_to_detect_hidden_images'),
|
||||
|
||||
bqLevel = parseInt(SettingsUserStore.maxBlockquotesLevel()),
|
||||
|
||||
result = {
|
||||
hasExternals: false
|
||||
},
|
||||
|
|
@ -201,6 +203,10 @@ export const
|
|||
nodeIterator.referenceNode.remove();
|
||||
}
|
||||
|
||||
if (0 < bqLevel) {
|
||||
tpl.content.querySelectorAll(new Array(1 + bqLevel).fill('blockquote').join(' ')).forEach(node => node.remove());
|
||||
}
|
||||
|
||||
tpl.content.querySelectorAll('*').forEach(oElement => {
|
||||
const name = oElement.tagName,
|
||||
oStyle = oElement.style;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
|||
['layout', 'messageReadDelay', 'messagesPerPage', 'checkMailInterval',
|
||||
'editorDefaultType', 'requestReadReceipt', 'requestDsn', 'requireTLS', 'pgpSign', 'pgpEncrypt',
|
||||
'viewHTML', 'viewImages', 'viewImagesWhitelist', 'removeColors',
|
||||
'hideDeleted', 'listInlineAttachments', 'simpleAttachmentsList', 'collapseBlockquotes',
|
||||
'hideDeleted', 'listInlineAttachments', 'simpleAttachmentsList', 'collapseBlockquotes', 'maxBlockquotesLevel',
|
||||
'useCheckboxesInList', 'listGrouped', 'useThreads', 'replySameFolder', 'msgDefaultAction', 'allowSpellcheck'
|
||||
].forEach(name => this[name] = SettingsUserStore[name]);
|
||||
|
||||
|
|
@ -100,6 +100,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
|||
this.addSetting('MessagesPerPage');
|
||||
this.addSetting('CheckMailInterval');
|
||||
this.addSetting('Layout');
|
||||
this.addSetting('MaxBlockquotesLevel');
|
||||
|
||||
this.addSettings(['ViewHTML', 'ViewImages', 'ViewImagesWhitelist', 'HideDeleted',
|
||||
'ListInlineAttachments', 'simpleAttachmentsList', 'UseCheckboxesInList', 'listGrouped', 'ReplySameFolder',
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export const SettingsUserStore = new class {
|
|||
viewImagesWhitelist: '',
|
||||
removeColors: 0,
|
||||
collapseBlockquotes: 1,
|
||||
maxBlockquotesLevel: 0,
|
||||
listInlineAttachments: 0,
|
||||
simpleAttachmentsList: 0,
|
||||
useCheckboxesInList: 1,
|
||||
|
|
@ -88,6 +89,7 @@ export const SettingsUserStore = new class {
|
|||
self.viewImagesWhitelist(SettingsGet('ViewImagesWhitelist'));
|
||||
self.removeColors(SettingsGet('RemoveColors'));
|
||||
self.collapseBlockquotes(SettingsGet('CollapseBlockquotes'));
|
||||
self.maxBlockquotesLevel(SettingsGet('MaxBlockquotesLevel'));
|
||||
self.listInlineAttachments(SettingsGet('ListInlineAttachments'));
|
||||
self.simpleAttachmentsList(SettingsGet('simpleAttachmentsList'));
|
||||
self.useCheckboxesInList(SettingsGet('UseCheckboxesInList'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue