Always show checking with icon if checks are still running
This commit is contained in:
parent
c40e45e4d7
commit
1ede003de2
2 changed files with 19 additions and 12 deletions
|
@ -24,15 +24,11 @@ impl Render for DiagnosticIndicator {
|
|||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
let diagnostic_indicator = match (self.summary.error_count, self.summary.warning_count) {
|
||||
(0, 0) => h_stack().map(|this| {
|
||||
if !self.in_progress_checks.is_empty() {
|
||||
this.child(IconElement::new(Icon::ArrowCircle).size(IconSize::Small))
|
||||
} else {
|
||||
this.child(
|
||||
IconElement::new(Icon::Check)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Default),
|
||||
)
|
||||
}
|
||||
this.child(
|
||||
IconElement::new(Icon::Check)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Default),
|
||||
)
|
||||
}),
|
||||
(0, warning_count) => h_stack()
|
||||
.gap_1()
|
||||
|
@ -68,8 +64,14 @@ impl Render for DiagnosticIndicator {
|
|||
|
||||
let status = if !self.in_progress_checks.is_empty() {
|
||||
Some(
|
||||
Label::new("Checking…")
|
||||
.size(LabelSize::Small)
|
||||
h_stack()
|
||||
.gap_2()
|
||||
.child(IconElement::new(Icon::ArrowCircle).size(IconSize::Small))
|
||||
.child(
|
||||
Label::new("Checking…")
|
||||
.size(LabelSize::Small)
|
||||
.into_any_element(),
|
||||
)
|
||||
.into_any_element(),
|
||||
)
|
||||
} else if let Some(diagnostic) = &self.current_diagnostic {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue