| 1 | package main |
| 2 | |
| 3 | import "reasonix/internal/sessioninbox" |
| 4 | |
| 5 | // InboxChanged forwards Store revision notifications through the tab's |
| 6 | // ordered, non-blocking runtime emitter. A late callback from an old session is |
| 7 | // harmless because sessionPath lets the frontend reject the stale scope. |
| 8 | func (s *tabEventSink) InboxChanged(snap sessioninbox.InboxSnapshot) { |
| 9 | if s == nil { |
| 10 | return |
| 11 | } |
| 12 | tabID, _ := s.binding() |
| 13 | s.emitRuntimeEvent("InboxChanged", inboxChangedView{ |
| 14 | TabID: tabID, |
| 15 | SessionPath: snap.SessionPath, |
| 16 | Revision: snap.Revision, |
| 17 | }) |
| 18 | } |
| 19 |