mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 21:19:01 +01:00 
			
		
		
		
	Merge pull request #3253 from nemec/master
Allow Mac users to close and re-open window
This commit is contained in:
		
						commit
						9bc6cf7067
					
				
							
								
								
									
										10
									
								
								electron.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								electron.js
									
									
									
									
									
								
							@ -1,6 +1,6 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
const {app, globalShortcut} = require('electron');
 | 
			
		||||
const {app, globalShortcut, BrowserWindow} = require('electron');
 | 
			
		||||
const sqlInit = require('./src/services/sql_init');
 | 
			
		||||
const appIconService = require('./src/services/app_icon');
 | 
			
		||||
const windowService = require('./src/services/window');
 | 
			
		||||
@ -32,6 +32,14 @@ app.on('ready', async () => {
 | 
			
		||||
 | 
			
		||||
        await windowService.createMainWindow(app);
 | 
			
		||||
 | 
			
		||||
        if (process.platform === 'darwin') {
 | 
			
		||||
            app.on('activate', async () => {
 | 
			
		||||
                if (BrowserWindow.getAllWindows().length === 0) {
 | 
			
		||||
                    await windowService.createMainWindow(app);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        tray.createTray();
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user