Browse Source

conf/accounts.rs: use mailbox alias if available in MailboxEntry::name()

tags/alpha-0.6.0
Manos Pitsidianakis 7 months ago
parent
commit
989cfcc877
Signed by: epilys GPG Key ID: 73627C2F690DF710
2 changed files with 8 additions and 3 deletions
  1. +3
    -2
      src/components/mail/listing.rs
  2. +5
    -1
      src/conf/accounts.rs

+ 3
- 2
src/components/mail/listing.rs View File

@ -1165,7 +1165,8 @@ impl Component for Listing {
match account[&mailbox_hash].status {
MailboxStatus::Available | MailboxStatus::Parsing(_, _) => format!(
"Mailbox: {}, Messages: {}, New: {}",
account[&mailbox_hash].ref_mailbox.name(),
account[&mailbox_hash].name(),
// FIXME
account.collection.get_mailbox(mailbox_hash).len(),
account[&mailbox_hash]
.ref_mailbox
@ -1412,7 +1413,7 @@ impl Listing {
None,
);
let (x, _) = write_string_to_grid(
mailboxes[&mailbox_idx].name(),
context.accounts[a.index].mailbox_entries[&mailbox_idx].name(),
grid,
att.fg,
att.bg,

+ 5
- 1
src/conf/accounts.rs View File

@ -130,7 +130,11 @@ impl MailboxEntry {
}
pub fn name(&self) -> &str {
&self.name
if let Some(name) = self.conf.mailbox_conf.alias.as_ref() {
name
} else {
&self.ref_mailbox.name()
}
}
}

Loading…
Cancel
Save