activity indicator: Reset formatting failure on click (#20029)

Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-10-31 14:33:36 +01:00 committed by GitHub
parent 293e080f03
commit 5b6401519b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 1 deletions

View file

@ -352,7 +352,10 @@ impl ActivityIndicator {
.into_any_element(),
),
message: format!("Formatting failed: {}. Click to see logs.", failure),
on_click: Some(Arc::new(|_, cx| {
on_click: Some(Arc::new(|indicator, cx| {
indicator.project.update(cx, |project, cx| {
project.reset_last_formatting_failure(cx);
});
cx.dispatch_action(Box::new(workspace::OpenLog));
})),
});