diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-20 22:08:04 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-20 22:08:04 +0300 |
| commit | c584037c77c63f6a08f8837f357c89432b8043e7 (patch) | |
| tree | 16647d6628a11dbbf5e576fb86f2a87b507e202e /src/app/input/sidebar.rs | |
| parent | f7b26a911772dab16a49d982002d2bbe58e0956b (diff) | |
feat: badge outdated integration updates
Diffstat (limited to 'src/app/input/sidebar.rs')
| -rw-r--r-- | src/app/input/sidebar.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/app/input/sidebar.rs b/src/app/input/sidebar.rs index 94feaf93..7491c9c1 100644 --- a/src/app/input/sidebar.rs +++ b/src/app/input/sidebar.rs @@ -175,7 +175,7 @@ impl AppState { } let footer = self.sidebar_footer_rect(); - let width = if self.update_available.is_some() { + let width = if self.global_menu_attention_badge_visible() { 8 } else { 6 @@ -203,8 +203,12 @@ impl AppState { let content_width = labels .iter() .map(|label| { - let extra = if *label == "update ready" { 2 } else { 0 }; - label.chars().count() as u16 + extra + let badge_width = if self.global_menu_item_has_badge(label) { + 2 + } else { + 0 + }; + label.chars().count() as u16 + badge_width }) .max() .unwrap_or(8) |
