mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
dont save maximized state in PiP mode
This commit is contained in:
11
index.js
11
index.js
@ -196,17 +196,18 @@ function createMainWindow() {
|
|||||||
|
|
||||||
win.on("resize", () => {
|
win.on("resize", () => {
|
||||||
const windowSize = win.getSize();
|
const windowSize = win.getSize();
|
||||||
|
|
||||||
const isMaximized = win.isMaximized();
|
const isMaximized = win.isMaximized();
|
||||||
if (winWasMaximized !== isMaximized) {
|
|
||||||
|
const isPiPEnabled =
|
||||||
|
config.plugins.isEnabled("picture-in-picture") &&
|
||||||
|
config.plugins.getOptions("picture-in-picture")["isInPiP"];
|
||||||
|
|
||||||
|
if (!isPiPEnabled && winWasMaximized !== isMaximized) {
|
||||||
winWasMaximized = isMaximized;
|
winWasMaximized = isMaximized;
|
||||||
config.set("window-maximized", isMaximized);
|
config.set("window-maximized", isMaximized);
|
||||||
}
|
}
|
||||||
if (isMaximized) return;
|
if (isMaximized) return;
|
||||||
|
|
||||||
const isPiPEnabled =
|
|
||||||
config.plugins.isEnabled("picture-in-picture") &&
|
|
||||||
config.plugins.getOptions("picture-in-picture")["isInPiP"];
|
|
||||||
if (!isPiPEnabled) {
|
if (!isPiPEnabled) {
|
||||||
lateSave("window-size", {
|
lateSave("window-size", {
|
||||||
width: windowSize[0],
|
width: windowSize[0],
|
||||||
|
|||||||
Reference in New Issue
Block a user