Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Make merge clearer

laurenspriem53cb48b87ca4
diff --git a/mobile/lib/ui/viewer/people/add_person_action_sheet.dart b/mobile/lib/ui/viewer/people/add_person_action_sheet.dart
index 0e134ca70c..187cfa8c76 100644
--- a/mobile/lib/ui/viewer/people/add_person_action_sheet.dart
+++ b/mobile/lib/ui/viewer/people/add_person_action_sheet.dart
@@ -222,8 +222,7 @@ class _PersonActionSheetState extends State<PersonActionSheet> {
child: Padding(
padding: const EdgeInsets.only(right: 12),
child: ListView.separated(
- itemCount:
- searchResults.length + (shouldShowAddPerson ? 1 : 0),
+ itemCount: searchResults.length + 1,
itemBuilder: (context, index) {
if (index == 0 && shouldShowAddPerson) {
return GestureDetector(
@@ -238,8 +237,21 @@ class _PersonActionSheetState extends State<PersonActionSheet> {
},
);
}
- final person =
- searchResults[index - (shouldShowAddPerson ? 1 : 0)];
+ if (index == 0 && !shouldShowAddPerson) {
+ return Padding(
+ padding: const EdgeInsets.fromLTRB(0, 8, 0, 16),
+ child: Center(
+ child: Text(
+ "Merge with existing",
+ style: getEnteTextTheme(context).body.copyWith(
+ color:
+ getEnteColorScheme(context).textMuted,
+ ),
+ ),
+ ),
+ );
+ }
+ final person = searchResults[index - 1];
return PersonRowItem(
person: person.$1,
personFile: person.$2,