Skip to content

Commit

Permalink
Fix updating BCC field when switching identities
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Dec 6, 2014
1 parent 8dbd4d8 commit 4ca9c86
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions imp/js/compose.js
Expand Up @@ -26,6 +26,7 @@ var ImpCompose = {
// last_identity,
// onload_show,
// old_action,
// old_bcc,
// old_identity,
// rte_sig,
// sc_submit,
Expand Down Expand Up @@ -144,11 +145,17 @@ var ImpCompose = {
label: 'sent_mail_label'
}
});

if (this.old_bcc) {
this.ac.get('bcc').removeEntry(this.old_bcc);
}
delete this.old_bcc;

if (identity.bcc) {
$('bcc').setValue(($F('bcc') ? $F('bcc') + ', ' : '') + identity.bcc)
.fire('AutoComplete:reset');
this.toggleCC('bcc');
this.old_bcc = new IMP_Autocompleter_Elt(identity.bcc);
this.updateAddrField('bcc', [ this.old_bcc ]);
}

this.setSaveSentMail(identity.sm_save);
this.setSignature(this.editor_on, identity);
this.last_identity = $F('identity');
Expand Down Expand Up @@ -1496,11 +1503,6 @@ var ImpCompose = {
$('other_options').hide();
}

/* Create sent-mail list. */
if ($('save_sent_mail_mbox')) {
this.changeIdentity();
}

/* Create priority list. */
if (ImpCore.conf.priority) {
this.createPopdown('p', {
Expand Down

0 comments on commit 4ca9c86

Please sign in to comment.