Clean up webview handling by unbinding and destroying it after login

This commit is contained in:
Seth 2025-05-19 06:39:45 -04:00
parent 8320d69f73
commit fd9734ccb7

View file

@ -30,6 +30,9 @@ export default async () => {
if (url.startsWith("https://desktop.tidal.com")) {
const code = new URL(url)
webview.unbind("getURL");
webview.destroy()
await finalizeLogin(code.search);
didLogin = true;
}
@ -42,8 +45,6 @@ export default async () => {
while (!didLogin) {
await new Promise((resolve) => setTimeout(resolve, 0));
}
webview.destroy()
}
return {