Typo: 'Installed' not 'Updated' (#1469) + Bugfix: Don't incorrectly show message when user cancels

This commit is contained in:
Imran Remtulla
2024-03-17 04:01:09 -04:00
parent 3943caeedb
commit e95f575530
2 changed files with 13 additions and 6 deletions

View File

@@ -361,6 +361,9 @@ class _AppPageState extends State<AppPage> {
!areDownloadsRunning
? () async {
try {
var successMessage = app?.app.installedVersion == null
? tr('installed')
: tr('appsUpdated');
HapticFeedback.heavyImpact();
var res = await appsProvider.downloadAndInstallLatestApps(
app?.app.id != null ? [app!.app.id] : [],
@@ -368,7 +371,7 @@ class _AppPageState extends State<AppPage> {
);
if (res.isNotEmpty && !trackOnly) {
// ignore: use_build_context_synchronously
showMessage(tr('appsUpdated'), context);
showMessage(successMessage, context);
}
if (res.isNotEmpty && mounted) {
Navigator.of(context).pop();