mirror of
https://git.meli.delivery/meli/meli
synced 2024-11-10 19:10:57 +00:00
conf/accounts.rs: use mailbox alias if available in MailboxEntry::name()
This commit is contained in:
parent
7744ef1462
commit
989cfcc877
@ -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,
|
||||
|
@ -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…
Reference in New Issue
Block a user