diff --git a/Cargo.lock b/Cargo.lock index da98cf0..70af8ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1216,9 +1216,9 @@ dependencies = [ [[package]] name = "email-lib" -version = "0.18.3" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f52a4d9fbc807cc601e6cbc00e5e5cc40d8f6e3f0601ccdca568ec236019cb" +checksum = "3866f59bba6a9bf58a3ee573c0dd111401b9012f3438c912e1fb2563bbc2eae9" dependencies = [ "advisory-lock", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index ec939c4..2d7adf6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ clap_mangen = "0.2" console = "0.15.2" dialoguer = "0.10.2" dirs = "4.0" -email-lib = { version = "=0.18.3", default-features = false } +email-lib = { version = "=0.18.4", default-features = false } email_address = "0.2.4" env_logger = "0.8" erased-serde = "0.3" diff --git a/src/email/message/command/reply.rs b/src/email/message/command/reply.rs index 03437cc..d7aa73e 100644 --- a/src/email/message/command/reply.rs +++ b/src/email/message/command/reply.rs @@ -70,6 +70,8 @@ impl MessageReplyCommand { .build() .await?; editor::edit_tpl_with_editor(&account_config, printer, &backend, tpl).await?; + + // TODO: let backend.send_reply_raw_message adding the flag backend.add_flag(&folder, &[id], Flag::Answered).await } } diff --git a/src/ui/editor.rs b/src/ui/editor.rs index 5e3d4e2..622a5ce 100644 --- a/src/ui/editor.rs +++ b/src/ui/editor.rs @@ -3,7 +3,7 @@ use email::{ account::config::AccountConfig, email::utils::{local_draft_path, remove_local_draft}, flag::{Flag, Flags}, - folder::{DRAFTS, SENT}, + folder::DRAFTS, }; use log::debug; use mml::MmlCompilerBuilder; @@ -45,7 +45,7 @@ pub async fn open_with_local_draft() -> Result { } pub async fn edit_tpl_with_editor( - config: &AccountConfig, + #[allow(unused)] config: &AccountConfig, printer: &mut P, backend: &Backend, mut tpl: String, @@ -90,13 +90,6 @@ pub async fn edit_tpl_with_editor( backend.send_raw_message(&email).await?; - if config.should_save_copy_sent_message() { - printer.print_log("Adding email to the Sent folder…")?; - backend - .add_raw_message_with_flag(SENT, &email, Flag::Seen) - .await?; - } - remove_local_draft()?; printer.print("Done!")?; break;