mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
fix: update button being clickable when offline (#987)
This commit is contained in:
parent
76c68baa1f
commit
1875c4ee73
1 changed files with 4 additions and 3 deletions
|
@ -112,13 +112,14 @@ class HomeViewModel extends BaseViewModel {
|
||||||
|
|
||||||
Future<bool> hasManagerUpdates() async {
|
Future<bool> hasManagerUpdates() async {
|
||||||
String currentVersion = await _managerAPI.getCurrentManagerVersion();
|
String currentVersion = await _managerAPI.getCurrentManagerVersion();
|
||||||
_latestManagerVersion = await _managerAPI.getLatestManagerVersion();
|
|
||||||
|
|
||||||
// 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;
|
||||||
|
|
||||||
if (_latestManagerVersion != currentVersion) {
|
if (_latestManagerVersion != currentVersion) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue