fix(mail(js)): use different email separator keys depending on locale

Fixes #3513
Fixes #4042
Fixes #5308
Fixes #5309
This commit is contained in:
Francis Lachapelle
2022-04-27 15:38:51 -04:00
parent a5b85d72bc
commit c2eed7844a
4 changed files with 32 additions and 26 deletions
@@ -6,8 +6,8 @@
/**
* @ngInject
*/
MessageEditorController.$inject = ['$scope', '$window', '$stateParams', '$mdConstant', '$mdUtil', '$mdDialog', '$mdToast', 'FileUploader', 'stateParent', 'stateAccount', 'stateMessage', 'onCompletePromise', 'encodeUriFilter', '$timeout', 'sgConstant', 'sgFocus', 'Dialog', 'AddressBook', 'Card', 'Preferences'];
function MessageEditorController($scope, $window, $stateParams, $mdConstant, $mdUtil, $mdDialog, $mdToast, FileUploader, stateParent, stateAccount, stateMessage, onCompletePromise, encodeUriFilter, $timeout, sgConstant, focus, Dialog, AddressBook, Card, Preferences) {
MessageEditorController.$inject = ['$scope', '$window', '$stateParams', '$mdUtil', '$mdDialog', '$mdToast', 'FileUploader', 'stateParent', 'stateAccount', 'stateMessage', 'onCompletePromise', 'encodeUriFilter', '$timeout', 'sgConstant', 'sgFocus', 'Dialog', 'AddressBook', 'Card', 'Preferences'];
function MessageEditorController($scope, $window, $stateParams, $mdUtil, $mdDialog, $mdToast, FileUploader, stateParent, stateAccount, stateMessage, onCompletePromise, encodeUriFilter, $timeout, sgConstant, focus, Dialog, AddressBook, Card, Preferences) {
var vm = this;
this.$onInit = function() {
@@ -24,12 +24,7 @@
this.fromIdentity = stateMessage.editable.from;
this.identitySearchText = '';
this.message = stateMessage;
this.recipientSeparatorKeys = [
$mdConstant.KEY_CODE.ENTER,
$mdConstant.KEY_CODE.TAB,
$mdConstant.KEY_CODE.COMMA,
$mdConstant.KEY_CODE.SEMICOLON
];
this.recipientSeparatorKeys = Preferences.defaults.emailSeparatorKeys;
this.sendState = false;
this.toggleFullscreen = toggleFullscreen;
this.firstFocus = true;