mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
refactor to use EventEmitter
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
61d97197ec
commit
b909d93a24
7 files changed
+10
-51
No files matched your search
@@ -36,7 +36,7 @@ export class Tracker extends Singleton {
|
||||
this.event(ev.name, ev.action, ev.params)
|
||||
}
|
||||
this.eventHandlers.push(handler)
|
||||
appEventBus.on(handler)
|
||||
appEventBus.addListener(handler)
|
||||
}
|
||||
|
||||
stop() {
|
||||
@@ -45,7 +45,7 @@ export class Tracker extends Singleton {
|
||||
this.started = false
|
||||
|
||||
for (const handler of this.eventHandlers) {
|
||||
appEventBus.off(handler)
|
||||
appEventBus.removeListener(handler)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user