Make production code compile again

This commit is contained in:
Antonio Scandurra
2023-04-17 12:33:33 +02:00
parent bed94455b9
commit 38ab6b123f
22 changed files with 675 additions and 544 deletions
+10 -17
View File
@@ -132,25 +132,18 @@ impl FeedbackEditor {
if answer == Some(0) {
match FeedbackEditor::submit_feedback(&feedback_text, client, specs).await {
Ok(_) => {
cx.update(|cx| {
this.update(cx, |_, cx| {
cx.dispatch_action(workspace::CloseActiveItem);
})
});
}
Ok(_) => this.update(&mut cx, |_, cx| {
cx.dispatch_action(workspace::CloseActiveItem);
}),
Err(error) => {
log::error!("{}", error);
cx.update(|cx| {
this.update(cx, |_, cx| {
cx.prompt(
PromptLevel::Critical,
FEEDBACK_SUBMISSION_ERROR_TEXT,
&["OK"],
);
})
});
this.update(&mut cx, |_, cx| {
cx.prompt(
PromptLevel::Critical,
FEEDBACK_SUBMISSION_ERROR_TEXT,
&["OK"],
);
})
}
}
}