Skip to content

Commit f5e2abf

Browse files
Change to Electron version 7, fix some breaking changes.
1 parent 42f09de commit f5e2abf

24 files changed

+909
-1473
lines changed

ElectronNET.API/Entities/HighlightMode.cs

Lines changed: 0 additions & 33 deletions
This file was deleted.

ElectronNET.API/Tray.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -307,18 +307,6 @@ public void SetTitle(string title)
307307
BridgeConnector.Socket.Emit("tray-setTitle", title);
308308
}
309309

310-
/// <summary>
311-
/// macOS: Sets when the tray’s icon background becomes highlighted (in blue).
312-
///
313-
/// Note: You can use highlightMode with a BrowserWindow by toggling between
314-
/// 'never' and 'always' modes when the window visibility changes.
315-
/// </summary>
316-
/// <param name="highlightMode"></param>
317-
public void SetHighlightMode(HighlightMode highlightMode)
318-
{
319-
BridgeConnector.Socket.Emit("tray-setHighlightMode", highlightMode.ToString());
320-
}
321-
322310
/// <summary>
323311
/// Windows: Displays a tray balloon.
324312
/// </summary>

ElectronNET.Host/api/app.js

Lines changed: 16 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ElectronNET.Host/api/app.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ElectronNET.Host/api/app.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,17 @@ export = (socket: SocketIO.Socket, app: Electron.App) => {
113113
// }
114114
// }
115115

116-
socket.on('appGetFileIcon', (path, options) => {
116+
socket.on('appGetFileIcon', async (path, options) => {
117+
let error = {};
118+
117119
if (options) {
118-
app.getFileIcon(path, options, (error, nativeImage) => {
119-
electronSocket.emit('appGetFileIconCompleted', [error, nativeImage]);
120-
});
120+
const nativeImage = await app.getFileIcon(path, options).catch((errorFileIcon) => error = errorFileIcon);
121+
122+
electronSocket.emit('appGetFileIconCompleted', [error, nativeImage]);
121123
} else {
122-
app.getFileIcon(path, (error, nativeImage) => {
123-
electronSocket.emit('appGetFileIconCompleted', [error, nativeImage]);
124-
});
124+
const nativeImage = await app.getFileIcon(path).catch((errorFileIcon) => error = errorFileIcon);
125+
126+
electronSocket.emit('appGetFileIconCompleted', [error, nativeImage]);
125127
}
126128
});
127129

ElectronNET.Host/api/autoUpdater.js

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ElectronNET.Host/api/autoUpdater.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)