Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
grzpab committed Dec 7, 2023
1 parent cc0a7f1 commit b2e0077
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 1 addition & 3 deletions intuita-webview/src/main/CodemodRuns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ export const CodemodRuns = (
<SectionHeader
title={'Results'}
commands={commands}
collapsed={
props.clearingInProgress || props.resultsCollapsed
}
collapsed={props.resultsCollapsed}
onClick={(event) => {
event.preventDefault();

Expand Down
1 change: 1 addition & 0 deletions src/data/slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ const rootSlice = createSlice({
state.focusedExplorerNodes = {};
},
onStateCleared(state) {
console.log('HERE');
state.clearingInProgress = false;
},
setCodemods(state, action: PayloadAction<ReadonlyArray<CodemodEntry>>) {
Expand Down
19 changes: 12 additions & 7 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,15 +879,20 @@ export async function activate(context: vscode.ExtensionContext) {
casesDirectoryUri,
);

const directoryNames = files.filter(
([, fileType]) => fileType === vscode.FileType.Directory,
);
const caseDirectoryUris = files
.filter(
([, fileType]) => fileType === vscode.FileType.Directory,
)
.map(([name]) => vscode.Uri.joinPath(casesDirectoryUri, name));

await fileService.deleteDirectories({ uris: caseDirectoryUris });

messageBus.publish({
kind: MessageKind.deleteDirectories,
uris: [],
});
store.dispatch(actions.onStateCleared());
}),
);

context.subscriptions.push(
vscode.commands.registerCommand('intuita.stopStateClearing', () => {
store.dispatch(actions.onStateCleared());
}),
);
Expand Down

0 comments on commit b2e0077

Please sign in to comment.