mirror of
https://github.com/chatmail/core.git
synced 2026-05-23 00:36:32 +03:00
fix: log and set imex progress error (#7091)
IMEX_PROGRESS(0) event is fired in case of errors, however, the last error was not set in this case. this is similar to the fix at #4195 and improves the error shown in the dialog for android and iOS; desktop does not show an error dialog at all. <img width="320" alt="IMG_9995" src="https://github.com/user-attachments/assets/7065fc3d-3f30-4691-b1b2-1950564a25e2" /> relates to https://github.com/deltachat/deltachat-android/issues/3533
This commit is contained in:
@@ -250,7 +250,7 @@ impl BackupProvider {
|
|||||||
Err(format_err!("Backup provider dropped"))
|
Err(format_err!("Backup provider dropped"))
|
||||||
}
|
}
|
||||||
).await {
|
).await {
|
||||||
warn!(context, "Error while handling backup connection: {err:#}.");
|
error!(context, "Error while handling backup connection: {err:#}.");
|
||||||
context.emit_event(EventType::ImexProgress(0));
|
context.emit_event(EventType::ImexProgress(0));
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@@ -367,7 +367,8 @@ pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> {
|
|||||||
Err(format_err!("Backup reception cancelled"))
|
Err(format_err!("Backup reception cancelled"))
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
if res.is_err() {
|
if let Err(ref res) = res {
|
||||||
|
error!(context, "{:#}", res);
|
||||||
context.emit_event(EventType::ImexProgress(0));
|
context.emit_event(EventType::ImexProgress(0));
|
||||||
}
|
}
|
||||||
context.free_ongoing().await;
|
context.free_ongoing().await;
|
||||||
|
|||||||
Reference in New Issue
Block a user