mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 06:56:29 +03:00
Make Imap.fetch() async
This commit is contained in:
committed by
holger krekel
parent
339c0d3dc7
commit
30dd20dc7b
@@ -430,8 +430,7 @@ impl Imap {
|
||||
});
|
||||
}
|
||||
|
||||
pub fn fetch(&self, context: &Context, watch_folder: &str) -> Result<()> {
|
||||
task::block_on(async move {
|
||||
pub async fn fetch(&self, context: &Context, watch_folder: &str) -> Result<()> {
|
||||
if !context.sql.is_open() {
|
||||
// probably shutdown
|
||||
return Err(Error::InTeardown);
|
||||
@@ -442,7 +441,6 @@ impl Imap {
|
||||
// We fetch until no more new messages are there.
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
fn get_config_last_seen_uid<S: AsRef<str>>(&self, context: &Context, folder: S) -> (u32, u32) {
|
||||
|
||||
Reference in New Issue
Block a user