diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-07 02:51:11 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-07 02:51:11 +0300 |
| commit | d8283881dba06b457d6634bba1fed56e4344c351 (patch) | |
| tree | 1f3bd24039e2bc75c09b4aa12b8a4f039d79c756 /src/app | |
| parent | 5e05460816bbcea61a111bfa57be9907116e8ffc (diff) | |
fix: animate all-workspaces agent panel spinners
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/mod.rs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/app/mod.rs b/src/app/mod.rs index 2c5d3855..870a485b 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -640,7 +640,7 @@ impl App { } fn sync_animation_timer(&mut self, now: Instant) { - if self.active_workspace_has_animation() { + if self.agent_panel_has_animation() { self.next_animation_tick .get_or_insert(now + ANIMATION_INTERVAL); } else { @@ -648,11 +648,19 @@ impl App { } } - fn active_workspace_has_animation(&self) -> bool { - self.state - .active - .and_then(|idx| self.state.workspaces.get(idx)) - .is_some_and(Workspace::has_working_pane) + fn agent_panel_has_animation(&self) -> bool { + match self.state.agent_panel_scope { + crate::app::state::AgentPanelScope::CurrentWorkspace => self + .state + .active + .and_then(|idx| self.state.workspaces.get(idx)) + .is_some_and(Workspace::has_working_pane), + crate::app::state::AgentPanelScope::AllWorkspaces => self + .state + .workspaces + .iter() + .any(Workspace::has_working_pane), + } } fn can_render_now(&self, now: Instant) -> bool { |
