mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
fix repl tool
This commit is contained in:
@@ -525,18 +525,17 @@ pub fn dc_cmdline(context: &Context, line: &str) -> Result<(), failure::Error> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
let lot = chatlist.get_summary(context, i, Some(&chat));
|
let lot = chatlist.get_summary(context, i, Some(&chat));
|
||||||
let statestr =
|
let statestr = if chat.visibility == ChatVisibility::Archived {
|
||||||
if chat.get_id().get_visibility(context) == ChatVisibility::Archived {
|
" [Archived]"
|
||||||
" [Archived]"
|
} else {
|
||||||
} else {
|
match lot.get_state() {
|
||||||
match lot.get_state() {
|
LotState::MsgOutPending => " o",
|
||||||
LotState::MsgOutPending => " o",
|
LotState::MsgOutDelivered => " √",
|
||||||
LotState::MsgOutDelivered => " √",
|
LotState::MsgOutMdnRcvd => " √√",
|
||||||
LotState::MsgOutMdnRcvd => " √√",
|
LotState::MsgOutFailed => " !!",
|
||||||
LotState::MsgOutFailed => " !!",
|
_ => "",
|
||||||
_ => "",
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
let timestr = dc_timestamp_to_str(lot.get_timestamp());
|
let timestr = dc_timestamp_to_str(lot.get_timestamp());
|
||||||
let text1 = lot.get_text1();
|
let text1 = lot.get_text1();
|
||||||
let text2 = lot.get_text2();
|
let text2 = lot.get_text2();
|
||||||
@@ -985,7 +984,10 @@ pub fn dc_cmdline(context: &Context, line: &str) -> Result<(), failure::Error> {
|
|||||||
}
|
}
|
||||||
"setqr" => {
|
"setqr" => {
|
||||||
ensure!(!arg1.is_empty(), "Argument <qr-content> missing.");
|
ensure!(!arg1.is_empty(), "Argument <qr-content> missing.");
|
||||||
set_config_from_qr(context, arg1);
|
match set_config_from_qr(context, arg1) {
|
||||||
|
Ok(()) => println!("Config set from QR code, you can now call 'configure'"),
|
||||||
|
Err(err) => println!("Cannot set config from QR code: {:?}", err),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"providerinfo" => {
|
"providerinfo" => {
|
||||||
ensure!(!arg1.is_empty(), "Argument <addr> missing.");
|
ensure!(!arg1.is_empty(), "Argument <addr> missing.");
|
||||||
|
|||||||
Reference in New Issue
Block a user