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

View file

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