mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Prevent notification requests if server is not connected
This commit is contained in:
parent
23a27fde67
commit
b4e8d47d9a
1 changed files with 4 additions and 0 deletions
|
|
@ -180,6 +180,10 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||||
*/
|
*/
|
||||||
Future<void> _refreshNotifications() async {
|
Future<void> _refreshNotifications() async {
|
||||||
|
|
||||||
|
if (!InvenTreeAPI().isConnected()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final notifications = await InvenTreeNotification().list();
|
final notifications = await InvenTreeNotification().list();
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue