diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-09 21:57:26 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-09 21:57:26 +0300 |
| commit | 819a71ea7a939e45234648c6ee09aa3bcaa6ff77 (patch) | |
| tree | 49013b4736d9569a4e7c4e3ae2fa3c95cdad0299 /src/app/api.rs | |
| parent | d984ab2a3cb4b24788e24b3aaba24adea38b510f (diff) | |
fix: refresh git status off the main loop
fixes #85
Diffstat (limited to 'src/app/api.rs')
| -rw-r--r-- | src/app/api.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/app/api.rs b/src/app/api.rs index ab8058cf..bda7fc16 100644 --- a/src/app/api.rs +++ b/src/app/api.rs @@ -1,3 +1,4 @@ +use std::sync::atomic::Ordering; use std::time::{Duration, Instant}; use super::{ @@ -16,6 +17,16 @@ impl App { return; } + if let AppEvent::GitStatusRefreshed { results } = ev { + self.git_refresh_in_flight = false; + self.last_git_remote_status_refresh = Instant::now(); + if self.state.apply_workspace_git_statuses(results) { + self.render_dirty.store(true, Ordering::Release); + self.render_notify.notify_one(); + } + return; + } + let overlay_state = if let AppEvent::PaneDied { pane_id } = &ev { self.overlay_panes.remove(pane_id) } else { |
