Skip to content

Commit 2ccdb9e

Browse files
authored
Correctly rehydrate variant analyses (#1666)
1 parent 3812e3d commit 2ccdb9e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

extensions/ql-vscode/src/remote-queries/variant-analysis-manager.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,14 @@ export class VariantAnalysisManager extends DisposableObject implements VariantA
6161
// In this case, the variant analysis was deleted from disk, most likely because
6262
// it was purged by another workspace.
6363
this._onVariantAnalysisRemoved.fire(variantAnalysis);
64-
} else if (status === QueryStatus.InProgress) {
65-
// In this case, last time we checked, the query was still in progress.
66-
// We need to setup the monitor to check for completion.
67-
await commands.executeCommand('codeQL.monitorVariantAnalysis', variantAnalysis);
64+
} else {
65+
this.variantAnalyses.set(variantAnalysis.id, variantAnalysis);
66+
await this.getView(variantAnalysis.id)?.updateView(variantAnalysis);
67+
if (status === QueryStatus.InProgress) {
68+
// In this case, last time we checked, the query was still in progress.
69+
// We need to setup the monitor to check for completion.
70+
await commands.executeCommand('codeQL.monitorVariantAnalysis', variantAnalysis);
71+
}
6872
}
6973
}
7074

0 commit comments

Comments
 (0)