fix: unmount application view when ephemeral identifier changes

This commit is contained in:
Mo
2022-02-04 12:00:03 -06:00
parent cc2169152e
commit b549cc38bf
23 changed files with 98 additions and 101 deletions

View File

@@ -16,6 +16,7 @@ import {
NoteGroupController,
removeFromArray,
IconsController,
Runtime,
} from '@standardnotes/snjs';
type WebServices = {
@@ -48,8 +49,8 @@ export class WebApplication extends SNApplication {
identifier: string,
defaultSyncServerHost: string,
public bridge: Bridge,
enableUnfinishedFeatures: boolean,
webSocketUrl: string
webSocketUrl: string,
runtime: Runtime
) {
super(
bridge.environment,
@@ -61,8 +62,8 @@ export class WebApplication extends SNApplication {
[],
defaultSyncServerHost,
bridge.appVersion,
enableUnfinishedFeatures,
webSocketUrl
webSocketUrl,
runtime
);
deviceInterface.setApplication(this);
this.noteControllerGroup = new NoteGroupController(this);

View File

@@ -5,6 +5,7 @@ import {
SNApplicationGroup,
DeviceInterface,
Platform,
Runtime,
} from '@standardnotes/snjs';
import { AppState } from '@/ui_models/app_state';
import { Bridge } from '@/services/bridge';
@@ -20,7 +21,7 @@ export class ApplicationGroup extends SNApplicationGroup {
constructor(
private defaultSyncServerHost: string,
private bridge: Bridge,
private enableUnfinishedFeatures: boolean,
private runtime: Runtime,
private webSocketUrl: string
) {
super(new WebDeviceInterface(bridge));
@@ -50,8 +51,8 @@ export class ApplicationGroup extends SNApplicationGroup {
descriptor.identifier,
this.defaultSyncServerHost,
this.bridge,
this.enableUnfinishedFeatures,
this.webSocketUrl
this.webSocketUrl,
this.runtime
);
const appState = new AppState(application, this.bridge);
const archiveService = new ArchiveManager(application);