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 =
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;

View File

@ -447,7 +447,7 @@ class AppsPageState extends State<AppsPage> {
}
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<AppsPage> {
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,

View File

@ -940,6 +940,11 @@ List<MapEntry<String, String>> 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<AppSource> get sources => [