fix: reload discord if it's unresponsive

This commit is contained in:
smartfrigde 2024-06-15 10:58:44 +02:00
parent 0329b2ee92
commit a347fd8fd0

View file

@ -209,6 +209,9 @@ function doAfterDefiningTheWindow(passedWindow: BrowserWindow): void {
if (!fs.existsSync(`${userDataPath}/disabled.txt`)) { if (!fs.existsSync(`${userDataPath}/disabled.txt`)) {
fs.writeFileSync(path.join(userDataPath, "/disabled.txt"), ""); fs.writeFileSync(path.join(userDataPath, "/disabled.txt"), "");
} }
passedWindow.on("unresponsive", () => {
passedWindow.webContents.reload();
});
passedWindow.webContents.on("did-finish-load", () => { passedWindow.webContents.on("did-finish-load", () => {
fs.readdirSync(themesFolder).forEach((file) => { fs.readdirSync(themesFolder).forEach((file) => {
try { try {