mirror of
https://github.com/rhysd/Mstdn.git
synced 2024-11-28 20:24:10 +01:00
IPC workaround is no longer needed with Electron 1.6.5
This commit is contained in:
parent
80eb09877f
commit
969c8cee21
@ -4,13 +4,8 @@ const electron = r('electron');
|
||||
const ipc = electron.ipcRenderer;
|
||||
|
||||
export function on(channel: IpcChannelFromMain, callback: (...args: any[]) => void) {
|
||||
ipc.on(channel, (...args: any[]) => {
|
||||
ipc.on(channel, (_, ...args: any[]) => {
|
||||
log.info('IPC: Received from:', channel, args);
|
||||
// XXX: Weird...
|
||||
// First element is Event in Windows as documented. But not in macOS.
|
||||
if (args[0] instanceof Event) {
|
||||
args = args.splice(1);
|
||||
}
|
||||
callback(...args);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user