Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Rename

laurenspriem3d906490a6e4
diff --git a/mobile/lib/ui/viewer/search_tab/people_section.dart b/mobile/lib/ui/viewer/search_tab/people_section.dart
index 0daff83d15..69281561ae 100644
--- a/mobile/lib/ui/viewer/search_tab/people_section.dart
+++ b/mobile/lib/ui/viewer/search_tab/people_section.dart
@@ -23,23 +23,22 @@ import 'package:photos/ui/viewer/search/result/search_section_all_page.dart';
import "package:photos/ui/viewer/search/search_section_cta.dart";
import "package:photos/utils/navigation_util.dart";
-class SearchSection extends StatefulWidget {
- final SectionType sectionType;
+class PeopleSection extends StatefulWidget {
+ final SectionType sectionType = SectionType.face;
final List<SearchResult> examples;
final int limit;
- const SearchSection({
+ const PeopleSection({
Key? key,
- required this.sectionType,
required this.examples,
- required this.limit,
+ this.limit = 7,
}) : super(key: key);
@override
- State<SearchSection> createState() => _SearchSectionState();
+ State<PeopleSection> createState() => _PeopleSectionState();
}
-class _SearchSectionState extends State<SearchSection> {
+class _PeopleSectionState extends State<PeopleSection> {
late List<SearchResult> _examples;
final streamSubscriptions = <StreamSubscription>[];
@@ -71,7 +70,7 @@ class _SearchSectionState extends State<SearchSection> {
}
@override
- void didUpdateWidget(covariant SearchSection oldWidget) {
+ void didUpdateWidget(covariant PeopleSection oldWidget) {
super.didUpdateWidget(oldWidget);
_examples = widget.examples;
}
diff --git a/mobile/lib/ui/viewer/search_tab/search_tab.dart b/mobile/lib/ui/viewer/search_tab/search_tab.dart
index 61bbb31569..427b705835 100644
--- a/mobile/lib/ui/viewer/search_tab/search_tab.dart
+++ b/mobile/lib/ui/viewer/search_tab/search_tab.dart
@@ -114,10 +114,9 @@ class _AllSearchSectionsState extends State<AllSearchSections> {
itemBuilder: (context, index) {
switch (searchTypes[index]) {
case SectionType.face:
- return SearchSection(
- sectionType: SectionType.face,
- examples: snapshot.data!.elementAt(index),
- limit: 7,
+ return PeopleSection(
+ examples: snapshot.data!.elementAt(index)
+ as List<GenericSearchResult>,
);
case SectionType.album:
// return const SizedBox.shrink();