persistedSessionID returns the session-store ID that should be used for tuistate persistence for the given runtime tab ID. If the tab has a pending restore (session not yet lazily loaded), the persisted ID from pendingRestores is returned — this is the original session-store ID that was saved acros
(tabID string)
| 140 | // session-store ID that was saved across restarts. Otherwise the live |
| 141 | // session ID from the app is used. |
| 142 | func (m *appModel) persistedSessionID(tabID string) string { |
| 143 | if persistedID, ok := m.pendingRestores[tabID]; ok { |
| 144 | return persistedID |
| 145 | } |
| 146 | if runner := m.supervisor.GetRunner(tabID); runner != nil { |
| 147 | return runner.App.Session().ID |
| 148 | } |
| 149 | return tabID |
| 150 | } |
| 151 | |
| 152 | // findTabByPersistedID scans all open tabs and returns the runtime tab ID |
| 153 | // whose persisted session-store ID matches the given ID. Returns "" if not found. |
no test coverage detected