mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
refactor: apply changes from analyser
This commit is contained in:
parent
c7b227529d
commit
7c2c695d88
@ -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;
|
||||
}
|
||||
@ -272,7 +273,8 @@ class HomeViewModel extends BaseViewModel {
|
||||
label: I18nText('updateButton'),
|
||||
onPressed: () async {
|
||||
await AppInstaller.installApk(
|
||||
downloadedApk!.path,);
|
||||
downloadedApk!.path,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user