fix: refactor application event observing on web

This commit is contained in:
Karol Sójko
2022-10-21 14:28:03 +02:00
parent bd40a49484
commit 9fb85cd77a
11 changed files with 238 additions and 47 deletions

View File

@@ -4,11 +4,16 @@ import {
ApplicationInterface,
InternalEventBusInterface,
} from '@standardnotes/services'
import { RouteParser } from './RouteParser'
import { RouteParserInterface } from './RouteParserInterface'
import { RouteServiceEvent } from './RouteServiceEvent'
import { RouteServiceInterface } from './RouteServiceInterface'
export class RouteService extends AbstractService<RouteServiceEvent, RouteParserInterface> {
export class RouteService
extends AbstractService<RouteServiceEvent, RouteParserInterface>
implements RouteServiceInterface
{
private unsubApp!: () => void
constructor(

View File

@@ -0,0 +1,7 @@
import { RouteParserInterface } from './RouteParserInterface'
export interface RouteServiceInterface {
deinit(): void
getRoute(): RouteParserInterface
removeSettingsFromURLQueryParameters(): void
}

View File

@@ -11,6 +11,7 @@ export * from './Route/Params/SubscriptionInviteParams'
export * from './Route/RouteParser'
export * from './Route/RouteType'
export * from './Route/RouteService'
export * from './Route/RouteServiceInterface'
export * from './Route/RouteServiceEvent'
export * from './Security/AutolockService'
export * from './Storage/LocalStorage'