Fix Composer not correctly handling multiple account sender mailboxes
This commit is contained in:
parent
215e594dd5
commit
fc8f0b6f16
1 changed files with 4 additions and 14 deletions
|
|
@ -2005,22 +2005,13 @@ public class ComposerWidget : Gtk.EventBox {
|
|||
}
|
||||
|
||||
private bool add_account_emails_to_from_list(Geary.Account other_account, bool set_active = false) {
|
||||
Geary.RFC822.MailboxAddresses primary_address = new Geary.RFC822.MailboxAddresses.single(
|
||||
other_account.information.primary_mailbox);
|
||||
this.from_multiple.append_text(primary_address.to_full_display());
|
||||
this.from_list.add(new FromAddressMap(other_account, primary_address));
|
||||
if (!set_active && this.from.equal_to(primary_address)) {
|
||||
this.from_multiple.set_active(this.from_list.size - 1);
|
||||
set_active = true;
|
||||
}
|
||||
|
||||
bool is_primary = true;
|
||||
foreach (Geary.RFC822.MailboxAddress alternate_mailbox in
|
||||
foreach (Geary.RFC822.MailboxAddress mailbox in
|
||||
other_account.information.sender_mailboxes) {
|
||||
Geary.RFC822.MailboxAddresses addresses =
|
||||
new Geary.RFC822.MailboxAddresses.single(alternate_mailbox);
|
||||
new Geary.RFC822.MailboxAddresses.single(mailbox);
|
||||
|
||||
string display = primary_address.to_full_display();
|
||||
string display = mailbox.to_full_display();
|
||||
if (!is_primary) {
|
||||
// Displayed in the From dropdown to indicate an
|
||||
// "alternate email address" for an account. The first
|
||||
|
|
@ -2030,9 +2021,8 @@ public class ComposerWidget : Gtk.EventBox {
|
|||
display = _("%1$s via %2$s").printf(
|
||||
display, other_account.information.display_name
|
||||
);
|
||||
} else {
|
||||
is_primary = false;
|
||||
}
|
||||
is_primary = false;
|
||||
|
||||
this.from_multiple.append_text(display);
|
||||
this.from_list.add(new FromAddressMap(other_account, addresses));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue