mirror of
https://github.com/chatmail/core.git
synced 2026-10-01 18:50:39 +03:00
Make scan_folders work when inbox is not watched (#2446)
When watch_inbox was off, scan_folders failed and a toast "IMAP operation attempted while it is torn down" was shown. -- The problem was: When inbox_watch is off, scan_folders() is called at https://github.com/deltachat/deltachat-core-rust/blob/244260a9789a34c8cdd50c73b96557a8ced40345/src/scheduler.rs#L107 but connect_configured() is not called before. * Add test * Don't only setup handle, but connect_configured() in scan_folders()
This commit is contained in:
@@ -25,7 +25,7 @@ impl Imap {
|
||||
}
|
||||
info!(context, "Starting full folder scan");
|
||||
|
||||
self.setup_handle(context).await?;
|
||||
self.connect_configured(context).await?;
|
||||
let session = self.session.as_mut();
|
||||
let session = session.context("scan_folders(): IMAP No Connection established")?;
|
||||
let folders: Vec<_> = session.list(Some(""), Some("*")).await?.collect().await;
|
||||
|
||||
Reference in New Issue
Block a user