Skip to content

Commit

Permalink
Some comments are attached to the file and have
Browse files Browse the repository at this point in the history
not reference/selection in the content. Need to be removed.
  • Loading branch information
schneim committed Mar 12, 2023
1 parent 98af7ff commit 88052a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/view/treeNodes/fileChangeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,16 @@ export class FileChangeNode extends TreeNode implements vscode.TreeItem {

updateShowOptions() {
const reviewThreads = this.pullRequest.reviewThreadsCache;
const reviewThreadsForNode = reviewThreads.filter(thread => !thread.isDeleted && thread.path === this.fileName);
let reviewThreadsForNode = reviewThreads.filter(thread => !thread.isDeleted && thread.path === this.fileName);

DecorationProvider.updateFileComments(
this.resourceUri,
this.pullRequest.getPullRequestId(),
this.fileName,
reviewThreadsForNode.length > 0,
);
/* Some comments are attached to the file and have not reference/selection in the content. Need to be removed here. */
reviewThreadsForNode = reviewThreadsForNode.filter((thread) => thread.line !== undefined);

if (reviewThreadsForNode.length) {
reviewThreadsForNode.sort((a, b) => a.line - b.line);
Expand Down

0 comments on commit 88052a2

Please sign in to comment.