Commit ce2891b
Fix panic and stale mission view on detail dismiss
Two bugs:
1. DismissByID panicked with 'makeslice: cap out of range' when the
session wasn't in the tasklist (empty list → cap of -1). Fixed by
using len(m.sessions) as capacity instead of len-1.
2. Mission view wasn't updated after dismiss because viewMode was set
to ViewModeMission *after* recomputeAndDisplay ran. Since recompute
only pushes data to the active view, mission never got the updated
session list. Fixed by setting viewMode before recompute.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent fd3351f commit ce2891b
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
| 403 | + | |
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | 335 | | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| |||
0 commit comments