chatlist: resultify get_msg_id, get_summary and get_summary2

Avoid using MsgId::new(0) in place of `None` in the Rust part.
Zero ID is only used in FFI part now.
This commit is contained in:
link2xt
2021-06-26 16:12:28 +03:00
parent ad266fe82f
commit 8ce9a78d6c
8 changed files with 74 additions and 61 deletions

View File

@@ -551,7 +551,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
},
if chat.is_protected() { "🛡️" } else { "" },
);
let lot = chatlist.get_summary(&context, i, Some(&chat)).await;
let lot = chatlist.get_summary(&context, i, Some(&chat)).await?;
let statestr = if chat.visibility == ChatVisibility::Archived {
" [Archived]"
} else {