fix: reconcile stale detection streams
This commit is contained in:
@@ -176,7 +176,12 @@ func (m Model) Update(message tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
if progress.closed {
|
||||
// A stale Application generation closes without claiming an
|
||||
// authoritative completion snapshot.
|
||||
// authoritative completion snapshot. Reconcile with the Application
|
||||
// so this Model does not strand rows in its superseded Checking frame.
|
||||
formerCatalog := newTargetCatalog(m.snapshot, m.showUnavailable, m.selectedTargetID)
|
||||
formerIndex := formerCatalog.index(m.selectedTargetID)
|
||||
m.snapshot = m.application.Snapshot()
|
||||
m.selectedTargetID = newTargetCatalog(m.snapshot, m.showUnavailable, m.selectedTargetID).retain(m.selectedTargetID, formerIndex)
|
||||
m.refreshing = false
|
||||
m.detectionUpdates = nil
|
||||
return m, m.deferredQuit()
|
||||
|
||||
Reference in New Issue
Block a user