Fixed isUpdateAvailable not working properly

This commit is contained in:
RemixDev 2022-08-10 17:38:58 +02:00
parent 8fa789170d
commit 88ee7ad976
No known key found for this signature in database
GPG Key ID: B33962B465BDB51C
1 changed files with 6 additions and 3 deletions

View File

@ -122,9 +122,12 @@ export class DeemixApp {
const latestVersionObj: any = this.parseVersion(this.latestVersion)
if (currentVersionObj === null || latestVersionObj === null) return false
if (latestVersionObj.year > currentVersionObj.year) return true
if (latestVersionObj.month > currentVersionObj.month) return true
if (latestVersionObj.day > currentVersionObj.day) return true
if (latestVersionObj.revision > currentVersionObj.revision) return true
let sameDate = latestVersionObj.year == currentVersionObj.year
if (sameDate && latestVersionObj.month > currentVersionObj.month) return true
sameDate = sameDate && latestVersionObj.month == currentVersionObj.month
if (sameDate && latestVersionObj.day > currentVersionObj.day) return true
sameDate = sameDate && latestVersionObj.day == currentVersionObj.day
if (sameDate && latestVersionObj.revision > currentVersionObj.revision) return true
if (
latestVersionObj.revision === currentVersionObj.revision &&
latestVersionObj.commit !== currentVersionObj.commit