Preferences WIP
This commit is contained in:
@@ -143,6 +143,11 @@ app.whenReady().then(async () => {
|
||||
ipcMain.on("open-note-window", (_, noteId) => {
|
||||
createNoteWindow(noteId);
|
||||
});
|
||||
const broadcastNoteChange = (event, data) => {
|
||||
BrowserWindow.getAllWindows().forEach((win) => {
|
||||
win.webContents.send(event, data);
|
||||
});
|
||||
};
|
||||
const registry = new PluginRegistry();
|
||||
registry.register(filesystemPlugin);
|
||||
registry.register(supabasePlugin);
|
||||
@@ -162,6 +167,8 @@ app.whenReady().then(async () => {
|
||||
}
|
||||
return await adapter[method](...args);
|
||||
});
|
||||
broadcastNoteChange("plugin-changed", pluginId);
|
||||
console.log("activePlugin: ", pluginId);
|
||||
return true;
|
||||
};
|
||||
await setActivePlugin(initialConfig.activeAdapter);
|
||||
@@ -177,11 +184,6 @@ app.whenReady().then(async () => {
|
||||
ipcMain.handle("setActivePlugin", async (_, pluginId) => {
|
||||
return await setActivePlugin(pluginId);
|
||||
});
|
||||
const broadcastNoteChange = (event, data) => {
|
||||
BrowserWindow.getAllWindows().forEach((win) => {
|
||||
win.webContents.send(event, data);
|
||||
});
|
||||
};
|
||||
ipcMain.on("note-changed", (_, event, data) => {
|
||||
broadcastNoteChange(event, data);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user