mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-08 18:45:13 +00:00
implement notmuch del_msg
This commit is contained in:
parent
7093cfc715
commit
da0e7889a3
|
@ -141,8 +141,17 @@ impl<'a> Backend<'a> for NotmuchBackend<'a> {
|
||||||
unimplemented!();
|
unimplemented!();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn del_msg(&mut self, _mbox: &str, _id: &str) -> Result<()> {
|
fn del_msg(&mut self, _mbox: &str, id: &str) -> Result<()> {
|
||||||
unimplemented!();
|
let msg_filepath = self
|
||||||
|
.db
|
||||||
|
.find_message(id)
|
||||||
|
.context(format!("cannot find notmuch message {:?}", id))?
|
||||||
|
.ok_or_else(|| anyhow!("cannot find notmuch message {:?}", id))?
|
||||||
|
.filename()
|
||||||
|
.to_owned();
|
||||||
|
self.db
|
||||||
|
.remove_message(msg_filepath)
|
||||||
|
.context(format!("cannot delete notmuch message {:?}", id))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn add_flags(&mut self, _mbox: &str, _id: &str, _flags_str: &str) -> Result<()> {
|
fn add_flags(&mut self, _mbox: &str, _id: &str, _flags_str: &str) -> Result<()> {
|
||||||
|
|
Loading…
Reference in a new issue