MCPcopy Index your code
hub / github.com/material-shell/material-shell / updateState

Method updateState

src/manager/stateManager.ts:66–87  ·  view source on GitHub ↗
(state: StateDict)

Source from the content-addressed store, hash-verified

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);

Callers 1

loadRegistryMethod · 0.95

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected