From 3940b65156a7bd43f8fab82153c6010c544ce1f7 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Wed, 24 Jan 2024 19:49:07 -0500 Subject: [PATCH] De-emphasize 'reset install status' button to avoid confusion --- lib/pages/app.dart | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/lib/pages/app.dart b/lib/pages/app.dart index bc0c6ec..fe1f5d5 100644 --- a/lib/pages/app.dart +++ b/lib/pages/app.dart @@ -347,18 +347,6 @@ class _AppPageState extends State { } } - getResetInstallStatusButton() => TextButton( - onPressed: app?.app == null || updating - ? null - : () { - app!.app.installedVersion = null; - appsProvider.saveApps([app.app]); - }, - child: Text( - tr('resetInstallStatus'), - textAlign: TextAlign.center, - )); - getInstallOrUpdateButton() => TextButton( onPressed: !updating && (app?.app.installedVersion == null || @@ -458,14 +446,20 @@ class _AppPageState extends State { }, icon: const Icon(Icons.more_horiz), tooltip: tr('more')), + if ((!isVersionDetectionStandard || trackOnly) && + app?.app.installedVersion != null && + app?.app.installedVersion == app?.app.latestVersion) + IconButton( + onPressed: app?.app == null || updating + ? null + : () { + app!.app.installedVersion = null; + appsProvider.saveApps([app.app]); + }, + icon: const Icon(Icons.restore_rounded), + tooltip: tr('resetInstallStatus')), const SizedBox(width: 16.0), - Expanded( - child: (!isVersionDetectionStandard || trackOnly) && - app?.app.installedVersion != null && - app?.app.installedVersion == - app?.app.latestVersion - ? getResetInstallStatusButton() - : getInstallOrUpdateButton()), + Expanded(child: getInstallOrUpdateButton()), const SizedBox(width: 16.0), IconButton( onPressed: app?.downloadProgress != null || updating