Commit 9a7ae5e 1 parent b9740e2 commit 9a7ae5e Copy full SHA for 9a7ae5e
File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -153,10 +153,14 @@ class AutoBannerState extends State<AutoBanner> {
153
153
return Container ();
154
154
}
155
155
list ?? = AnnouncementRepository .getInstance ().getBannerExtras ();
156
- // Only update if list is null
156
+ // Only update if list is null. And if the update fails, return nil
157
157
if (list == null && ! updateBannerList ()) {
158
158
return Container ();
159
159
}
160
+ // If the list is empty (i.e. no banner), return nil
161
+ if (list! .isEmpty) {
162
+ return Container (); // FIXME: using `nil` here will break the layout. Don't know why.
163
+ }
160
164
161
165
// Since the banner is not a fixed size, we need to use [SizedByChildBuilder]
162
166
// to get the height of the banner. Otherwise, [Swiper] will have infinite
You can’t perform that action at this time.
0 commit comments