diff --git a/CHANGELOG.md b/CHANGELOG.md index db8fbe0f..a537eda5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed pre-release archives issue. [#492] - Fixed mailto parsing issue. [core#10] +- Fixed `Answered` flag not set when replying to a message. [#508] ## [1.0.0-beta.4] - 2024-04-16 @@ -897,4 +898,5 @@ Few major concepts changed: [#492]: https://github.com/pimalaya/himalaya/issues/492 [#496]: https://github.com/pimalaya/himalaya/issues/496 +[#508]: https://github.com/pimalaya/himalaya/issues/508 [core#10]: https://github.com/pimalaya/core/issues/10 diff --git a/src/email/message/command/reply.rs b/src/email/message/command/reply.rs index 7bc1d2df..4dd1b2cd 100644 --- a/src/email/message/command/reply.rs +++ b/src/email/message/command/reply.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use clap::Parser; use color_eyre::{eyre::eyre, Result}; -use email::{backend::feature::BackendFeatureSource, config::Config}; +use email::{backend::feature::BackendFeatureSource, config::Config, flag::Flag}; use pimalaya_tui::{ himalaya::{backend::BackendBuilder, editor}, terminal::{cli::printer::Printer, config::TomlConfig as _}, @@ -82,6 +82,11 @@ impl MessageReplyCommand { .with_reply_all(self.reply.all) .build() .await?; - editor::edit_tpl_with_editor(account_config, printer, &backend, tpl).await + + editor::edit_tpl_with_editor(account_config, printer, &backend, tpl).await?; + + backend.add_flag(folder, &[id], Flag::Answered).await?; + + Ok(()) } }