mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 13:36:30 +03:00
Use sql.get_config_bool to simplify dc_is_configured
This commit is contained in:
@@ -46,16 +46,7 @@ pub unsafe fn configure(context: &Context) {
|
||||
|
||||
/// Check if the context is already configured.
|
||||
pub fn dc_is_configured(context: &Context) -> bool {
|
||||
if context
|
||||
.sql
|
||||
.get_config_int(context, "configured")
|
||||
.unwrap_or_default()
|
||||
> 0
|
||||
{
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
context.sql.get_config_bool(context, "configured")
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user