remove sendSync
This commit is contained in:
1 parent
6f4d96c11b
commit
fd80a831e1
3 files changed
+1
-9
No files matched your search
@@ -12,13 +12,6 @@ contextBridge.exposeInMainWorld('mainApi', {
|
||||
throw new Error(`Unknown ipc channel name: ${channel}`)
|
||||
}
|
||||
},
|
||||
sendSync: (channel: string, ...data: any[]): any => {
|
||||
if (mainAvailChannels.includes(channel)) {
|
||||
return ipcRenderer.sendSync.apply(null, [channel, ...data])
|
||||
}
|
||||
|
||||
throw new Error(`Unknown ipc channel name: ${channel}`)
|
||||
},
|
||||
on: (channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): void => {
|
||||
if (rendererAvailChannels.includes(channel)) {
|
||||
ipcRenderer.on(channel, listener)
|
||||
|
||||
@@ -21,7 +21,7 @@ onMounted((): void => {
|
||||
})
|
||||
|
||||
const getApplicationVersionFromMainProcess = (): void => {
|
||||
appVersion.value = window.mainApi.sendSync('msgRequestGetVersion')
|
||||
window.mainApi.invoke('msgRequestGetVersion').then((result: string) => appVersion.value = result)
|
||||
}
|
||||
|
||||
const handleChangeTheme = (): void => {
|
||||
|
||||
Reference in new issue
Block a user