mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 11:09:20 +03:00
Resolve #968
This commit is contained in:
parent
84c4522ff2
commit
8ea2ff4ae8
44 changed files with 87 additions and 18 deletions
|
|
@ -45,7 +45,8 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
|||
'editorDefaultType', 'requestReadReceipt', 'requestDsn', 'requireTLS', 'pgpSign', 'pgpEncrypt',
|
||||
'viewHTML', 'viewImages', 'viewImagesWhitelist', 'removeColors', 'allowStyles', 'allowDraftAutosave',
|
||||
'hideDeleted', 'listInlineAttachments', 'simpleAttachmentsList', 'collapseBlockquotes', 'maxBlockquotesLevel',
|
||||
'useCheckboxesInList', 'listGrouped', 'useThreads', 'replySameFolder', 'msgDefaultAction', 'allowSpellcheck'
|
||||
'useCheckboxesInList', 'listGrouped', 'useThreads', 'replySameFolder', 'msgDefaultAction', 'allowSpellcheck',
|
||||
'showNextMessage'
|
||||
].forEach(name => this[name] = SettingsUserStore[name]);
|
||||
|
||||
this.allowLanguagesOnSettings = !!SettingsGet('allowLanguagesOnSettings');
|
||||
|
|
@ -104,7 +105,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
|||
this.addSettings(['ViewHTML', 'ViewImages', 'ViewImagesWhitelist', 'HideDeleted', 'RemoveColors', 'AllowStyles',
|
||||
'ListInlineAttachments', 'simpleAttachmentsList', 'UseCheckboxesInList', 'listGrouped', 'ReplySameFolder',
|
||||
'requestReadReceipt', 'requestDsn', 'requireTLS', 'pgpSign', 'pgpEncrypt', 'allowSpellcheck',
|
||||
'DesktopNotifications', 'SoundNotification', 'CollapseBlockquotes', 'AllowDraftAutosave']);
|
||||
'DesktopNotifications', 'SoundNotification', 'CollapseBlockquotes', 'AllowDraftAutosave', 'showNextMessage']);
|
||||
|
||||
const fReloadLanguageHelper = (saveSettingsStep) => () => {
|
||||
this.languageTrigger(saveSettingsStep);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { koComputable, addObservablesTo, addComputablesTo } from 'External/ko';
|
|||
import { SMAudio } from 'Common/Audio';
|
||||
import { Notifications } from 'Common/Enums';
|
||||
import { MessageSetAction } from 'Common/EnumsUser';
|
||||
import { $htmlCL } from 'Common/Globals';
|
||||
import { $htmlCL, fireEvent } from 'Common/Globals';
|
||||
import { arrayLength, pString } from 'Common/Utils';
|
||||
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||
|
||||
|
|
@ -413,6 +413,18 @@ MessagelistUserStore.removeMessagesFromList = (
|
|||
} else {
|
||||
MessagelistUserStore.isIncomplete(true);
|
||||
|
||||
// Select next email https://github.com/the-djmaze/snappymail/issues/968
|
||||
if (currentMessage && 1 == messages.length && SettingsUserStore.showNextMessage()) {
|
||||
let next = MessagelistUserStore.indexOf(currentMessage) + 1;
|
||||
if (0 < next && (next = MessagelistUserStore()[next])) {
|
||||
currentMessage = null;
|
||||
fireEvent('mailbox.message.show', {
|
||||
folder: next.folder,
|
||||
uid: next.uid
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
messages.forEach(item => {
|
||||
if (currentMessage && currentMessage.hash === item.hash) {
|
||||
currentMessage = null;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ export const SettingsUserStore = new class {
|
|||
simpleAttachmentsList: 0,
|
||||
useCheckboxesInList: 1,
|
||||
listGrouped: 0,
|
||||
showNextMessage: 0,
|
||||
allowDraftAutosave: 1,
|
||||
useThreads: 0,
|
||||
replySameFolder: 0,
|
||||
|
|
@ -95,6 +96,7 @@ export const SettingsUserStore = new class {
|
|||
self.simpleAttachmentsList(SettingsGet('simpleAttachmentsList'));
|
||||
self.useCheckboxesInList(SettingsGet('UseCheckboxesInList'));
|
||||
self.listGrouped(SettingsGet('listGrouped'));
|
||||
self.showNextMessage(SettingsGet('showNextMessage'));
|
||||
self.allowDraftAutosave(SettingsGet('AllowDraftAutosave'));
|
||||
self.useThreads(SettingsGet('UseThreads'));
|
||||
self.replySameFolder(SettingsGet('ReplySameFolder'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue