Preferences WIP

This commit is contained in:
nicwands
2026-03-11 13:05:28 -04:00
parent a1b339f668
commit 99e6761e92
16 changed files with 150 additions and 57 deletions

View File

@@ -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)