chore: implement removeApplication

This commit is contained in:
Mo
2023-07-03 09:21:09 -05:00
parent 27fc4be886
commit 40f8985ede
2 changed files with 21 additions and 10 deletions

View File

@@ -152,6 +152,10 @@ export class WebApplication extends SNApplication implements WebApplicationInter
override deinit(mode: DeinitMode, source: DeinitSource): void {
super.deinit(mode, source)
if (!this.isNativeMobileWeb()) {
this.webOrDesktopDevice().removeApplication(this)
}
try {
for (const service of Object.values(this.webServices)) {
if (!service) {
@@ -278,6 +282,10 @@ export class WebApplication extends SNApplication implements WebApplicationInter
return this.deviceInterface as MobileDeviceInterface
}
webOrDesktopDevice(): WebOrDesktopDevice {
return this.deviceInterface as WebOrDesktopDevice
}
public getThemeService() {
return this.webServices.themeService
}