diff --git a/src/configure/mod.rs b/src/configure/mod.rs index 8c52f0573..50297a6fd 100644 --- a/src/configure/mod.rs +++ b/src/configure/mod.rs @@ -354,19 +354,14 @@ pub fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context) { } 16 => { progress!(context, 900); - let flags: libc::c_int = if context.get_config_bool(Config::MvboxWatch) - || context.get_config_bool(Config::MvboxMove) - { - DC_CREATE_MVBOX as i32 - } else { - 0 - }; + let create_mvbox = context.get_config_bool(Config::MvboxWatch) + || context.get_config_bool(Config::MvboxMove); context .inbox_thread .read() .unwrap() .imap - .configure_folders(context, flags); + .configure_folders(context, create_mvbox); true } 17 => { diff --git a/src/constants.rs b/src/constants.rs index 6314ca374..0d51ba00d 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -119,8 +119,6 @@ pub const DC_CONTACT_ID_INFO: u32 = 2; pub const DC_CONTACT_ID_DEVICE: u32 = 5; pub const DC_CONTACT_ID_LAST_SPECIAL: u32 = 9; -pub const DC_CREATE_MVBOX: usize = 1; - // Flags for empty server job pub const DC_EMPTY_MVBOX: u32 = 0x01; diff --git a/src/imap.rs b/src/imap.rs index 3f8e52a8d..1a57b4f50 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -305,7 +305,7 @@ impl Imap { .unwrap_or_default() < 3 { - self.configure_folders(context, 0x1); + self.configure_folders(context, true); } return Ok(()); } @@ -1206,7 +1206,7 @@ impl Imap { }) } - pub fn configure_folders(&self, context: &Context, flags: libc::c_int) { + pub fn configure_folders(&self, context: &Context, create_mvbox: bool) { task::block_on(async move { if !self.is_connected().await { return; @@ -1237,7 +1237,7 @@ impl Imap { .find(|folder| folder.name() == "DeltaChat" || folder.name() == fallback_folder) .map(|n| n.name().to_string()); - if mvbox_folder.is_none() && 0 != (flags as usize & DC_CREATE_MVBOX) { + if mvbox_folder.is_none() && create_mvbox { info!(context, "Creating MVBOX-folder \"DeltaChat\"...",); match session.create("DeltaChat").await { diff --git a/src/job.rs b/src/job.rs index 150e5e923..d6ac6ed6d 100644 --- a/src/job.rs +++ b/src/job.rs @@ -219,7 +219,7 @@ impl Job { .unwrap_or_default() < 3 { - imap_inbox.configure_folders(context, 0x1i32); + imap_inbox.configure_folders(context, true); } let dest_folder = context .sql @@ -346,7 +346,7 @@ impl Job { .unwrap_or_default() < 3 { - imap_inbox.configure_folders(context, 0x1i32); + imap_inbox.configure_folders(context, true); } let dest_folder = context .sql