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/state.rs | |
| parent | f7b26a911772dab16a49d982002d2bbe58e0956b (diff) | |
feat: badge outdated integration updates
Diffstat (limited to 'src/app/state.rs')
| -rw-r--r-- | src/app/state.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/app/state.rs b/src/app/state.rs index 2b078caf..921a82c9 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -1011,6 +1011,25 @@ impl AppState { self.show_agent_labels_on_pane_borders } + pub(crate) fn integration_updates_available(&self) -> bool { + self.integration_recommendations + .iter() + .any(|item| item.state == crate::integration::IntegrationStatusKind::Outdated) + } + + pub(crate) fn global_menu_attention_badge_visible(&self) -> bool { + self.update_available.is_some() || self.integration_updates_available() + } + + pub(crate) fn global_menu_item_has_badge(&self, item: &str) -> bool { + (item == "update ready" && self.update_available.is_some()) + || (item == "settings" && self.integration_updates_available()) + } + + pub(crate) fn settings_section_has_badge(&self, section: SettingsSection) -> bool { + section == SettingsSection::Integrations && self.integration_updates_available() + } + pub fn focused_pane_requests_mouse_capture(&self) -> bool { self.mode == Mode::Terminal && self |
