mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-31 04:50:16 +02:00
Merge pull request #401 from ImranR98/dev
Bugfix: "releaseDateAsVersion" resets to "noVersionDetection"
This commit is contained in:
@@ -80,9 +80,7 @@ class _AppPageState extends State<AppPage> {
|
||||
),
|
||||
Text(
|
||||
'${tr('installedVersionX', args: [
|
||||
app?.installedInfo?.versionName ??
|
||||
app?.app.installedVersion ??
|
||||
tr('none')
|
||||
app?.app.installedVersion ?? tr('none')
|
||||
])}${trackOnly ? ' ${tr('estimateInBrackets')}\n\n${tr('xIsTrackOnly', args: [
|
||||
tr('app')
|
||||
])}' : ''}',
|
||||
@@ -249,6 +247,8 @@ class _AppPageState extends State<AppPage> {
|
||||
if (e.key == 'versionDetection' && e is GeneratedFormDropdown) {
|
||||
e.disabledOptKeys ??= [];
|
||||
if (app?.app.installedVersion != null &&
|
||||
app?.app.additionalSettings['versionDetection'] !=
|
||||
'releaseDateAsVersion' &&
|
||||
!appsProvider.isVersionDetectionPossible(app)) {
|
||||
e.disabledOptKeys!.add('standardVersionDetection');
|
||||
}
|
||||
|
@@ -486,6 +486,8 @@ class AppsProvider with ChangeNotifier {
|
||||
|
||||
bool isVersionDetectionPossible(AppInMemory? app) {
|
||||
return app?.app.additionalSettings['trackOnly'] != true &&
|
||||
app?.app.additionalSettings['versionDetection'] !=
|
||||
'releaseDateAsVersion' &&
|
||||
app?.installedInfo?.versionName != null &&
|
||||
app?.app.installedVersion != null &&
|
||||
reconcileVersionDifferences(
|
||||
@@ -539,6 +541,8 @@ class AppsProvider with ChangeNotifier {
|
||||
}
|
||||
// FOURTH, DISABLE VERSION DETECTION IF ENABLED AND THE REPORTED/REAL INSTALLED VERSIONS ARE NOT STANDARDIZED
|
||||
if (installedInfo != null &&
|
||||
app.additionalSettings['versionDetection'] ==
|
||||
'standardVersionDetection' &&
|
||||
!isVersionDetectionPossible(AppInMemory(app, null, installedInfo))) {
|
||||
app.additionalSettings['versionDetection'] = 'noVersionDetection';
|
||||
logs.add('Could not reconcile version formats for: ${app.id}');
|
||||
|
Reference in New Issue
Block a user