Added 'no version detection' option

This commit is contained in:
Imran Remtulla
2022-12-18 02:46:25 -05:00
parent 67b986de93
commit 63034dd3f9
3 changed files with 52 additions and 22 deletions

View File

@@ -461,7 +461,8 @@ class AppsProvider with ChangeNotifier {
app.installedVersion = installedInfo!.versionName;
modded = true;
} else if (installedInfo?.versionName != null &&
installedInfo!.versionName != app.installedVersion) {
installedInfo!.versionName != app.installedVersion &&
!app.noVersionDetection) {
String? correctedInstalledVersion = reconcileRealAndInternalVersions(
installedInfo.versionName!, app.installedVersion!);
if (correctedInstalledVersion != null) {
@@ -470,7 +471,8 @@ class AppsProvider with ChangeNotifier {
}
}
if (app.installedVersion != null &&
app.installedVersion != app.latestVersion) {
app.installedVersion != app.latestVersion &&
!app.noVersionDetection) {
app.installedVersion = reconcileRealAndInternalVersions(
app.installedVersion!, app.latestVersion,
matchMode: true) ??
@@ -624,11 +626,7 @@ class AppsProvider with ChangeNotifier {
sourceProvider.getSource(currentApp.url),
currentApp.url,
currentApp.additionalData,
name: currentApp.name,
id: currentApp.id,
pinned: currentApp.pinned,
trackOnly: currentApp.trackOnly,
installedVersion: currentApp.installedVersion);
currentApp: currentApp);
if (currentApp.preferredApkIndex < newApp.apkUrls.length) {
newApp.preferredApkIndex = currentApp.preferredApkIndex;
}