1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

JS-3655: fix

This commit is contained in:
Andrew Simachev 2023-12-27 14:34:22 +01:00
parent 137521e526
commit 5720f5b1cd
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
4 changed files with 7 additions and 16 deletions

View file

@ -3,7 +3,6 @@
const { app, BrowserWindow, session, nativeTheme, ipcMain, powerMonitor, dialog } = require('electron');
const { is, fixPathForAsarUnpack } = require('electron-util');
const path = require('path');
const os = require('os');
const storage = require('electron-json-storage');
const port = process.env.SERVER_PORT;
const protocol = 'anytype';
@ -95,12 +94,6 @@ nativeTheme.on('updated', () => {
function createWindow () {
mainWindow = WindowManager.createMain({ route: Util.getRouteFromUrl(deeplinkingUrl), isChild: false });
if (process.env.ELECTRON_DEV_EXTENSIONS) {
BrowserWindow.addDevToolsExtension(
path.join(os.homedir(), '/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/4.6.0_0')
);
};
mainWindow.on('close', (e) => {
Util.log('info', 'closeMain: ' + app.isQuiting);
@ -141,6 +134,8 @@ function createWindow () {
console.error('[Api] method not defined:', cmd);
};
});
};
app.on('ready', () => {
@ -194,9 +189,5 @@ app.on('activate', () => {
app.on('open-url', (e, url) => {
e.preventDefault();
if (mainWindow) {
Util.send(mainWindow, 'route', Util.getRouteFromUrl(url));
mainWindow.show();
};
deeplinkingUrl = url;
});