Make allowCtrlEnterOnCompose an account setting (but inactive as never changed)

This commit is contained in:
the-djmaze 2023-02-21 09:18:26 +01:00
parent 618333e257
commit c53d9adaba
3 changed files with 12 additions and 11 deletions

View file

@ -20,7 +20,7 @@ import { folderInformation, messagesDeleteHelper } from 'Common/Folders';
import { serverRequest } from 'Common/Links';
import { i18n, getNotification, getUploadErrorDescByCode, timestampToString } from 'Common/Translator';
import { MessageFlagsCache, setFolderETag } from 'Common/Cache';
import { Settings, SettingsCapa, SettingsGet, elementById, addShortcut, createElement } from 'Common/Globals';
import { SettingsCapa, SettingsGet, elementById, addShortcut, createElement } from 'Common/Globals';
//import { exitFullscreen, isFullscreen, toggleFullscreen } from 'Common/Fullscreen';
import { AppUserStore } from 'Stores/User/App';
@ -1119,12 +1119,12 @@ export class ComposePopupView extends AbstractViewPopup {
return false;
});
if (Settings.app('allowCtrlEnterOnCompose')) {
addShortcut('enter', 'meta', ScopeCompose, () => {
// if (SettingsUserStore.allowCtrlEnterOnCompose()) {
this.sendCommand();
return false;
// }
});
}
addShortcut('mailsend', '', ScopeCompose, () => {
this.sendCommand();
return false;

View file

@ -727,7 +727,6 @@ class Actions
}
$aResult['System'] = \array_merge(
$aResult['System'], array(
'allowCtrlEnterOnCompose' => (bool)$oConfig->Get('labs', 'allow_ctrl_enter_on_compose', false),
'allowAppendMessage' => (bool)$oConfig->Get('labs', 'allow_message_append', false),
'folderSpecLimit' => (int)$oConfig->Get('labs', 'folders_spec_limit', 50),
'listPermanentFiltered' => '' !== \trim($oConfig->Get('imap', 'message_list_permanent_filter', '')),
@ -758,6 +757,11 @@ class Actions
}
}
if ($oConfig->Get('login', 'determine_user_language', true)) {
$sLanguage = $this->ValidateLanguage($UserLanguageRaw, $sLanguage, false);
}
// MainAccount or AdditionalAccount
$oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
if ($oSettingsLocal instanceof Settings) {
$aResult['SentFolder'] = (string)$oSettingsLocal->GetConf('SentFolder', '');
@ -774,10 +778,7 @@ class Actions
$aResult['CheckMailInterval'] = (int)$oSettingsLocal->GetConf('CheckMailInterval', $aResult['CheckMailInterval']);
}
if ($oConfig->Get('login', 'determine_user_language', true)) {
$sLanguage = $this->ValidateLanguage($UserLanguageRaw, $sLanguage, false);
}
// MainAccount
$oSettings = $this->SettingsProvider()->Load($oAccount);
if ($oSettings instanceof Settings) {
if ($oConfig->Get('webmail', 'allow_languages_on_settings', true)) {
@ -796,6 +797,7 @@ class Actions
$aResult['pgpSign'] = (bool) $oSettings->GetConf('pgpSign', false);
$aResult['pgpEncrypt'] = (bool) $oSettings->GetConf('pgpEncrypt', false);
$aResult['allowSpellcheck'] = (bool) $oSettings->GetConf('allowSpellcheck', false);
// $aResult['allowCtrlEnterOnCompose'] = (bool) $oSettings->GetConf('allowCtrlEnterOnCompose', true);
$aResult['ViewHTML'] = (bool)$oSettings->GetConf('ViewHTML', $aResult['ViewHTML']);
$show_images = (bool) $oSettings->GetConf('ShowImages', false);

View file

@ -393,7 +393,6 @@ Enables caching in the system'),
'allow_message_append' => array(false),
'login_fault_delay' => array(5, 'When login fails, wait N seconds before responding'),
'log_ajax_response_write_limit' => array(300),
'allow_ctrl_enter_on_compose' => array(true),
'smtp_show_server_errors' => array(false),
'sieve_auth_plain_initial' => array(true),
'sieve_allow_fileinto_inbox' => array(false),