feature/IO-3725-RPS-Changes - Deprecations / Bug fixes
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const { ipcMain, dialog } = require("electron");
|
||||
const { ipcMain, dialog, BrowserWindow } = require("electron");
|
||||
const { StartWatcher, StopWatcher } = require("./file-watcher");
|
||||
const ipcTypes = require("../../src/ipc.types.commonjs");
|
||||
const { mainWindow } = require("../main");
|
||||
const _ = require("lodash");
|
||||
const { store } = require("../electron-store");
|
||||
const path = require("path");
|
||||
@@ -34,7 +33,8 @@ ipcMain.on(ipcTypes.default.fileWatcher.toMain.stop, async (event, arg) => {
|
||||
});
|
||||
|
||||
ipcMain.on(ipcTypes.default.fileWatcher.toMain.addPath, async (event, arg) => {
|
||||
const result = await dialog.showOpenDialog(mainWindow, {
|
||||
const parentWindow = BrowserWindow.fromWebContents(event.sender);
|
||||
const result = await dialog.showOpenDialog(parentWindow, {
|
||||
properties: ["openDirectory"],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user