Skip to content

armgit / ente

Public Imported from GitHub
0

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

Avoid reordering selected faces

ashilknf9b3f6e9eb2b
diff --git a/mobile/lib/ui/viewer/search/result/people_section_all_page.dart b/mobile/lib/ui/viewer/search/result/people_section_all_page.dart
index 0522d6a2f1..a24e02d63b 100644
--- a/mobile/lib/ui/viewer/search/result/people_section_all_page.dart
+++ b/mobile/lib/ui/viewer/search/result/people_section_all_page.dart
@@ -1,6 +1,5 @@
import "dart:async";
-import "package:collection/collection.dart";
import 'package:flutter/material.dart';
import "package:flutter_animate/flutter_animate.dart";
import "package:photos/events/event.dart";
@@ -121,18 +120,6 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {
((crossAxisCount - 1) * gridPadding))) /
crossAxisCount;
- List<GenericSearchResult> data = results;
-
- if (widget.namedOnly && widget.selectedPeople != null) {
- data = data.sorted(
- (a, b) => widget.selectedPeople!.isPersonSelected(
- (b.hierarchicalSearchFilter as FaceFilter).personId!,
- )
- ? 1
- : -1,
- );
- }
-
return GridView.builder(
padding: const EdgeInsets.fromLTRB(
horizontalEdgePadding,
@@ -151,7 +138,7 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {
itemCount: results.length,
itemBuilder: (context, index) {
return PersonSearchExample(
- searchResult: data[index],
+ searchResult: results[index],
size: itemSize,
selectedPeople: widget.selectedPeople,
)