mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Merge branch 'fix-window-position-save-spam' of https://github.com/Araxeus/youtube-music into fix-window-position-save-spam
This commit is contained in:
2
index.js
2
index.js
@ -142,6 +142,7 @@ function createMainWindow() {
|
|||||||
win.on("closed", onClosed);
|
win.on("closed", onClosed);
|
||||||
|
|
||||||
win.on("move", () => {
|
win.on("move", () => {
|
||||||
|
if (win.isMaximized()) return;
|
||||||
let position = win.getPosition();
|
let position = win.getPosition();
|
||||||
lateSave("window-position", { x: position[0], y: position[1] });
|
lateSave("window-position", { x: position[0], y: position[1] });
|
||||||
});
|
});
|
||||||
@ -171,6 +172,7 @@ function createMainWindow() {
|
|||||||
savedTimeouts[key] = setTimeout(() => {
|
savedTimeouts[key] = setTimeout(() => {
|
||||||
config.set(key, value);
|
config.set(key, value);
|
||||||
savedTimeouts[key] = undefined;
|
savedTimeouts[key] = undefined;
|
||||||
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user