Make collapse quotes optional for #902

This commit is contained in:
the-djmaze 2023-02-03 14:40:56 +01:00
parent b859cd6aec
commit 426c92fe33
44 changed files with 53 additions and 2 deletions

View file

@ -22,6 +22,7 @@ const
return result;
},
blockquoteSwitcher = () => {
SettingsUserStore.collapseBlockquotes() &&
// tpl.content.querySelectorAll('blockquote').forEach(node => {
[...tpl.content.querySelectorAll('blockquote')].reverse().forEach(node => {
let h = node.clientHeight || getRealHeight(node);

View file

@ -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',
'hideDeleted', 'listInlineAttachments', 'simpleAttachmentsList', 'collapseBlockquotes',
'useCheckboxesInList', 'listGrouped', 'useThreads', 'replySameFolder', 'msgDefaultAction', 'allowSpellcheck'
].forEach(name => this[name] = SettingsUserStore[name]);
@ -104,7 +104,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
this.addSettings(['ViewHTML', 'ViewImages', 'ViewImagesWhitelist', 'HideDeleted',
'ListInlineAttachments', 'simpleAttachmentsList', 'UseCheckboxesInList', 'listGrouped', 'ReplySameFolder',
'requestReadReceipt', 'requestDsn', 'requireTLS', 'pgpSign', 'pgpEncrypt', 'allowSpellcheck',
'DesktopNotifications', 'SoundNotification']);
'DesktopNotifications', 'SoundNotification', 'CollapseBlockquotes']);
const fReloadLanguageHelper = (saveSettingsStep) => () => {
this.languageTrigger(saveSettingsStep);

View file

@ -19,6 +19,7 @@ export const SettingsUserStore = new class {
viewImages: 0,
viewImagesWhitelist: '',
removeColors: 0,
collapseBlockquotes: 1,
listInlineAttachments: 0,
simpleAttachmentsList: 0,
useCheckboxesInList: 1,
@ -86,6 +87,7 @@ export const SettingsUserStore = new class {
self.viewImages(SettingsGet('ViewImages'));
self.viewImagesWhitelist(SettingsGet('ViewImagesWhitelist'));
self.removeColors(SettingsGet('RemoveColors'));
self.collapseBlockquotes(SettingsGet('CollapseBlockquotes'));
self.listInlineAttachments(SettingsGet('ListInlineAttachments'));
self.simpleAttachmentsList(SettingsGet('simpleAttachmentsList'));
self.useCheckboxesInList(SettingsGet('UseCheckboxesInList'));