Preferences WIP
This commit is contained in:
@@ -70,6 +70,13 @@ app.whenReady().then(async () => {
|
||||
createNoteWindow(noteId)
|
||||
})
|
||||
|
||||
// Broadcast note changes to all windows
|
||||
const broadcastNoteChange = (event, data) => {
|
||||
BrowserWindow.getAllWindows().forEach((win) => {
|
||||
win.webContents.send(event, data)
|
||||
})
|
||||
}
|
||||
|
||||
// Create plugin registry
|
||||
const registry = new PluginRegistry()
|
||||
|
||||
@@ -102,6 +109,8 @@ app.whenReady().then(async () => {
|
||||
return await adapter[method](...args)
|
||||
})
|
||||
|
||||
broadcastNoteChange('plugin-changed', pluginId)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -124,13 +133,6 @@ app.whenReady().then(async () => {
|
||||
return await setActivePlugin(pluginId)
|
||||
})
|
||||
|
||||
// Broadcast note changes to all windows
|
||||
const broadcastNoteChange = (event, data) => {
|
||||
BrowserWindow.getAllWindows().forEach((win) => {
|
||||
win.webContents.send(event, data)
|
||||
})
|
||||
}
|
||||
|
||||
// Handle note change events from renderer
|
||||
ipcMain.on('note-changed', (_, event, data) => {
|
||||
broadcastNoteChange(event, data)
|
||||
|
||||
Reference in New Issue
Block a user