pub(crate) async fn restore_closed(
state: &AppState,
record: &Value,
main_ws: &str,
skip: &HashSet<String>,
) -> usizeExpand description
A cold start’s closed windows: record’s "state": "closed" entries,
kept closed. An entry whose contents are still here (its workspaceid, not
shown by a window, not main_ws, not waiting to open) is listed as it is;
one whose contents are gone (a new version’s first start, which copied the
record) is rebuilt from the entry, with new ids. No window opens for
either. An entry naming contents in skip (an open window’s in the record
that was restored) is left out. Returns how many are listed.