diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-06 17:41:44 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-06 17:42:38 +0300 |
| commit | 4001fd2ec8ff05a982da18744b8cbde9df3ab530 (patch) | |
| tree | f8dbf984cff9a4b025e86481d3f70c89322bd79f /src/app/runtime.rs | |
| parent | 048d8a29195d580014b24ee3fc7e89ac6bdfee8a (diff) | |
feat: improve toast ergonomics
refs #486
Diffstat (limited to 'src/app/runtime.rs')
| -rw-r--r-- | src/app/runtime.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app/runtime.rs b/src/app/runtime.rs index fe971bf5..ca780360 100644 --- a/src/app/runtime.rs +++ b/src/app/runtime.rs @@ -205,6 +205,21 @@ impl App { } if self + .state + .next_pending_agent_notification_deadline() + .is_some_and(|deadline| now >= deadline) + { + let previous_toast = self.state.toast.clone(); + let mut deliveries = self.state.drain_due_agent_notifications(now); + if !deliveries.is_empty() { + self.refresh_agent_notification_delivery_contexts(&mut deliveries); + self.emit_delayed_client_local_agent_notifications(&deliveries); + self.sync_toast_deadline(previous_toast); + changed = true; + } + } + + if self .copy_feedback_deadline .is_some_and(|deadline| now >= deadline) { @@ -509,6 +524,7 @@ impl App { include_resize_poll.then_some(self.next_resize_poll), self.config_diagnostic_deadline, self.toast_deadline, + self.state.next_pending_agent_notification_deadline(), self.copy_feedback_deadline, self.next_animation_tick, include_git_refresh |
