mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 09:56:35 +03:00
Merge pull request #1657 from deltachat/fix-move-loops-inbox
perform jobs also if inbox_watch disabled
This commit is contained in:
@@ -84,7 +84,11 @@ async fn inbox_loop(ctx: Context, started: Sender<()>, inbox_handlers: ImapConne
|
|||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
jobs_loaded = 0;
|
jobs_loaded = 0;
|
||||||
info = fetch_idle(&ctx, &mut connection, Config::ConfiguredInboxFolder).await;
|
info = if ctx.get_config_bool(Config::InboxWatch).await {
|
||||||
|
fetch_idle(&ctx, &mut connection, Config::ConfiguredInboxFolder).await
|
||||||
|
} else {
|
||||||
|
connection.fake_idle(&ctx, None).await
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,21 +250,16 @@ impl Scheduler {
|
|||||||
let (inbox, inbox_handlers) = ImapConnectionState::new();
|
let (inbox, inbox_handlers) = ImapConnectionState::new();
|
||||||
|
|
||||||
let (inbox_start_send, inbox_start_recv) = channel(1);
|
let (inbox_start_send, inbox_start_recv) = channel(1);
|
||||||
let mut inbox_handle = None;
|
|
||||||
let (mvbox_start_send, mvbox_start_recv) = channel(1);
|
let (mvbox_start_send, mvbox_start_recv) = channel(1);
|
||||||
let mut mvbox_handle = None;
|
let mut mvbox_handle = None;
|
||||||
let (sentbox_start_send, sentbox_start_recv) = channel(1);
|
let (sentbox_start_send, sentbox_start_recv) = channel(1);
|
||||||
let mut sentbox_handle = None;
|
let mut sentbox_handle = None;
|
||||||
let (smtp_start_send, smtp_start_recv) = channel(1);
|
let (smtp_start_send, smtp_start_recv) = channel(1);
|
||||||
|
|
||||||
if ctx.get_config_bool(Config::InboxWatch).await {
|
|
||||||
let ctx1 = ctx.clone();
|
let ctx1 = ctx.clone();
|
||||||
inbox_handle = Some(task::spawn(async move {
|
let inbox_handle = Some(task::spawn(async move {
|
||||||
inbox_loop(ctx1, inbox_start_send, inbox_handlers).await
|
inbox_loop(ctx1, inbox_start_send, inbox_handlers).await
|
||||||
}));
|
}));
|
||||||
} else {
|
|
||||||
inbox_start_send.send(()).await;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ctx.get_config_bool(Config::MvboxWatch).await {
|
if ctx.get_config_bool(Config::MvboxWatch).await {
|
||||||
let ctx1 = ctx.clone();
|
let ctx1 = ctx.clone();
|
||||||
|
|||||||
Reference in New Issue
Block a user