improve backend features management for every command

This commit is contained in:
Clément DOUIN
2024-01-03 12:58:44 +01:00
parent a8c6756f56
commit 0352e91e36
29 changed files with 1290 additions and 371 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ impl AccountSyncCommand {
let account_name = account_config.name.as_str();
let backend_builder =
BackendBuilder::new(toml_account_config, account_config.clone(), false).await?;
BackendBuilder::new(toml_account_config, account_config.clone()).await?;
let sync_builder = AccountSyncBuilder::new(backend_builder.into())
.await?
.with_some_folders_strategy(strategy)
+8
View File
@@ -111,6 +111,14 @@ impl TomlAccountConfig {
.or_else(|| self.backend.as_ref())
}
pub fn watch_envelopes_kind(&self) -> Option<&BackendKind> {
self.envelope
.as_ref()
.and_then(|envelope| envelope.watch.as_ref())
.and_then(|watch| watch.backend.as_ref())
.or_else(|| self.backend.as_ref())
}
pub fn add_flags_kind(&self) -> Option<&BackendKind> {
self.flag
.as_ref()