chore: ugprade snjs deps (#898)

This commit is contained in:
Mo
2022-02-24 12:57:32 -06:00
committed by GitHub
parent 7fe0873bbb
commit c3d849d204
19 changed files with 163 additions and 182 deletions

View File

@@ -75,9 +75,9 @@ export class AccountMenuState {
this.appEventListeners.push(
this.application.addEventObserver(async () => {
runInAction(() => {
if (isDev && window._devAccountServer) {
this.setServer(window._devAccountServer);
this.application.setCustomHost(window._devAccountServer);
if (isDev && window.devAccountServer) {
this.setServer(window.devAccountServer);
this.application.setCustomHost(window.devAccountServer);
} else {
this.setServer(this.application.getHost());
}

View File

@@ -62,7 +62,7 @@ type ObserverCallback = (event: AppStateEvent, data?: any) => Promise<void>;
export class AppState {
readonly enableUnfinishedFeatures: boolean =
window?._enable_unfinished_features;
window?.enabledUnfinishedFeatures;
application: WebApplication;
observers: ObserverCallback[] = [];

View File

@@ -25,7 +25,7 @@ export const SMART_TAGS_FEATURE_NAME = 'Smart Tags';
*/
export class FeaturesState {
readonly enableUnfinishedFeatures: boolean =
window?._enable_unfinished_features;
window?.enabledUnfinishedFeatures;
_hasFolders = false;
_hasSmartTags = false;

View File

@@ -48,23 +48,24 @@ export class WebApplication extends SNApplication {
platform: Platform,
identifier: string,
defaultSyncServerHost: string,
defaultFilesHostHost: string,
public bridge: Bridge,
webSocketUrl: string,
runtime: Runtime
) {
super(
bridge.environment,
platform,
deviceInterface,
WebCrypto,
new AlertService(),
super({
environment: bridge.environment,
platform: platform,
deviceInterface: deviceInterface,
crypto: WebCrypto,
alertService: new AlertService(),
identifier,
[],
defaultSyncServerHost,
bridge.appVersion,
webSocketUrl,
runtime
);
defaultHost: defaultSyncServerHost,
defaultFilesHost: defaultFilesHostHost,
appVersion: bridge.appVersion,
webSocketUrl: webSocketUrl,
runtime,
});
deviceInterface.setApplication(this);
this.noteControllerGroup = new NoteGroupController(this);
this.iconsController = new IconsController();

View File

@@ -20,6 +20,7 @@ import { ThemeManager } from '@/services/themeManager';
export class ApplicationGroup extends SNApplicationGroup {
constructor(
private defaultSyncServerHost: string,
private defaultFilesHostHost: string,
private bridge: Bridge,
private runtime: Runtime,
private webSocketUrl: string
@@ -50,6 +51,7 @@ export class ApplicationGroup extends SNApplicationGroup {
platform,
descriptor.identifier,
this.defaultSyncServerHost,
this.defaultFilesHostHost,
this.bridge,
this.webSocketUrl,
this.runtime