File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -74,16 +74,7 @@ export class PullRequestsTreeDataProvider extends Disposable implements vscode.T
74
74
75
75
this . _register ( this . _view . onDidChangeVisibility ( e => {
76
76
if ( e . visible ) {
77
- // Clear notifications with a delay of 5 seconds
78
- if ( this . _notificationClearTimeout ) {
79
- clearTimeout ( this . _notificationClearTimeout ) ;
80
- }
81
- this . _notificationClearTimeout = setTimeout ( ( ) => {
82
- _copilotManager . clearNotifications ( ) ;
83
- this . _view . badge = undefined ;
84
- this . _notificationClearTimeout = undefined ;
85
- } , 5000 ) ;
86
-
77
+ this . _clearNotificationsWithDelay ( ) ;
87
78
// Sync with currently active PR when view becomes visible
88
79
const currentPR = PullRequestOverviewPanel . getCurrentPullRequest ( ) ;
89
80
if ( currentPR ) {
@@ -169,6 +160,18 @@ export class PullRequestsTreeDataProvider extends Disposable implements vscode.T
169
160
} ) ) ;
170
161
}
171
162
163
+ private _clearNotificationsWithDelay ( ) {
164
+ if ( this . _notificationClearTimeout ) {
165
+ return ;
166
+ }
167
+ // Clear notifications with a delay of 5 seconds)
168
+ this . _notificationClearTimeout = setTimeout ( ( ) => {
169
+ this . _copilotManager . clearNotifications ( ) ;
170
+ this . _view . badge = undefined ;
171
+ this . _notificationClearTimeout = undefined ;
172
+ } , 5000 ) ;
173
+ }
174
+
172
175
public async expandPullRequest ( pullRequest : PullRequestModel ) {
173
176
if ( this . _children . length === 0 ) {
174
177
await this . getChildren ( ) ;
You can’t perform that action at this time.
0 commit comments