feat: remove getCurrentWindowId IPC event and related functionality for cleaner API
This commit is contained in:
@@ -41,9 +41,6 @@ const api: WindowApi = {
|
||||
// 发送消息到主进程
|
||||
send: (channel: IPC_EVENTS, ...args: any[]) => ipcRenderer.send(channel, ...args),
|
||||
|
||||
// 获取窗口ID
|
||||
getCurrentWindowId: () => ipcRenderer.sendSync(IPC_EVENTS.GET_WINDOW_ID),
|
||||
|
||||
// 发送日志
|
||||
logger: {
|
||||
debug: (message: string, ...meta: any[]) => ipcRenderer.send(IPC_EVENTS.LOG_DEBUG, message, ...meta),
|
||||
|
||||
@@ -52,9 +52,6 @@ export class IPCManager {
|
||||
}
|
||||
})
|
||||
|
||||
ipcMain.handle('get-window-id',(event: any) => {
|
||||
event.returnValue = event.sender.id
|
||||
})
|
||||
}
|
||||
|
||||
// 注册同步处理器
|
||||
|
||||
Reference in New Issue
Block a user