diff options
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 |
