From 5fd691e01be5ff5df8c02b294e91851b6706b1de Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 20 Oct 2019 18:03:19 +0200 Subject: [PATCH] use boolean for add_archived_link_item --- src/chatlist.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chatlist.rs b/src/chatlist.rs index b23662a01..6af38353c 100644 --- a/src/chatlist.rs +++ b/src/chatlist.rs @@ -86,7 +86,7 @@ impl Chatlist { query: Option<&str>, query_contact_id: Option, ) -> Result { - let mut add_archived_link_item = 0; + let mut add_archived_link_item = false; // select with left join and minimum: // - the inner select must use `hidden` and _not_ `m.hidden` @@ -184,12 +184,12 @@ impl Chatlist { if last_deaddrop_fresh_msg_id > 0 { ids.insert(0, (DC_CHAT_ID_DEADDROP, last_deaddrop_fresh_msg_id)); } - add_archived_link_item = 1; + add_archived_link_item = true; } ids }; - if 0 != add_archived_link_item && dc_get_archived_cnt(context) > 0 { + if add_archived_link_item && dc_get_archived_cnt(context) > 0 { if ids.is_empty() && 0 != listflags & DC_GCL_ADD_ALLDONE_HINT { ids.push((DC_CHAT_ID_ALLDONE_HINT, 0)); }