Use onInstalled event
This commit is contained in:
parent
dfeb7e7549
commit
f961c205a7
5 changed files with 27 additions and 26 deletions
|
@ -5,7 +5,7 @@ export default class VersionController {
|
|||
this.versionUseCase = new VersionUseCase();
|
||||
}
|
||||
|
||||
notifyIfUpdated() {
|
||||
this.versionUseCase.notifyIfUpdated();
|
||||
notify() {
|
||||
this.versionUseCase.notify();
|
||||
}
|
||||
}
|
||||
|
|
13
src/background/controllers/version.js
Normal file
13
src/background/controllers/version.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
import VersionInteractor from '../usecases/version';
|
||||
|
||||
export default class VersionController {
|
||||
constructor() {
|
||||
this.versionInteractor = new VersionInteractor();
|
||||
}
|
||||
|
||||
notifyIfUpdated() {
|
||||
browser.runtime.onInstalled.addListener(() => {
|
||||
return this.versionInteractor.notify();
|
||||
});
|
||||
}
|
||||
}
|
Reference in a new issue