Notes TypeScript

This commit is contained in:
Mo Bitar
2020-04-11 23:26:02 -05:00
parent 2bc3658f1a
commit 3542cba002
7 changed files with 301 additions and 245 deletions

View File

@@ -1,3 +1,4 @@
import { AppStateEvent } from '@/services/state';
import { WebApplication } from './../../application';
import { ApplicationEvent } from 'snjs';
@@ -82,10 +83,11 @@ export class PureCtrl {
}
addAppStateObserver() {
this.unsubState = this.application!.getAppState()
.addObserver((eventName: any, data: any) => {
this.unsubState = this.application!.getAppState().addObserver(
async (eventName, data) => {
this.onAppStateEvent(eventName, data);
});
}
);
}
onAppStateEvent(eventName: any, data: any) {