mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
renamed sync feature to account-sync, put wizard stuff under feature
This commit is contained in:
@@ -6,9 +6,9 @@ use email::folder::add::imap::AddFolderImap;
|
||||
use email::folder::add::maildir::AddFolderMaildir;
|
||||
use log::info;
|
||||
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "sync"))]
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "account-sync"))]
|
||||
use crate::backend::BackendKind;
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
use crate::cache::arg::disable::CacheDisableFlag;
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::TomlConfig,
|
||||
@@ -24,7 +24,7 @@ pub struct AddFolderCommand {
|
||||
#[command(flatten)]
|
||||
pub folder: FolderNameArg,
|
||||
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
#[command(flatten)]
|
||||
pub cache: CacheDisableFlag,
|
||||
|
||||
@@ -39,7 +39,7 @@ impl AddFolderCommand {
|
||||
let folder = &self.folder.name;
|
||||
let (toml_account_config, account_config) = config.clone().into_account_configs(
|
||||
self.account.name.as_ref().map(String::as_str),
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
self.cache.disable,
|
||||
)?;
|
||||
|
||||
@@ -59,7 +59,7 @@ impl AddFolderCommand {
|
||||
builder
|
||||
.set_add_folder(|ctx| ctx.maildir.as_ref().and_then(AddFolderMaildir::new));
|
||||
}
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
Some(BackendKind::MaildirForSync) => {
|
||||
builder.set_add_folder(|ctx| {
|
||||
ctx.maildir_for_sync
|
||||
|
||||
@@ -8,9 +8,9 @@ use email::folder::delete::maildir::DeleteFolderMaildir;
|
||||
use log::info;
|
||||
use std::process;
|
||||
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "sync"))]
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "account-sync"))]
|
||||
use crate::backend::BackendKind;
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
use crate::cache::arg::disable::CacheDisableFlag;
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::TomlConfig,
|
||||
@@ -26,7 +26,7 @@ pub struct FolderDeleteCommand {
|
||||
#[command(flatten)]
|
||||
pub folder: FolderNameArg,
|
||||
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
#[command(flatten)]
|
||||
pub cache: CacheDisableFlag,
|
||||
|
||||
@@ -52,7 +52,7 @@ impl FolderDeleteCommand {
|
||||
|
||||
let (toml_account_config, account_config) = config.clone().into_account_configs(
|
||||
self.account.name.as_ref().map(String::as_str),
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
self.cache.disable,
|
||||
)?;
|
||||
|
||||
@@ -74,7 +74,7 @@ impl FolderDeleteCommand {
|
||||
ctx.maildir.as_ref().and_then(DeleteFolderMaildir::new)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
Some(BackendKind::MaildirForSync) => {
|
||||
builder.set_delete_folder(|ctx| {
|
||||
ctx.maildir_for_sync
|
||||
|
||||
@@ -6,9 +6,9 @@ use email::folder::expunge::imap::ExpungeFolderImap;
|
||||
use email::folder::expunge::maildir::ExpungeFolderMaildir;
|
||||
use log::info;
|
||||
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "sync"))]
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "account-sync"))]
|
||||
use crate::backend::BackendKind;
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
use crate::cache::arg::disable::CacheDisableFlag;
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::TomlConfig,
|
||||
@@ -25,7 +25,7 @@ pub struct FolderExpungeCommand {
|
||||
#[command(flatten)]
|
||||
pub folder: FolderNameArg,
|
||||
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
#[command(flatten)]
|
||||
pub cache: CacheDisableFlag,
|
||||
|
||||
@@ -40,7 +40,7 @@ impl FolderExpungeCommand {
|
||||
let folder = &self.folder.name;
|
||||
let (toml_account_config, account_config) = config.clone().into_account_configs(
|
||||
self.account.name.as_ref().map(String::as_str),
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
self.cache.disable,
|
||||
)?;
|
||||
|
||||
@@ -63,7 +63,7 @@ impl FolderExpungeCommand {
|
||||
ctx.maildir.as_ref().and_then(ExpungeFolderMaildir::new)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
Some(BackendKind::MaildirForSync) => {
|
||||
builder.set_expunge_folder(|ctx| {
|
||||
ctx.maildir_for_sync
|
||||
|
||||
@@ -6,9 +6,9 @@ use email::folder::list::imap::ListFoldersImap;
|
||||
use email::folder::list::maildir::ListFoldersMaildir;
|
||||
use log::info;
|
||||
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "sync"))]
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "account-sync"))]
|
||||
use crate::backend::BackendKind;
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
use crate::cache::arg::disable::CacheDisableFlag;
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag,
|
||||
@@ -27,7 +27,7 @@ pub struct FolderListCommand {
|
||||
#[command(flatten)]
|
||||
pub table: TableMaxWidthFlag,
|
||||
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
#[command(flatten)]
|
||||
pub cache: CacheDisableFlag,
|
||||
|
||||
@@ -41,7 +41,7 @@ impl FolderListCommand {
|
||||
|
||||
let (toml_account_config, account_config) = config.clone().into_account_configs(
|
||||
self.account.name.as_ref().map(String::as_str),
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
self.cache.disable,
|
||||
)?;
|
||||
|
||||
@@ -63,7 +63,7 @@ impl FolderListCommand {
|
||||
ctx.maildir.as_ref().and_then(ListFoldersMaildir::new)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
Some(BackendKind::MaildirForSync) => {
|
||||
builder.set_list_folders(|ctx| {
|
||||
ctx.maildir_for_sync
|
||||
|
||||
@@ -6,9 +6,9 @@ use email::folder::purge::imap::PurgeFolderImap;
|
||||
use log::info;
|
||||
use std::process;
|
||||
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "sync"))]
|
||||
#[cfg(any(feature = "imap", feature = "maildir", feature = "account-sync"))]
|
||||
use crate::backend::BackendKind;
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
use crate::cache::arg::disable::CacheDisableFlag;
|
||||
use crate::{
|
||||
account::arg::name::AccountNameFlag, backend::Backend, config::TomlConfig,
|
||||
@@ -24,7 +24,7 @@ pub struct FolderPurgeCommand {
|
||||
#[command(flatten)]
|
||||
pub folder: FolderNameArg,
|
||||
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
#[command(flatten)]
|
||||
pub cache: CacheDisableFlag,
|
||||
|
||||
@@ -50,7 +50,7 @@ impl FolderPurgeCommand {
|
||||
|
||||
let (toml_account_config, account_config) = config.clone().into_account_configs(
|
||||
self.account.name.as_ref().map(String::as_str),
|
||||
#[cfg(feature = "sync")]
|
||||
#[cfg(feature = "account-sync")]
|
||||
self.cache.disable,
|
||||
)?;
|
||||
|
||||
@@ -73,7 +73,7 @@ impl FolderPurgeCommand {
|
||||
// ctx.maildir.as_ref().and_then(PurgeFolderMaildir::new)
|
||||
// });
|
||||
// }
|
||||
// #[cfg(feature = "sync")]
|
||||
// #[cfg(feature = "account-sync")]
|
||||
// Some(BackendKind::MaildirForSync) => {
|
||||
// builder.set_purge_folder(|ctx| {
|
||||
// ctx.maildir_for_sync
|
||||
|
||||
Reference in New Issue
Block a user