ApplicationService integration

This commit is contained in:
Mo Bitar
2020-03-20 19:03:02 -05:00
parent 0ec0fd4872
commit 0ef1ce8ef1
9 changed files with 897 additions and 447 deletions

View File

@@ -1,24 +1,27 @@
import { isDesktopApplication, dictToArray } from '@/utils';
import {
ApplicationEvents,
SNPredicate,
ContentTypes,
CreateMaxPayloadFromAnyObject
CreateMaxPayloadFromAnyObject,
ApplicationService
} from 'snjs';
const STREAM_ITEMS_PERMISSION = 'stream-items';
/** A class for handling installation of system extensions */
export class NativeExtManager {
export class NativeExtManager extends ApplicationService {
/* @ngInject */
constructor(application) {
super(application);
this.application = application;
this.extManagerId = 'org.standardnotes.extensions-manager';
this.batchManagerId = 'org.standardnotes.batch-manager';
this.unsub = application.addSingleEventObserver(ApplicationEvents.Launched, () => {
this.reload();
});
}
/** @override */
onAppLaunch() {
super.onAppLaunch();
this.reload();
}
get extManagerPred() {