mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 17:36:30 +03:00
fix: do not resync IMAP after initial configuration
If there was no previous `configured_addr`, then there is no need to run IMAP resync.
This commit is contained in:
@@ -462,9 +462,12 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
||||
|
||||
progress!(ctx, 910);
|
||||
|
||||
if ctx.get_config(Config::ConfiguredAddr).await?.as_deref() != Some(¶m.addr) {
|
||||
// Switched account, all server UIDs we know are invalid
|
||||
job::schedule_resync(ctx).await?;
|
||||
if let Some(configured_addr) = ctx.get_config(Config::ConfiguredAddr).await? {
|
||||
if configured_addr != param.addr {
|
||||
// Switched account, all server UIDs we know are invalid
|
||||
info!(ctx, "Scheduling resync because the address has changed.");
|
||||
job::schedule_resync(ctx).await?;
|
||||
}
|
||||
}
|
||||
|
||||
// the trailing underscore is correct
|
||||
|
||||
Reference in New Issue
Block a user