File tree Expand file tree Collapse file tree
packages/vscode/src/context/providers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,12 +162,21 @@ export class WebsitesProvider
162162 CONTEXT_CHECKED_URLS_STATE_KEY ,
163163 checked_urls
164164 )
165+ await this . context . globalState . update (
166+ CONTEXT_CHECKED_URLS_STATE_KEY ,
167+ checked_urls
168+ )
165169 }
166170
167171 public load_checked_websites_state ( ) : void {
168- const checked_urls = this . context . workspaceState . get < string [ ] > (
172+ let checked_urls = this . context . workspaceState . get < string [ ] > (
169173 CONTEXT_CHECKED_URLS_STATE_KEY
170174 )
175+ if ( ! checked_urls ) {
176+ checked_urls = this . context . globalState . get < string [ ] > (
177+ CONTEXT_CHECKED_URLS_STATE_KEY
178+ )
179+ }
171180 if ( checked_urls ) {
172181 for ( const url of checked_urls ) {
173182 this . _checked_websites . set ( url , vscode . TreeItemCheckboxState . Checked )
Original file line number Diff line number Diff line change @@ -88,12 +88,21 @@ export class WorkspaceProvider
8888 CONTEXT_CHECKED_PATHS_STATE_KEY ,
8989 checked_paths
9090 )
91+ await this . context . globalState . update (
92+ CONTEXT_CHECKED_PATHS_STATE_KEY ,
93+ checked_paths
94+ )
9195 }
9296
9397 public load_checked_files_state ( ) : void {
94- const persisted_checked_paths = this . context . workspaceState . get < string [ ] > (
98+ let persisted_checked_paths = this . context . workspaceState . get < string [ ] > (
9599 CONTEXT_CHECKED_PATHS_STATE_KEY
96100 )
101+ if ( ! persisted_checked_paths ) {
102+ persisted_checked_paths = this . context . globalState . get < string [ ] > (
103+ CONTEXT_CHECKED_PATHS_STATE_KEY
104+ )
105+ }
97106 if ( persisted_checked_paths && persisted_checked_paths . length > 0 ) {
98107 this . set_checked_files ( persisted_checked_paths )
99108 }
You can’t perform that action at this time.
0 commit comments