Skip to content

Commit 538725c

Browse files
authored
Only fire the PRs changed event when the timeline has actually changed (#7242) (#7247)
Fixes #7235
1 parent 6e6d84d commit 538725c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/github/githubRepository.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,8 +1509,11 @@ export class GitHubRepository extends Disposable {
15091509
const newEvents = timelineEvents.filter(event => (eventTime(event) ?? 0) > oldEventTime);
15101510
allEvents = [...issueModel.timelineEvents, ...newEvents];
15111511
}
1512+
const oldTimeline = issueModel.timelineEvents;
15121513
issueModel.timelineEvents = allEvents;
1513-
this._onDidChangePullRequests.fire();
1514+
if (!oldLastEvent || (allEvents.length !== oldTimeline.length)) {
1515+
this._onDidChangePullRequests.fire();
1516+
}
15141517
}
15151518
return timelineEvents;
15161519
} catch (e) {

0 commit comments

Comments
 (0)