From 8ef494a8027e7fe3fdc769005b2bdf741f21cd32 Mon Sep 17 00:00:00 2001 From: Codel1417 Date: Thu, 5 Dec 2024 20:10:27 -0500 Subject: [PATCH] resolve tail blog exception if gear connects before blog loads --- lib/Frontend/Widgets/tail_blog.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Frontend/Widgets/tail_blog.dart b/lib/Frontend/Widgets/tail_blog.dart index 0c80fb49..61dd03d6 100644 --- a/lib/Frontend/Widgets/tail_blog.dart +++ b/lib/Frontend/Widgets/tail_blog.dart @@ -164,13 +164,13 @@ class _TailBlogState extends State { } } } - if (mounted && context.mounted && results.isNotEmpty) { + if (mounted && context.mounted) { setState(() { - feedState = FeedState.loaded; - }); - } else if (context.mounted) { - setState(() { - feedState = FeedState.error; + if (results.isNotEmpty) { + feedState = FeedState.loaded; + } else { + feedState = FeedState.error; + } }); } }