Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 7a03565

Browse files
committed
Emit a Repository event for global invalidations
1 parent 5370d56 commit 7a03565

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

lib/models/repository-states/state.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ export default class State {
474474
return this.repository.emitter.emit('did-update');
475475
}
476476

477+
didGloballyInvalidate(spec) {
478+
return this.repository.emitter.emit('did-globally-invalidate', spec);
479+
}
480+
477481
// Direct git access
478482
// Non-delegated git operations for internal use within states.
479483

lib/models/repository.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ export default class Repository {
108108
return this.emitter.on('did-update', callback);
109109
}
110110

111+
onDidGloballyInvalidate(callback) {
112+
return this.emitter.on('did-globally-invalidate', callback);
113+
}
114+
111115
onPullError(callback) {
112116
return this.emitter.on('pull-error', callback);
113117
}

0 commit comments

Comments
 (0)