mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-16 20:57:53 +08:00
fix missing notmuch backend features, improve docs
This commit is contained in:
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::message::copy::imap::CopyImapMessages;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::copy::maildir::CopyMaildirMessages;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::copy::notmuch::CopyNotmuchMessages;
|
||||
use log::info;
|
||||
|
||||
#[cfg(feature = "account-sync")]
|
||||
@@ -79,6 +81,12 @@ impl MessageCopyCommand {
|
||||
.map(CopyMaildirMessages::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_copy_messages(|ctx| {
|
||||
ctx.notmuch.as_ref().map(CopyNotmuchMessages::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::{flag::add::imap::AddImapFlags, message::move_::imap::MoveImapMessages};
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::{flag::add::maildir::AddMaildirFlags, message::move_::maildir::MoveMaildirMessages};
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::{flag::add::notmuch::AddNotmuchFlags, message::move_::notmuch::MoveNotmuchMessages};
|
||||
use log::info;
|
||||
|
||||
#[cfg(feature = "account-sync")]
|
||||
@@ -88,6 +90,14 @@ impl MessageDeleteCommand {
|
||||
.map(AddMaildirFlags::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_move_messages(|ctx| {
|
||||
ctx.notmuch.as_ref().map(MoveNotmuchMessages::new_boxed)
|
||||
});
|
||||
builder
|
||||
.set_add_flags(|ctx| ctx.notmuch.as_ref().map(AddNotmuchFlags::new_boxed));
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
@@ -93,6 +95,12 @@ impl MessageForwardCommand {
|
||||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
@@ -90,6 +92,12 @@ impl MessageMailtoCommand {
|
||||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::message::move_::imap::MoveImapMessages;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::move_::maildir::MoveMaildirMessages;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::move_::notmuch::MoveNotmuchMessages;
|
||||
use log::info;
|
||||
|
||||
#[cfg(feature = "account-sync")]
|
||||
@@ -79,6 +81,12 @@ impl MessageMoveCommand {
|
||||
.map(MoveMaildirMessages::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_move_messages(|ctx| {
|
||||
ctx.notmuch.as_ref().map(MoveNotmuchMessages::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::message::{get::imap::GetImapMessages, peek::imap::PeekImapMessages};
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::{flag::add::maildir::AddMaildirFlags, message::peek::maildir::PeekMaildirMessages};
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::{flag::add::notmuch::AddNotmuchFlags, message::peek::notmuch::PeekNotmuchMessages};
|
||||
use log::info;
|
||||
use mml::message::FilterParts;
|
||||
|
||||
@@ -133,6 +135,14 @@ impl MessageReadCommand {
|
||||
.map(AddMaildirFlags::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_peek_messages(|ctx| {
|
||||
ctx.notmuch.as_ref().map(PeekNotmuchMessages::new_boxed)
|
||||
});
|
||||
builder
|
||||
.set_add_flags(|ctx| ctx.notmuch.as_ref().map(AddNotmuchFlags::new_boxed));
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
@@ -95,6 +97,12 @@ impl MessageReplyCommand {
|
||||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
use log::info;
|
||||
use std::io::{self, BufRead, IsTerminal};
|
||||
|
||||
@@ -75,6 +77,12 @@ impl MessageSaveCommand {
|
||||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
@@ -84,6 +86,12 @@ impl MessageSendCommand {
|
||||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
match send_message_kind {
|
||||
|
||||
@@ -4,6 +4,8 @@ use clap::Parser;
|
||||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
@@ -84,6 +86,12 @@ impl MessageWriteCommand {
|
||||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user