Minor UI tweak (pseudo-version in italics on apps page instead of readout)

This commit is contained in:
Imran Remtulla
2025-05-30 22:29:32 -04:00
parent 798bddd17f
commit 3edaa143e4
3 changed files with 11 additions and 5 deletions

View File

@ -100,9 +100,7 @@ class _AppPageState extends State<AppPage> {
bool isVersionDetectionStandard = bool isVersionDetectionStandard =
app?.app.additionalSettings['versionDetection'] == true; app?.app.additionalSettings['versionDetection'] == true;
bool installedVersionIsEstimate = trackOnly || bool installedVersionIsEstimate = app?.app != null ? isVersionPseudo(app!.app) : false;
(app?.app.installedVersion != null &&
app?.app.additionalSettings['versionDetection'] != true);
if (app != null && !_wasWebViewOpened) { if (app != null && !_wasWebViewOpened) {
_wasWebViewOpened = true; _wasWebViewOpened = true;

View File

@ -447,7 +447,7 @@ class AppsPageState extends State<AppsPage> {
} }
getVersionText(int appIndex) { 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) { getChangesButtonString(int appIndex, bool hasChangeLogFn) {
@ -503,7 +503,10 @@ class AppsPageState extends State<AppsPage> {
MediaQuery.of(context).size.width / 4), MediaQuery.of(context).size.width / 4),
child: Text(getVersionText(index), child: Text(getVersionText(index),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
textAlign: TextAlign.end)), textAlign: TextAlign.end,
style: isVersionPseudo(listedApps[index].app)
? TextStyle(fontStyle: FontStyle.italic)
: null)),
]), ]),
Row( Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

View File

@ -940,6 +940,11 @@ List<MapEntry<String, String>> filterApks(
return apkUrls; return apkUrls;
} }
isVersionPseudo(App app) =>
app.additionalSettings['trackOnly'] == true ||
(app.installedVersion != null &&
app.additionalSettings['versionDetection'] != true);
class SourceProvider { class SourceProvider {
// Add more source classes here so they are available via the service // Add more source classes here so they are available via the service
List<AppSource> get sources => [ List<AppSource> get sources => [