RequestSingleInstanceLockAsync callback does work now - bug fix #519

This commit is contained in:
Gregor Biswanger
2021-07-02 17:18:14 +02:00
parent afcd113675
commit 0ad89c7d22
4 changed files with 9 additions and 8 deletions

View File

@@ -8,6 +8,7 @@ ElectronNET.CLI:
* Fixed bug: Allow for property overrides to be passed in (thanks [danatcofo](https://github.com/danatcofo)) [\#531](https://github.com/ElectronNET/Electron.NET/pull/531)
Use `/p:propertyName=value` or `/property:propertyName=value` to pass in property overrides. This is equivalent to the `-p:` option documented here: [https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish)
* Fixed bug: Add ability to pass an argument for "Version" for both the "dotnet publish" and "electron-builder" commands (thanks [tub5](https://github.com/tub5)) [\#546](https://github.com/ElectronNET/Electron.NET/pull/546)
* Fixed bug: Version flag not persisting with the referenced executable (thanks [tub5](https://github.com/tub5)) [\#585](https://github.com/ElectronNET/Electron.NET/pull/585)
* Fixed bug: Changes PublishSingleFile default to false for NET5 compatibility (thanks [cristiangiagante](https://github.com/cristiangiagante)) [\#570](https://github.com/ElectronNET/Electron.NET/pull/570)
ElectronNET.API:

View File

@@ -148,11 +148,11 @@ module.exports = (socket, app) => {
app.setJumpList(categories);
});
socket.on('appRequestSingleInstanceLock', () => {
app.on('second-instance', (args, workingDirectory) => {
electronSocket.emit('secondInstance', [args, workingDirectory]);
});
const success = app.requestSingleInstanceLock();
electronSocket.emit('appRequestSingleInstanceLockCompleted', success);
app.on('second-instance', (event, args = [], workingDirectory = '') => {
electronSocket.emit('secondInstance', [args, workingDirectory]);
});
});
socket.on('appHasSingleInstanceLock', () => {
const hasLock = app.hasSingleInstanceLock();

File diff suppressed because one or more lines are too long

View File

@@ -186,12 +186,12 @@ export = (socket: Socket, app: Electron.App) => {
});
socket.on('appRequestSingleInstanceLock', () => {
app.on('second-instance', (args, workingDirectory) => {
electronSocket.emit('secondInstance', [args, workingDirectory]);
});
const success = app.requestSingleInstanceLock();
electronSocket.emit('appRequestSingleInstanceLockCompleted', success);
app.on('second-instance', (event, args = [], workingDirectory = '') => {
electronSocket.emit('secondInstance', [args, workingDirectory]);
});
});
socket.on('appHasSingleInstanceLock', () => {