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

fix deeplink

This commit is contained in:
Andrew Simachev 2023-12-27 14:40:47 +01:00
parent 5cfeebe226
commit 2c318aa36f
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8

View file

@ -92,6 +92,9 @@ nativeTheme.on('updated', () => {
});
function createWindow () {
Util.log('info', 'CreateWindow: ' + deeplinkingUrl + ' ' + JSON.stringify(process.argv));
mainWindow = WindowManager.createMain({ route: Util.getRouteFromUrl(deeplinkingUrl), isChild: false });
mainWindow.on('close', (e) => {
@ -189,5 +192,11 @@ app.on('activate', () => {
app.on('open-url', (e, url) => {
e.preventDefault();
deeplinkingUrl = url;
if (mainWindow) {
Util.send(mainWindow, 'route', Util.getRouteFromUrl(url));
mainWindow.show();
};
});