mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
imap: simplify select_folder() interface
Accept AsRef<str> instead of Option<impl AsRef<str>>. There is no need to pass None to force expunge anymore.
This commit is contained in:
committed by
link2xt
parent
c41a6b87b8
commit
e8763e936d
@@ -173,14 +173,15 @@ impl JobThread {
|
||||
if !self.imap.can_idle() {
|
||||
true // we have to do fake_idle
|
||||
} else {
|
||||
let watch_folder = self.get_watch_folder(context);
|
||||
info!(context, "{} started...", prefix);
|
||||
let res = self.imap.idle(context, watch_folder);
|
||||
info!(context, "{} ended...", prefix);
|
||||
if let Err(err) = res {
|
||||
warn!(context, "{} failed: {} -> reconnecting", prefix, err);
|
||||
// something is borked, let's start afresh on the next occassion
|
||||
self.imap.disconnect(context);
|
||||
if let Some(watch_folder) = self.get_watch_folder(context) {
|
||||
info!(context, "{} started...", prefix);
|
||||
let res = self.imap.idle(context, watch_folder);
|
||||
info!(context, "{} ended...", prefix);
|
||||
if let Err(err) = res {
|
||||
warn!(context, "{} failed: {} -> reconnecting", prefix, err);
|
||||
// something is Label { Label }orked, let's start afresh on the next occassion
|
||||
self.imap.disconnect(context);
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user