Skip to content

Commit 7a06976

Browse files
authored
Fix padawan watcher debounce (#7592)
1 parent a819144 commit 7a06976

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/github/copilotPrWatcher.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,10 @@ export class CopilotPRWatcher extends Disposable {
140140
private _initialize() {
141141
this._getStateChanges();
142142
this._pollForChanges();
143+
const updateState = debounce(() => this._getStateChanges(), 50);
143144
this._register(this._reposManager.onDidChangeAnyPullRequests(e => {
144145
if (e.some(pr => COPILOT_ACCOUNTS[pr.model.author.login])) {
145-
debounce(this._getStateChanges, 50);
146+
updateState();
146147
}
147148
}));
148149
this._register(PullRequestOverviewPanel.onVisible(e => this._model.clearNotification(e.remote.owner, e.remote.repositoryName, e.number)));

0 commit comments

Comments
 (0)