Set data2 in ConfigureProgress event

For now it is only set on error, but could contain user-readable log
messages in the future.
This commit is contained in:
Alexander Krotov
2020-09-12 16:23:12 +03:00
committed by link2xt
parent cdba74a027
commit f5b16cf086
6 changed files with 45 additions and 17 deletions

View File

@@ -80,11 +80,21 @@ fn receive_event(event: EventType) {
yellow.paint(format!("Received LOCATION_CHANGED(contact={:?})", contact))
);
}
EventType::ConfigureProgress(progress) => {
info!(
"{}",
yellow.paint(format!("Received CONFIGURE_PROGRESS({} ‰)", progress))
);
EventType::ConfigureProgress { progress, comment } => {
if let Some(comment) = comment {
info!(
"{}",
yellow.paint(format!(
"Received CONFIGURE_PROGRESS({} ‰, {})",
progress, comment
))
);
} else {
info!(
"{}",
yellow.paint(format!("Received CONFIGURE_PROGRESS({} ‰)", progress))
);
}
}
EventType::ImexProgress(progress) => {
info!(