mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 21:37:55 +08:00
make use of pimalaya_tui::config::TomlConfig
This commit is contained in:
@@ -4,7 +4,7 @@ use email::{backend::feature::BackendFeatureSource, folder::add::AddFolder};
|
||||
use tracing::info;
|
||||
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::TomlConfig,
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::Config,
|
||||
folder::arg::name::FolderNameArg, printer::Printer,
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ pub struct AddFolderCommand {
|
||||
}
|
||||
|
||||
impl AddFolderCommand {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &TomlConfig) -> Result<()> {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &Config) -> Result<()> {
|
||||
info!("executing create folder command");
|
||||
|
||||
let folder = &self.folder.name;
|
||||
|
||||
@@ -7,7 +7,7 @@ use pimalaya_tui::prompt;
|
||||
use tracing::info;
|
||||
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::TomlConfig,
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::Config,
|
||||
folder::arg::name::FolderNameArg, printer::Printer,
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ pub struct FolderDeleteCommand {
|
||||
}
|
||||
|
||||
impl FolderDeleteCommand {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &TomlConfig) -> Result<()> {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &Config) -> Result<()> {
|
||||
info!("executing delete folder command");
|
||||
|
||||
let folder = &self.folder.name;
|
||||
|
||||
@@ -4,7 +4,7 @@ use email::{backend::feature::BackendFeatureSource, folder::expunge::ExpungeFold
|
||||
use tracing::info;
|
||||
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::TomlConfig,
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::Config,
|
||||
folder::arg::name::FolderNameArg, printer::Printer,
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ pub struct FolderExpungeCommand {
|
||||
}
|
||||
|
||||
impl FolderExpungeCommand {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &TomlConfig) -> Result<()> {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &Config) -> Result<()> {
|
||||
info!("executing expunge folder command");
|
||||
|
||||
let folder = &self.folder.name;
|
||||
|
||||
@@ -6,7 +6,7 @@ use tracing::info;
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag,
|
||||
backend::Backend,
|
||||
config::TomlConfig,
|
||||
config::Config,
|
||||
folder::{Folders, FoldersTable},
|
||||
printer::Printer,
|
||||
};
|
||||
@@ -29,7 +29,7 @@ pub struct FolderListCommand {
|
||||
}
|
||||
|
||||
impl FolderListCommand {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &TomlConfig) -> Result<()> {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &Config) -> Result<()> {
|
||||
info!("executing list folders command");
|
||||
|
||||
let (toml_account_config, account_config) = config
|
||||
|
||||
@@ -4,10 +4,10 @@ mod expunge;
|
||||
mod list;
|
||||
mod purge;
|
||||
|
||||
use color_eyre::Result;
|
||||
use clap::Subcommand;
|
||||
use color_eyre::Result;
|
||||
|
||||
use crate::{config::TomlConfig, printer::Printer};
|
||||
use crate::{config::Config, printer::Printer};
|
||||
|
||||
use self::{
|
||||
add::AddFolderCommand, delete::FolderDeleteCommand, expunge::FolderExpungeCommand,
|
||||
@@ -38,7 +38,7 @@ pub enum FolderSubcommand {
|
||||
|
||||
impl FolderSubcommand {
|
||||
#[allow(unused)]
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &TomlConfig) -> Result<()> {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &Config) -> Result<()> {
|
||||
match self {
|
||||
Self::Add(cmd) => cmd.execute(printer, config).await,
|
||||
Self::List(cmd) => cmd.execute(printer, config).await,
|
||||
|
||||
@@ -7,7 +7,7 @@ use pimalaya_tui::prompt;
|
||||
use tracing::info;
|
||||
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::TomlConfig,
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::Config,
|
||||
folder::arg::name::FolderNameArg, printer::Printer,
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ pub struct FolderPurgeCommand {
|
||||
}
|
||||
|
||||
impl FolderPurgeCommand {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &TomlConfig) -> Result<()> {
|
||||
pub async fn execute(self, printer: &mut impl Printer, config: &Config) -> Result<()> {
|
||||
info!("executing purge folder command");
|
||||
|
||||
let folder = &self.folder.name;
|
||||
|
||||
Reference in New Issue
Block a user