Skip to content

Commit 42be9f0

Browse files
authored
Only fire review threads change event if they've actually changed (#7833)
Part of #7816
1 parent 6f13d88 commit 42be9f0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/github/pullRequestModel.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,11 +1164,13 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
11641164
}
11651165
});
11661166

1167-
this._onDidChangeReviewThreads.fire({
1168-
added,
1169-
changed,
1170-
removed,
1171-
});
1167+
if (added.length > 0 || changed.length > 0 || removed.length > 0) {
1168+
this._onDidChangeReviewThreads.fire({
1169+
added,
1170+
changed,
1171+
removed,
1172+
});
1173+
}
11721174
}
11731175

11741176
async initializeReviewThreadCacheAndReviewComments(): Promise<void> {

0 commit comments

Comments
 (0)