mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
cargo fmt
This commit is contained in:
committed by
holger krekel
parent
30dd20dc7b
commit
7fa94c33bf
@@ -431,16 +431,16 @@ impl Imap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn fetch(&self, context: &Context, watch_folder: &str) -> Result<()> {
|
pub async fn fetch(&self, context: &Context, watch_folder: &str) -> Result<()> {
|
||||||
if !context.sql.is_open() {
|
if !context.sql.is_open() {
|
||||||
// probably shutdown
|
// probably shutdown
|
||||||
return Err(Error::InTeardown);
|
return Err(Error::InTeardown);
|
||||||
}
|
}
|
||||||
self.setup_handle_if_needed(context).await?;
|
self.setup_handle_if_needed(context).await?;
|
||||||
|
|
||||||
while self.fetch_new_messages(context, &watch_folder).await? {
|
while self.fetch_new_messages(context, &watch_folder).await? {
|
||||||
// We fetch until no more new messages are there.
|
// We fetch until no more new messages are there.
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_config_last_seen_uid<S: AsRef<str>>(&self, context: &Context, folder: S) -> (u32, u32) {
|
fn get_config_last_seen_uid<S: AsRef<str>>(&self, context: &Context, folder: S) -> (u32, u32) {
|
||||||
|
|||||||
30
src/job.rs
30
src/job.rs
@@ -401,11 +401,11 @@ pub fn perform_inbox_fetch(context: &Context) {
|
|||||||
let use_network = context.get_config_bool(Config::InboxWatch);
|
let use_network = context.get_config_bool(Config::InboxWatch);
|
||||||
|
|
||||||
task::block_on(
|
task::block_on(
|
||||||
context
|
context
|
||||||
.inbox_thread
|
.inbox_thread
|
||||||
.write()
|
.write()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.fetch(context, use_network),
|
.fetch(context, use_network),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,11 +413,11 @@ pub fn perform_mvbox_fetch(context: &Context) {
|
|||||||
let use_network = context.get_config_bool(Config::MvboxWatch);
|
let use_network = context.get_config_bool(Config::MvboxWatch);
|
||||||
|
|
||||||
task::block_on(
|
task::block_on(
|
||||||
context
|
context
|
||||||
.mvbox_thread
|
.mvbox_thread
|
||||||
.write()
|
.write()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.fetch(context, use_network),
|
.fetch(context, use_network),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,11 +425,11 @@ pub fn perform_sentbox_fetch(context: &Context) {
|
|||||||
let use_network = context.get_config_bool(Config::SentboxWatch);
|
let use_network = context.get_config_bool(Config::SentboxWatch);
|
||||||
|
|
||||||
task::block_on(
|
task::block_on(
|
||||||
context
|
context
|
||||||
.sentbox_thread
|
.sentbox_thread
|
||||||
.write()
|
.write()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.fetch(context, use_network),
|
.fetch(context, use_network),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user