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