File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
packages/app/src/app/overmind Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,21 @@ export class ModelsHandler {
154154 ) ;
155155 }
156156
157+ public clearComments ( ) {
158+ if ( COMMENTS ) {
159+ Object . values ( this . moduleModels ) . forEach ( moduleModel => {
160+ if ( ! moduleModel . model ) {
161+ return ;
162+ }
163+ moduleModel . comments = [ ] ;
164+ moduleModel . currentCommentDecorations = moduleModel . model . deltaDecorations (
165+ moduleModel . currentCommentDecorations ,
166+ [ ]
167+ ) ;
168+ } ) ;
169+ }
170+ }
171+
157172 public isModuleOpened ( module : Module ) {
158173 const moduleModel = this . getModuleModelByPath ( module . path ) ;
159174 return Boolean ( moduleModel ?. model ) ;
Original file line number Diff line number Diff line change @@ -604,6 +604,10 @@ export class VSCodeEffect {
604604 } ) ;
605605 }
606606
607+ public clearComments ( ) {
608+ this . modelsHandler . clearComments ( ) ;
609+ }
610+
607611 public setCorrections = ( corrections : ModuleCorrection [ ] ) => {
608612 const activeEditor = this . editorApi . getActiveCodeEditor ( ) ;
609613 if ( activeEditor ) {
Original file line number Diff line number Diff line change @@ -431,6 +431,7 @@ export const forkSandbox: AsyncAction<{
431431 state . workspace . project . description = forkedSandbox . description || '' ;
432432 state . workspace . project . alias = forkedSandbox . alias || '' ;
433433
434+ effects . vscode . clearComments ( ) ;
434435 Object . assign ( state . editor . sandboxes [ currentSandboxId ] ! , forkedSandbox ) ;
435436 state . editor . modulesByPath = effects . vscode . sandboxFsSync . create (
436437 forkedSandbox
You can’t perform that action at this time.
0 commit comments