Remove posibility to store alpha version in LastAppVersion and clear this var when user already stored an alpha version

This commit is contained in:
Shidorien
2024-09-17 15:20:44 +02:00
parent ad4da530eb
commit 0027832bdb
+8
View File
@@ -53,6 +53,14 @@ export default function App() {
const appVersion = await lastValueFrom(autoUpdater.getAppVersion());
const lastAppVersion = autoUpdater.getLastAppVersion();
if (lastAppVersion.toLowerCase().includes("alpha")) {
autoUpdater.setLastAppVersion("0"); // Reset last app version if it's an alpha version for users with alpha versions in the var stored.
}
if (appVersion.toLowerCase().includes("alpha")) {
return;
}
autoUpdater.setLastAppVersion(appVersion);
if (parse(lastAppVersion) && gt(appVersion, lastAppVersion)) {