| 64 | } |
| 65 | |
| 66 | updateState(state: StateDict) { |
| 67 | if (state) { |
| 68 | const workspacesState = state['workspaces-state']; |
| 69 | if (workspacesState) { |
| 70 | // in old version the workspaces was split in 2 different array |
| 71 | workspacesState.msWorkspaceList = |
| 72 | workspacesState.msWorkspaceList || [ |
| 73 | ...workspacesState.primaryWorkspaceList, |
| 74 | ...workspacesState.externalWorkspaces, |
| 75 | ]; |
| 76 | |
| 77 | workspacesState.msWorkspaceList.map((msWorkspaceState: any) => { |
| 78 | msWorkspaceState.layoutKey = |
| 79 | msWorkspaceState.layoutKey || |
| 80 | msWorkspaceState.tilingLayout; |
| 81 | delete msWorkspaceState.tilingLayout; |
| 82 | return msWorkspaceState; |
| 83 | }); |
| 84 | } |
| 85 | } |
| 86 | return state; |
| 87 | } |
| 88 | |
| 89 | saveRegistry() { |
| 90 | const json = JSON.stringify(this.state); |