mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
feat: consider as an update available when an already patched app is updated
This commit is contained in:
parent
10a6ec2f1e
commit
0ccf1fb3b8
@ -83,6 +83,20 @@ class ManagerAPI {
|
||||
} else {
|
||||
app.hasUpdates = await hasAppUpdates(app.packageName, app.patchDate);
|
||||
app.changelog = await getAppChangelog(app.packageName, app.patchDate);
|
||||
if (!app.hasUpdates) {
|
||||
String? currentInstalledVersion =
|
||||
(await DeviceApps.getApp(app.packageName))?.versionName;
|
||||
if (currentInstalledVersion != null) {
|
||||
String currentSavedVersion = app.version;
|
||||
int currentInstalledVersionInt = int.parse(
|
||||
currentInstalledVersion.replaceAll(RegExp('[^0-9]'), ''));
|
||||
int currentSavedVersionInt =
|
||||
int.parse(currentSavedVersion.replaceAll(RegExp('[^0-9]'), ''));
|
||||
if (currentInstalledVersionInt > currentSavedVersionInt) {
|
||||
app.hasUpdates = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
patchedApps.removeWhere((a) => toRemove.contains(a));
|
||||
|
Loading…
Reference in New Issue
Block a user