mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: update button being clickable when offline (#987)
This commit is contained in:
parent
76c68baa1f
commit
1875c4ee73
@ -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 New Issue
Block a user