fix preload conflict
This commit is contained in:
parent
18154e221c
commit
0992cd4668
@ -101,8 +101,8 @@ contextBridge.exposeInMainWorld('api', {
|
||||
invoke: (channel, ...args) => ipcRenderer.invoke(channel, ...args),
|
||||
|
||||
// Listeners
|
||||
onSessionStateText: (callback) => ipcRenderer.on('session-state-text', callback),
|
||||
removeOnSessionStateText: (callback) => ipcRenderer.removeListener('session-state-text', callback),
|
||||
onListenChangeSessionResult: (callback) => ipcRenderer.on('listen:changeSessionResult', callback),
|
||||
removeOnListenChangeSessionResult: (callback) => ipcRenderer.removeListener('listen:changeSessionResult', callback),
|
||||
onShortcutsUpdated: (callback) => ipcRenderer.on('shortcuts-updated', callback),
|
||||
removeOnShortcutsUpdated: (callback) => ipcRenderer.removeListener('shortcuts-updated', callback)
|
||||
},
|
||||
|
@ -486,8 +486,7 @@ export class MainHeader extends LitElement {
|
||||
}
|
||||
this.isTogglingSession = false; // ✨ 로딩 상태만 해제
|
||||
};
|
||||
// window.api.mainHeader.onSessionStateText(this._sessionStateTextListener);
|
||||
ipcRenderer.on('listen:changeSessionResult', this._sessionStateTextListener);
|
||||
window.api.mainHeader.onListenChangeSessionResult(this._sessionStateTextListener);
|
||||
|
||||
this._shortcutListener = (event, keybinds) => {
|
||||
console.log('[MainHeader] Received updated shortcuts:', keybinds);
|
||||
@ -508,8 +507,7 @@ export class MainHeader extends LitElement {
|
||||
|
||||
if (window.api) {
|
||||
if (this._sessionStateTextListener) {
|
||||
// window.api.mainHeader.removeOnSessionStateText(this._sessionStateTextListener);
|
||||
ipcRenderer.removeListener('listen:changeSessionResult', this._sessionStateTextListener);
|
||||
window.api.mainHeader.removeOnListenChangeSessionResult(this._sessionStateTextListener);
|
||||
}
|
||||
if (this._shortcutListener) {
|
||||
window.api.mainHeader.removeOnShortcutsUpdated(this._shortcutListener);
|
||||
|
Loading…
x
Reference in New Issue
Block a user