mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-15 20:07:57 +08:00
add account struct for each backend
This commit is contained in:
@@ -7,7 +7,7 @@ use io_imap::{
|
||||
use io_stream::runtimes::std::handle;
|
||||
use pimalaya_toolbox::terminal::printer::{Message, Printer};
|
||||
|
||||
use crate::{config::ImapConfig, imap::mailbox::arg::MailboxNameOptionalFlag, imap::stream};
|
||||
use crate::imap::{account::ImapAccount, mailbox::arg::MailboxNameOptionalFlag, stream};
|
||||
|
||||
/// Move messages to another mailbox.
|
||||
///
|
||||
@@ -33,8 +33,8 @@ pub struct MoveMessageCommand {
|
||||
}
|
||||
|
||||
impl MoveMessageCommand {
|
||||
pub fn exec(self, printer: &mut impl Printer, config: ImapConfig) -> Result<()> {
|
||||
let (context, mut stream) = stream::connect(config)?;
|
||||
pub fn exec(self, printer: &mut impl Printer, account: ImapAccount) -> Result<()> {
|
||||
let (context, mut stream) = stream::connect(account.backend)?;
|
||||
|
||||
let mailbox = self.mailbox.name.try_into()?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user