Przeglądaj źródła

Enable faces section quick and dirty fix

laurenspriem 1 rok temu
rodzic
commit
ebc69b645e

+ 9 - 0
mobile/lib/ui/viewer/search_tab/search_tab.dart

@@ -18,6 +18,7 @@ import "package:photos/ui/viewer/search_tab/descriptions_section.dart";
 import "package:photos/ui/viewer/search_tab/file_type_section.dart";
 import "package:photos/ui/viewer/search_tab/file_type_section.dart";
 import "package:photos/ui/viewer/search_tab/locations_section.dart";
 import "package:photos/ui/viewer/search_tab/locations_section.dart";
 import "package:photos/ui/viewer/search_tab/moments_section.dart";
 import "package:photos/ui/viewer/search_tab/moments_section.dart";
+import "package:photos/ui/viewer/search_tab/people_section.dart";
 
 
 class SearchTab extends StatefulWidget {
 class SearchTab extends StatefulWidget {
   const SearchTab({Key? key}) : super(key: key);
   const SearchTab({Key? key}) : super(key: key);
@@ -81,7 +82,9 @@ class _AllSearchSectionsState extends State<AllSearchSections> {
     final searchTypes = SectionType.values.toList(growable: true);
     final searchTypes = SectionType.values.toList(growable: true);
     // remove face and content sectionType
     // remove face and content sectionType
     // searchTypes.remove(SectionType.face);
     // searchTypes.remove(SectionType.face);
+    // TODO: re-add album section
     searchTypes.remove(SectionType.content);
     searchTypes.remove(SectionType.content);
+    searchTypes.remove(SectionType.album);
     return Padding(
     return Padding(
       padding: const EdgeInsets.only(top: 8),
       padding: const EdgeInsets.only(top: 8),
       child: Stack(
       child: Stack(
@@ -109,6 +112,12 @@ class _AllSearchSectionsState extends State<AllSearchSections> {
                           snapshot.data!.elementAt(index)
                           snapshot.data!.elementAt(index)
                               as List<AlbumSearchResult>,
                               as List<AlbumSearchResult>,
                         );
                         );
+                      case SectionType.face:
+                        return SearchSection(
+                          sectionType: SectionType.face,
+                          examples: snapshot.data!.elementAt(index),
+                          limit: 7,
+                        );
                       case SectionType.moment:
                       case SectionType.moment:
                         return MomentsSection(
                         return MomentsSection(
                           snapshot.data!.elementAt(index)
                           snapshot.data!.elementAt(index)