Skip to content

Commit

Permalink
fix: update button being clickable when offline (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAabedKhan authored Jul 5, 2023
1 parent 76c68ba commit 1875c4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ui/views/home/home_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ class HomeViewModel extends BaseViewModel {

Future<bool> hasManagerUpdates() async {
String currentVersion = await _managerAPI.getCurrentManagerVersion();
_latestManagerVersion = await _managerAPI.getLatestManagerVersion();


// add v to current version
if (!currentVersion.startsWith('v')) {
currentVersion = 'v$currentVersion';
}


_latestManagerVersion = await _managerAPI.getLatestManagerVersion() ?? currentVersion;

if (_latestManagerVersion != currentVersion) {
return true;
}
Expand Down

0 comments on commit 1875c4e

Please sign in to comment.