mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-15 21:26:06 +00:00
don't throw in case the tray was destroyed between calls
This commit is contained in:
@@ -11,7 +11,7 @@ namespace ElectronNET.WebApp.Controllers
|
||||
{
|
||||
if(HybridSupport.IsElectronActive)
|
||||
{
|
||||
Electron.IpcMain.On("app-info", async (args) =>
|
||||
Electron.IpcMain.OnWithId("app-info", async (id, args) =>
|
||||
{
|
||||
string appPath = await Electron.App.GetAppPathAsync();
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace ElectronNET.WebApp.Controllers
|
||||
Electron.IpcMain.Send(mainWindow, "got-app-path", appPath);
|
||||
});
|
||||
|
||||
Electron.IpcMain.On("sys-info", async (args) =>
|
||||
Electron.IpcMain.OnWithId("sys-info", async (id, args) =>
|
||||
{
|
||||
string homePath = await Electron.App.GetPathAsync(PathName.Home);
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace ElectronNET.WebApp.Controllers
|
||||
Electron.IpcMain.Send(mainWindow, "got-sys-info", homePath);
|
||||
});
|
||||
|
||||
Electron.IpcMain.On("screen-info", async (args) =>
|
||||
Electron.IpcMain.OnWithId("screen-info", async (id, args) =>
|
||||
{
|
||||
var display = await Electron.Screen.GetPrimaryDisplayAsync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user