From 62dc7fd88bd471ad8f4d5ce310f18590887237cf Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sat, 20 Jan 2024 16:18:19 -0500 Subject: [PATCH] Bugfix: don't show 'Apps Updated' toast when nothing was updated (#1307) --- lib/pages/app.dart | 2 +- lib/pages/apps.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/app.dart b/lib/pages/app.dart index ab957e7..a11f650 100644 --- a/lib/pages/app.dart +++ b/lib/pages/app.dart @@ -361,7 +361,7 @@ class _AppPageState extends State { app?.app.id != null ? [app!.app.id] : [], globalNavigatorKey.currentContext, ); - if (app?.app.installedVersion != null && !trackOnly) { + if (res.isNotEmpty && !trackOnly) { // ignore: use_build_context_synchronously showMessage(tr('appsUpdated'), context); } diff --git a/lib/pages/apps.dart b/lib/pages/apps.dart index 894dc8c..0472143 100644 --- a/lib/pages/apps.dart +++ b/lib/pages/apps.dart @@ -696,7 +696,7 @@ class AppsPageState extends State { showError(e, context); return []; }).then((value) { - if (shouldInstallUpdates) { + if (value.isNotEmpty && shouldInstallUpdates) { showMessage(tr('appsUpdated'), context); } });