(pane, patch)
| 1883 | } |
| 1884 | |
| 1885 | function savePaneState(pane, patch) { |
| 1886 | const state = getPaneState(pane); |
| 1887 | Object.assign(state, patch || {}); |
| 1888 | if (patch && Object.prototype.hasOwnProperty.call(patch, 'currentFolder')) { |
| 1889 | const sourceId = state.sourceId || getPaneSourceId(pane); |
| 1890 | persistPaneFolder(pane, state.currentFolder, sourceId); |
| 1891 | } |
| 1892 | if (patch && Object.prototype.hasOwnProperty.call(patch, 'sourceId')) { |
| 1893 | persistPaneSource(pane, state.sourceId || ''); |
| 1894 | } |
| 1895 | } |
| 1896 | |
| 1897 | function syncPaneStateFromGlobals(pane) { |
| 1898 | savePaneState(pane, { |
no test coverage detected