mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
Resolve #1289
This commit is contained in:
parent
771c6f7559
commit
daf1e2769f
6 changed files with 47 additions and 32 deletions
|
|
@ -276,7 +276,7 @@ viewMessage = (oMessage, popup) => {
|
||||||
MessageUserStore.loading(false);
|
MessageUserStore.loading(false);
|
||||||
oMessage.body.hidden = false;
|
oMessage.body.hidden = false;
|
||||||
|
|
||||||
if (oMessage.isUnseen()) {
|
if (oMessage.isUnseen() && SettingsUserStore.messageReadAuto()) {
|
||||||
MessageUserStore.MessageSeenTimer = setTimeout(
|
MessageUserStore.MessageSeenTimer = setTimeout(
|
||||||
() => MessagelistUserStore.setAction(oMessage.folder, MessageSetAction.SetSeen, [oMessage]),
|
() => MessagelistUserStore.setAction(oMessage.folder, MessageSetAction.SetSeen, [oMessage]),
|
||||||
SettingsUserStore.messageReadDelay() * 1000 // seconds
|
SettingsUserStore.messageReadDelay() * 1000 // seconds
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
||||||
|
|
||||||
this.addSettings(['ViewHTML', 'ViewImages', 'ViewImagesWhitelist', 'HideDeleted', 'RemoveColors', 'AllowStyles',
|
this.addSettings(['ViewHTML', 'ViewImages', 'ViewImagesWhitelist', 'HideDeleted', 'RemoveColors', 'AllowStyles',
|
||||||
'ListInlineAttachments', 'simpleAttachmentsList', 'UseCheckboxesInList', 'listGrouped', 'ReplySameFolder',
|
'ListInlineAttachments', 'simpleAttachmentsList', 'UseCheckboxesInList', 'listGrouped', 'ReplySameFolder',
|
||||||
'requestReadReceipt', 'requestDsn', 'requireTLS', 'pgpSign', 'pgpEncrypt', 'allowSpellcheck',
|
'requestReadReceipt', 'requestDsn', 'requireTLS', 'pgpSign', 'pgpEncrypt', 'allowSpellcheck', 'messageReadAuto',
|
||||||
'DesktopNotifications', 'SoundNotification', 'CollapseBlockquotes', 'AllowDraftAutosave', 'showNextMessage']);
|
'DesktopNotifications', 'SoundNotification', 'CollapseBlockquotes', 'AllowDraftAutosave', 'showNextMessage']);
|
||||||
|
|
||||||
const fReloadLanguageHelper = (saveSettingsStep) => () => {
|
const fReloadLanguageHelper = (saveSettingsStep) => () => {
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ export const SettingsUserStore = new class {
|
||||||
unhideKolabFolders: 0,
|
unhideKolabFolders: 0,
|
||||||
autoLogout: 0,
|
autoLogout: 0,
|
||||||
showUnreadCount: 0,
|
showUnreadCount: 0,
|
||||||
|
messageReadAuto: 0,
|
||||||
|
|
||||||
requestReadReceipt: 0,
|
requestReadReceipt: 0,
|
||||||
requestDsn: 0,
|
requestDsn: 0,
|
||||||
|
|
@ -78,39 +79,44 @@ export const SettingsUserStore = new class {
|
||||||
const self = this;
|
const self = this;
|
||||||
self.editorDefaultType(SettingsGet('EditorDefaultType'));
|
self.editorDefaultType(SettingsGet('EditorDefaultType'));
|
||||||
|
|
||||||
|
[
|
||||||
|
'messageReadAuto',
|
||||||
|
'MsgDefaultAction',
|
||||||
|
'ViewHTML',
|
||||||
|
'ViewImages',
|
||||||
|
'ViewImagesWhitelist',
|
||||||
|
'RemoveColors',
|
||||||
|
'AllowStyles',
|
||||||
|
'CollapseBlockquotes',
|
||||||
|
'MaxBlockquotesLevel',
|
||||||
|
'ListInlineAttachments',
|
||||||
|
'simpleAttachmentsList',
|
||||||
|
'UseCheckboxesInList',
|
||||||
|
'listGrouped',
|
||||||
|
'showNextMessage',
|
||||||
|
'AllowDraftAutosave',
|
||||||
|
'UseThreads',
|
||||||
|
'ReplySameFolder',
|
||||||
|
'HideUnsubscribed',
|
||||||
|
'HideDeleted',
|
||||||
|
'ShowUnreadCount',
|
||||||
|
'UnhideKolabFolders',
|
||||||
|
'requestReadReceipt',
|
||||||
|
'requestDsn',
|
||||||
|
'requireTLS',
|
||||||
|
'pgpSign',
|
||||||
|
'pgpEncrypt',
|
||||||
|
'allowSpellcheck'
|
||||||
|
].forEach(name => {
|
||||||
|
let value = SettingsGet(name);
|
||||||
|
name = name[0].toLowerCase() + name.slice(1);
|
||||||
|
self[name](value);
|
||||||
|
});
|
||||||
|
|
||||||
self.layout(pInt(SettingsGet('Layout')));
|
self.layout(pInt(SettingsGet('Layout')));
|
||||||
self.messagesPerPage(pInt(SettingsGet('MessagesPerPage')));
|
self.messagesPerPage(pInt(SettingsGet('MessagesPerPage')));
|
||||||
self.checkMailInterval(pInt(SettingsGet('CheckMailInterval')));
|
self.checkMailInterval(pInt(SettingsGet('CheckMailInterval')));
|
||||||
self.messageReadDelay(pInt(SettingsGet('MessageReadDelay')));
|
self.messageReadDelay(pInt(SettingsGet('MessageReadDelay')));
|
||||||
self.autoLogout(pInt(SettingsGet('AutoLogout')));
|
self.autoLogout(pInt(SettingsGet('AutoLogout')));
|
||||||
self.msgDefaultAction(SettingsGet('MsgDefaultAction'));
|
|
||||||
|
|
||||||
self.viewHTML(SettingsGet('ViewHTML'));
|
|
||||||
self.viewImages(SettingsGet('ViewImages'));
|
|
||||||
self.viewImagesWhitelist(SettingsGet('ViewImagesWhitelist'));
|
|
||||||
self.removeColors(SettingsGet('RemoveColors'));
|
|
||||||
self.allowStyles(SettingsGet('AllowStyles'));
|
|
||||||
self.collapseBlockquotes(SettingsGet('CollapseBlockquotes'));
|
|
||||||
self.maxBlockquotesLevel(SettingsGet('MaxBlockquotesLevel'));
|
|
||||||
self.listInlineAttachments(SettingsGet('ListInlineAttachments'));
|
|
||||||
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'));
|
|
||||||
|
|
||||||
self.hideUnsubscribed(SettingsGet('HideUnsubscribed'));
|
|
||||||
self.hideDeleted(SettingsGet('HideDeleted'));
|
|
||||||
self.showUnreadCount(SettingsGet('ShowUnreadCount'));
|
|
||||||
self.unhideKolabFolders(SettingsGet('UnhideKolabFolders'));
|
|
||||||
|
|
||||||
self.requestReadReceipt(SettingsGet('requestReadReceipt'));
|
|
||||||
self.requestDsn(SettingsGet('requestDsn'));
|
|
||||||
self.requireTLS(SettingsGet('requireTLS'));
|
|
||||||
self.pgpSign(SettingsGet('pgpSign'));
|
|
||||||
self.pgpEncrypt(SettingsGet('pgpEncrypt'));
|
|
||||||
self.allowSpellcheck(SettingsGet('allowSpellcheck'));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -691,6 +691,7 @@ class Actions
|
||||||
'simpleAttachmentsList' => false,
|
'simpleAttachmentsList' => false,
|
||||||
'listGrouped' => $oConfig->Get('defaults', 'mail_list_grouped', false),
|
'listGrouped' => $oConfig->Get('defaults', 'mail_list_grouped', false),
|
||||||
'MessagesPerPage' => (int) $oConfig->Get('webmail', 'messages_per_page', 25),
|
'MessagesPerPage' => (int) $oConfig->Get('webmail', 'messages_per_page', 25),
|
||||||
|
'messageReadAuto' => true, // (bool) $oConfig->Get('webmail', 'message_read_auto', true),
|
||||||
'MessageReadDelay' => (int) $oConfig->Get('webmail', 'message_read_delay', 5),
|
'MessageReadDelay' => (int) $oConfig->Get('webmail', 'message_read_delay', 5),
|
||||||
'MsgDefaultAction' => (int) $oConfig->Get('defaults', 'msg_default_action', 1),
|
'MsgDefaultAction' => (int) $oConfig->Get('defaults', 'msg_default_action', 1),
|
||||||
'SoundNotification' => true,
|
'SoundNotification' => true,
|
||||||
|
|
@ -790,6 +791,7 @@ class Actions
|
||||||
$aResult['listGrouped'] = (bool)$oSettings->GetConf('listGrouped', $aResult['listGrouped']);
|
$aResult['listGrouped'] = (bool)$oSettings->GetConf('listGrouped', $aResult['listGrouped']);
|
||||||
$aResult['ContactsAutosave'] = (bool)$oSettings->GetConf('ContactsAutosave', $aResult['ContactsAutosave']);
|
$aResult['ContactsAutosave'] = (bool)$oSettings->GetConf('ContactsAutosave', $aResult['ContactsAutosave']);
|
||||||
$aResult['MessagesPerPage'] = (int)$oSettings->GetConf('MessagesPerPage', $aResult['MessagesPerPage']);
|
$aResult['MessagesPerPage'] = (int)$oSettings->GetConf('MessagesPerPage', $aResult['MessagesPerPage']);
|
||||||
|
$aResult['messageReadAuto'] = (int)$oSettings->GetConf('messageReadAuto', $aResult['messageReadAuto']);
|
||||||
$aResult['MessageReadDelay'] = (int)$oSettings->GetConf('MessageReadDelay', $aResult['MessageReadDelay']);
|
$aResult['MessageReadDelay'] = (int)$oSettings->GetConf('MessageReadDelay', $aResult['MessageReadDelay']);
|
||||||
$aResult['MsgDefaultAction'] = (int)$oSettings->GetConf('MsgDefaultAction', $aResult['MsgDefaultAction']);
|
$aResult['MsgDefaultAction'] = (int)$oSettings->GetConf('MsgDefaultAction', $aResult['MsgDefaultAction']);
|
||||||
$aResult['SoundNotification'] = (bool)$oSettings->GetConf('SoundNotification', $aResult['SoundNotification']);
|
$aResult['SoundNotification'] = (bool)$oSettings->GetConf('SoundNotification', $aResult['SoundNotification']);
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,7 @@ trait User
|
||||||
$this->setSettingsFromParams($oSettings, 'UseCheckboxesInList', 'bool');
|
$this->setSettingsFromParams($oSettings, 'UseCheckboxesInList', 'bool');
|
||||||
$this->setSettingsFromParams($oSettings, 'AllowDraftAutosave', 'bool');
|
$this->setSettingsFromParams($oSettings, 'AllowDraftAutosave', 'bool');
|
||||||
$this->setSettingsFromParams($oSettings, 'AutoLogout', 'int');
|
$this->setSettingsFromParams($oSettings, 'AutoLogout', 'int');
|
||||||
|
$this->setSettingsFromParams($oSettings, 'messageReadAuto', 'bool');
|
||||||
$this->setSettingsFromParams($oSettings, 'MessageReadDelay', 'int');
|
$this->setSettingsFromParams($oSettings, 'MessageReadDelay', 'int');
|
||||||
$this->setSettingsFromParams($oSettings, 'MsgDefaultAction', 'int');
|
$this->setSettingsFromParams($oSettings, 'MsgDefaultAction', 'int');
|
||||||
$this->setSettingsFromParams($oSettings, 'showNextMessage', 'bool');
|
$this->setSettingsFromParams($oSettings, 'showNextMessage', 'bool');
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,13 @@
|
||||||
|
|
||||||
<div class="legend" data-i18n="SHORTCUTS_HELP/TAB_MESSAGE_VIEW"></div>
|
<div class="legend" data-i18n="SHORTCUTS_HELP/TAB_MESSAGE_VIEW"></div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="SETTINGS_GENERAL/MARK_MESSAGE_READ_AFTER"></label>
|
<div data-bind="component: {
|
||||||
|
name: 'Checkbox',
|
||||||
|
params: {
|
||||||
|
label: 'SETTINGS_GENERAL/MARK_MESSAGE_READ_AFTER',
|
||||||
|
value: messageReadAuto
|
||||||
|
}
|
||||||
|
}"></div>
|
||||||
<div>
|
<div>
|
||||||
<input type="number" min="0" step="1" class="span1" data-bind="textInput: messageReadDelay">
|
<input type="number" min="0" step="1" class="span1" data-bind="textInput: messageReadDelay">
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue