Replace some magic numbers with constants

This commit is contained in:
Alexander Krotov
2019-11-16 13:41:57 +03:00
parent 852b16c972
commit 69e14dcb2d
3 changed files with 7 additions and 7 deletions

View File

@@ -876,7 +876,7 @@ impl Contact {
}
pub fn real_exists_by_id(context: &Context, contact_id: u32) -> bool {
if !context.sql.is_open() || contact_id <= 9 {
if !context.sql.is_open() || contact_id <= DC_CONTACT_ID_LAST_SPECIAL {
return false;
}
@@ -923,7 +923,7 @@ pub fn addr_normalize(addr: &str) -> &str {
}
fn set_block_contact(context: &Context, contact_id: u32, new_blocking: bool) {
if contact_id <= 9 {
if contact_id <= DC_CONTACT_ID_LAST_SPECIAL {
return;
}