ashilkn 1 год назад
Родитель
Сommit
08634739dc
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      lib/ui/viewer/search/result/search_section_all_page.dart

+ 2 - 3
lib/ui/viewer/search/result/search_section_all_page.dart

@@ -25,7 +25,6 @@ class SearchSectionAllPage extends StatefulWidget {
 
 
 class _SearchSectionAllPageState extends State<SearchSectionAllPage> {
 class _SearchSectionAllPageState extends State<SearchSectionAllPage> {
   late Future<List<SearchResult>> sectionData;
   late Future<List<SearchResult>> sectionData;
-  late final bool _showCTATile;
   final streamSubscriptions = <StreamSubscription>[];
   final streamSubscriptions = <StreamSubscription>[];
 
 
   @override
   @override
@@ -47,7 +46,6 @@ class _SearchSectionAllPageState extends State<SearchSectionAllPage> {
   void didChangeDependencies() {
   void didChangeDependencies() {
     super.didChangeDependencies();
     super.didChangeDependencies();
     sectionData = widget.sectionType.getData(limit: null, context: context);
     sectionData = widget.sectionType.getData(limit: null, context: context);
-    _showCTATile = widget.sectionType.isCTAVisible;
   }
   }
 
 
   @override
   @override
@@ -163,7 +161,8 @@ class _SearchSectionAllPageState extends State<SearchSectionAllPage> {
                       separatorBuilder: (context, index) {
                       separatorBuilder: (context, index) {
                         return const SizedBox(height: 10);
                         return const SizedBox(height: 10);
                       },
                       },
-                      itemCount: sectionResults.length + (_showCTATile ? 1 : 0),
+                      itemCount: sectionResults.length +
+                          (widget.sectionType.isCTAVisible ? 1 : 0),
                       physics: const BouncingScrollPhysics(),
                       physics: const BouncingScrollPhysics(),
                       //This cache extend is needed for creating a new album
                       //This cache extend is needed for creating a new album
                       //using SearchSectionCTATile to work. This is so that
                       //using SearchSectionCTATile to work. This is so that