|
|
@ -268,7 +268,7 @@ impl Component for Composer {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
self.draft.headers_mut().insert(
|
|
|
|
self.draft.headers_mut().insert(
|
|
|
|
"From".into(),
|
|
|
|
"From".into(),
|
|
|
|
get_display_name(context, self.account_cursor),
|
|
|
|
crate::components::mail::get_display_name(context, self.account_cursor),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
self.pager.update_from_str(self.draft.body(), Some(77));
|
|
|
|
self.pager.update_from_str(self.draft.body(), Some(77));
|
|
|
@ -646,15 +646,6 @@ impl Component for Composer {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn get_display_name(context: &Context, idx: usize) -> String {
|
|
|
|
|
|
|
|
let settings = context.accounts[idx].runtime_settings.account();
|
|
|
|
|
|
|
|
if let Some(d) = settings.display_name.as_ref() {
|
|
|
|
|
|
|
|
format!("{} <{}>", d, settings.identity)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
settings.identity.to_string()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub fn send_draft(context: &mut Context, account_cursor: usize, draft: Draft) -> bool {
|
|
|
|
pub fn send_draft(context: &mut Context, account_cursor: usize, draft: Draft) -> bool {
|
|
|
|
use std::io::Write;
|
|
|
|
use std::io::Write;
|
|
|
|
use std::process::{Command, Stdio};
|
|
|
|
use std::process::{Command, Stdio};
|
|
|
|