Prevent notification requests if server is not connected

This commit is contained in:
Oliver Walters committed 2022-05-10 23:49:03 +10:00
1 parent 23a27fde67
commit b4e8d47d9a
1 file changed
+4
+4
View File
@@ -180,6 +180,10 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
*/
Future<void> _refreshNotifications() async {
if (!InvenTreeAPI().isConnected()) {
return;
}
final notifications = await InvenTreeNotification().list();
setState(() {