Always ask before discarding composed Mailvelopes

pull/7348/head
Christopher Gurnee 4 years ago
parent 2f71928226
commit a121960b45

@ -72,6 +72,7 @@ RELEASE 1.4.4
- Mailvelope: Fix size of iframe for PGP-inlined mail (#7348)
- Mailvelope: Add config option to use Main Keyring (#7348)
- Mailvelope: Add config option to set the size for new keys (#7348)
- Mailvelope: Always ask before discarding email currently being composed (#7348)
RELEASE 1.4.3
-------------

@ -760,7 +760,8 @@ function rcube_webmail()
// check input before leaving compose step
if (this.task == 'mail' && this.env.action == 'compose' && !this.env.server_error && command != 'save-pref'
&& $.inArray(command, this.env.compose_commands) < 0 && !this.compose_skip_unsavedcheck
&& ($.inArray(command, this.env.compose_commands) < 0 || command.startsWith('compose-encrypted') && ref.mailvelope_editor)
&& !this.compose_skip_unsavedcheck
) {
if (!this.env.is_sent && this.cmp_hash != this.compose_field_hash()) {
this.confirm_dialog(this.get_label('notsentwarning'), 'discard', function() {
@ -3834,7 +3835,6 @@ function rcube_webmail()
// remove Mailvelope editor if active
if (ref.mailvelope_editor) {
ref.mailvelope_editor = null;
ref.compose_skip_unsavedcheck = false;
ref.set_button('compose-encrypted', 'act');
container.removeClass('mailvelope')
@ -3872,7 +3872,6 @@ function rcube_webmail()
mailvelope.createEditorContainer('#' + container.attr('id'), ref.mailvelope_keyring, options).then(function(editor) {
ref.mailvelope_editor = editor;
ref.compose_skip_unsavedcheck = true;
ref.set_button('compose-encrypted', 'sel');
container.addClass('mailvelope');

Loading…
Cancel
Save