2018-08-07 15:01:15 +03:00
|
|
|
/*
|
2020-02-04 15:52:12 +02:00
|
|
|
* meli
|
2018-08-07 15:01:15 +03:00
|
|
|
*
|
|
|
|
* Copyright 2017-2018 Manos Pitsidianakis
|
|
|
|
*
|
|
|
|
* This file is part of meli.
|
|
|
|
*
|
|
|
|
* meli is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* meli is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with meli. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-07-20 12:15:06 +03:00
|
|
|
/*! Entities that handle Mail specific functions.
|
2018-07-27 21:37:56 +03:00
|
|
|
*/
|
2018-07-20 12:15:06 +03:00
|
|
|
use super::*;
|
2020-08-17 15:31:30 +03:00
|
|
|
use melib::backends::{AccountHash, Mailbox, MailboxHash};
|
2020-09-09 14:24:30 +03:00
|
|
|
use melib::email::{attachment_types::*, attachments::*};
|
2020-01-18 02:00:39 +02:00
|
|
|
use melib::thread::ThreadNodeHash;
|
2018-07-20 12:15:06 +03:00
|
|
|
|
|
|
|
pub mod listing;
|
2019-06-18 21:13:58 +03:00
|
|
|
pub use crate::listing::*;
|
2018-08-11 18:00:21 +03:00
|
|
|
pub mod view;
|
2019-06-18 21:13:58 +03:00
|
|
|
pub use crate::view::*;
|
2018-08-11 18:00:21 +03:00
|
|
|
mod compose;
|
|
|
|
pub use self::compose::*;
|
2018-07-20 12:15:06 +03:00
|
|
|
|
2020-10-11 00:32:55 +03:00
|
|
|
#[cfg(feature = "gpgme")]
|
2019-09-28 10:46:49 +03:00
|
|
|
pub mod pgp;
|
|
|
|
|
2019-10-26 15:58:56 +03:00
|
|
|
mod status;
|
|
|
|
pub use self::status::*;
|
2019-07-22 15:14:39 +03:00
|
|
|
|
2020-08-17 15:31:30 +03:00
|
|
|
fn get_display_name(context: &Context, account_hash: AccountHash) -> String {
|
|
|
|
let settings = context.accounts[&account_hash].settings.account();
|
2019-07-22 15:14:39 +03:00
|
|
|
if let Some(d) = settings.display_name.as_ref() {
|
|
|
|
format!("{} <{}>", d, settings.identity)
|
|
|
|
} else {
|
|
|
|
settings.identity.to_string()
|
|
|
|
}
|
|
|
|
}
|