mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 12:56: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.
|
/// Check if the context is already configured.
|
||||||
pub fn dc_is_configured(context: &Context) -> bool {
|
pub fn dc_is_configured(context: &Context) -> bool {
|
||||||
if context
|
context.sql.get_config_bool(context, "configured")
|
||||||
.sql
|
|
||||||
.get_config_int(context, "configured")
|
|
||||||
.unwrap_or_default()
|
|
||||||
> 0
|
|
||||||
{
|
|
||||||
true
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user