show full chatlist by just entering 'chats' in cmdline

This commit is contained in:
B. Petersen
2019-08-12 01:37:05 +02:00
parent adb67d1910
commit 5554df29fd

View File

@@ -604,7 +604,12 @@ pub unsafe fn dc_cmdline(context: &Context, line: &str) -> Result<(), failure::E
}
"listchats" | "listarchived" | "chats" => {
let listflags = if arg0 == "listarchived" { 0x01 } else { 0 };
let chatlist = Chatlist::try_load(context, listflags, Some(arg1), None)?;
let chatlist = Chatlist::try_load(
context,
listflags,
if arg1.is_empty() { None } else { Some(arg1) },
None,
)?;
let cnt = chatlist.len();
if cnt > 0 {