From 30840804fab5c0f27a883bcb7e39eba933262f9d Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Mon, 11 Apr 2022 00:15:19 +0300 Subject: [PATCH] fix: sync pip and index.js options --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 0b4566fb..bfc06ccc 100644 --- a/index.js +++ b/index.js @@ -175,7 +175,9 @@ function createMainWindow() { win.webContents.loadURL(urlToLoad); win.on("closed", onClosed); - const setPiPOptions = (key, value) => config.plugins.setOptions("picture-in-picture", { [key]: value }); + const setPiPOptions = config.plugins.isEnabled("picture-in-picture") + ? (key, value) => require("./plugins/picture-in-picture/back").setOptions({ [key]: value }) + : () => {}; win.on("move", () => { if (win.isMaximized()) return;