mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 05:07:55 +08:00
fix redundant copy saved
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
+2
-9
@@ -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<String> {
|
||||
}
|
||||
|
||||
pub async fn edit_tpl_with_editor<P: Printer>(
|
||||
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<P: Printer>(
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user