From b4e8d47d9aee3a71818b8a0457d46c37cd6af828 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 10 May 2022 23:49:03 +1000 Subject: [PATCH] Prevent notification requests if server is not connected --- lib/widget/home.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/widget/home.dart b/lib/widget/home.dart index 23153a89..64c566de 100644 --- a/lib/widget/home.dart +++ b/lib/widget/home.dart @@ -180,6 +180,10 @@ class _InvenTreeHomePageState extends State { */ Future _refreshNotifications() async { + if (!InvenTreeAPI().isConnected()) { + return; + } + final notifications = await InvenTreeNotification().list(); setState(() {