Skip to content

Commit

Permalink
refactor: apply changes from analyser
Browse files Browse the repository at this point in the history
  • Loading branch information
validcube committed Jul 7, 2023
1 parent c7b2275 commit 7c2c695
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/ui/views/home/home_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,15 @@ class HomeViewModel extends BaseViewModel {

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

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

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


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

if (_latestManagerVersion != currentVersion) {
return true;
}
Expand Down Expand Up @@ -272,7 +273,8 @@ class HomeViewModel extends BaseViewModel {
label: I18nText('updateButton'),
onPressed: () async {
await AppInstaller.installApk(
downloadedApk!.path,);
downloadedApk!.path,
);
},
),
),
Expand Down

0 comments on commit 7c2c695

Please sign in to comment.