Added unsupported version warning and handle alpha versions

This commit is contained in:
Juan Gilsanz Polo 2023-05-13 18:33:09 +02:00
parent 3e281095cd
commit 3f0997f5d6
11 changed files with 234 additions and 72 deletions

View file

@ -535,15 +535,10 @@ class ServersProvider with ChangeNotifier {
data.changelog = gitHubResult['body'];
}
data.updateAvailable = data.newVersion != null
? data.newVersion!.contains('b')
? compareBetaVersions(
currentVersion: data.currentVersion.replaceAll('v', ''),
newVersion: data.newVersion!.replaceAll('v', ''),
)
: compareVersions(
currentVersion: data.currentVersion.replaceAll('v', ''),
newVersion: data.newVersion!.replaceAll('v', ''),
)
? compareVersions(
currentVersion: data.currentVersion,
newVersion: data.newVersion!,
)
: false;
setUpdateAvailableData(data);
setUpdateAvailableLoadStatus(LoadStatus.loaded, true);