mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +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 {
|
Future<bool> hasManagerUpdates() async {
|
||||||
String currentVersion = await _managerAPI.getCurrentManagerVersion();
|
String currentVersion = await _managerAPI.getCurrentManagerVersion();
|
||||||
|
|
||||||
// add v to current version
|
// add v to current version
|
||||||
if (!currentVersion.startsWith('v')) {
|
if (!currentVersion.startsWith('v')) {
|
||||||
currentVersion = 'v$currentVersion';
|
currentVersion = 'v$currentVersion';
|
||||||
}
|
}
|
||||||
|
|
||||||
_latestManagerVersion = await _managerAPI.getLatestManagerVersion() ?? currentVersion;
|
_latestManagerVersion =
|
||||||
|
await _managerAPI.getLatestManagerVersion() ?? currentVersion;
|
||||||
|
|
||||||
if (_latestManagerVersion != currentVersion) {
|
if (_latestManagerVersion != currentVersion) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -272,7 +273,8 @@ class HomeViewModel extends BaseViewModel {
|
|||||||
label: I18nText('updateButton'),
|
label: I18nText('updateButton'),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await AppInstaller.installApk(
|
await AppInstaller.installApk(
|
||||||
downloadedApk!.path,);
|
downloadedApk!.path,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user