Skip to content
Snippets Groups Projects
Commit d5a7f363 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Port to EventBus

parent d25cfd94
No related branches found
No related tags found
No related merge requests found
Pipeline #11861 passed with warnings
import {LitElement} from "lit-element";
import * as events from 'vpu-common/events.js';
import {EventBus} from 'vpu-common';
export default class VPUSignatureLitElement extends LitElement {
......@@ -26,14 +26,13 @@ export default class VPUSignatureLitElement extends LitElement {
this._loginStatus = '';
this._loginState = [];
this._subscriber = new events.EventSubscriber('vpu-auth-update', 'vpu-auth-update-request');
this._bus = new EventBus();
this._updateAuth = this._updateAuth.bind(this);
this._subscriber.subscribe(this._updateAuth);
this._bus.subscribe('auth-update', this._updateAuth);
}
disconnectedCallback() {
this._subscriber.unsubscribe(this._updateAuth);
delete this._subscriber;
this._bus.close();
super.disconnectedCallback();
}
......
Subproject commit 4f2fc5e3cea620067b841ad1b4498b3c54ec0983
Subproject commit 155ebffe3c9c9f3992caf794ebf6a8e814b6e1dd
Subproject commit f3aa17bcca0c04055ad2835ed620146a741a107d
Subproject commit 4594a22095b2a7a06c0f91ec0a51a0a55125b356
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment