From 3edaa143e427a31745a78208534d4e53fb25adc6 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Fri, 30 May 2025 22:29:32 -0400 Subject: [PATCH] Minor UI tweak (pseudo-version in italics on apps page instead of readout) --- lib/pages/app.dart | 4 +--- lib/pages/apps.dart | 7 +++++-- lib/providers/source_provider.dart | 5 +++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/pages/app.dart b/lib/pages/app.dart index ff60517..1c856b8 100644 --- a/lib/pages/app.dart +++ b/lib/pages/app.dart @@ -100,9 +100,7 @@ class _AppPageState extends State { bool isVersionDetectionStandard = app?.app.additionalSettings['versionDetection'] == true; - bool installedVersionIsEstimate = trackOnly || - (app?.app.installedVersion != null && - app?.app.additionalSettings['versionDetection'] != true); + bool installedVersionIsEstimate = app?.app != null ? isVersionPseudo(app!.app) : false; if (app != null && !_wasWebViewOpened) { _wasWebViewOpened = true; diff --git a/lib/pages/apps.dart b/lib/pages/apps.dart index 0725830..e4ee468 100644 --- a/lib/pages/apps.dart +++ b/lib/pages/apps.dart @@ -447,7 +447,7 @@ class AppsPageState extends State { } getVersionText(int appIndex) { - return '${listedApps[appIndex].app.installedVersion ?? tr('notInstalled')}${listedApps[appIndex].app.additionalSettings['trackOnly'] == true ? ' ${tr('pseudoVersion')}' : ''}'; + return listedApps[appIndex].app.installedVersion ?? tr('notInstalled'); } getChangesButtonString(int appIndex, bool hasChangeLogFn) { @@ -503,7 +503,10 @@ class AppsPageState extends State { MediaQuery.of(context).size.width / 4), child: Text(getVersionText(index), overflow: TextOverflow.ellipsis, - textAlign: TextAlign.end)), + textAlign: TextAlign.end, + style: isVersionPseudo(listedApps[index].app) + ? TextStyle(fontStyle: FontStyle.italic) + : null)), ]), Row( mainAxisSize: MainAxisSize.min, diff --git a/lib/providers/source_provider.dart b/lib/providers/source_provider.dart index 0f08d78..1555074 100644 --- a/lib/providers/source_provider.dart +++ b/lib/providers/source_provider.dart @@ -940,6 +940,11 @@ List> filterApks( return apkUrls; } +isVersionPseudo(App app) => + app.additionalSettings['trackOnly'] == true || + (app.installedVersion != null && + app.additionalSettings['versionDetection'] != true); + class SourceProvider { // Add more source classes here so they are available via the service List get sources => [