mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
prefer get_config_bool() where appropriate
for db input/output, we still use get_config_int() to convert to/from 0/1. also for info() we prefer get_config_int() to show the real value.
This commit is contained in:
committed by
Floris Bruynooghe
parent
8dfd04672f
commit
79b92727cc
@@ -477,8 +477,8 @@ pub unsafe fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context) {
|
||||
}
|
||||
16 => {
|
||||
progress!(context, 900);
|
||||
let flags: libc::c_int = if 0 != context.get_config_int(Config::MvboxWatch)
|
||||
|| 0 != context.get_config_int(Config::MvboxMove)
|
||||
let flags: libc::c_int = if context.get_config_bool(Config::MvboxWatch)
|
||||
|| context.get_config_bool(Config::MvboxMove)
|
||||
{
|
||||
DC_CREATE_MVBOX as i32
|
||||
} else {
|
||||
@@ -602,12 +602,7 @@ pub fn dc_connect_to_configured_imap(context: &Context, imap: &Imap) -> libc::c_
|
||||
|
||||
if imap.is_connected() {
|
||||
ret_connected = 1
|
||||
} else if context
|
||||
.sql
|
||||
.get_raw_config_int(context, "configured")
|
||||
.unwrap_or_default()
|
||||
== 0
|
||||
{
|
||||
} else if !context.sql.get_raw_config_bool(context, "configured") {
|
||||
warn!(context, "Not configured, cannot connect.",);
|
||||
} else {
|
||||
let param = LoginParam::from_database(context, "configured_");
|
||||
|
||||
Reference in New Issue
Block a user