const shouldQuit = app.makeSingleInstance((commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore()
mainWindow.show()
mainWindow.focus()
}
})
if (shouldQuit) {
app.quit()
}
das ist, was ich versuche, Aber wenn eine Instanz app geöffnet ist es nicht öffnen neue Instanz (was richtig ist), aber ist die Wiederherstellung nicht die aktuelle Instanz (die minimier) Irgendeine Idee? Ich habe das Gefühl, dass es nicht in (mainWindow) Zustand geht, aber warum? Dieses Beispiel gibt es auch dort amtliches Dokument?Elektron makeSingleInstance nicht die Wiederherstellung App
Vielen Dank im Voraus.