Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Show name of contact instead of email in file info of an incoming shared photo if the contact it assinged to a person

ashilkn8370cf44b5ca
diff --git a/mobile/lib/ui/viewer/file_details/added_by_widget.dart b/mobile/lib/ui/viewer/file_details/added_by_widget.dart
index 3f82c51132..12f9a0a528 100644
--- a/mobile/lib/ui/viewer/file_details/added_by_widget.dart
+++ b/mobile/lib/ui/viewer/file_details/added_by_widget.dart
@@ -1,4 +1,5 @@
import "package:flutter/material.dart";
+import "package:photos/extensions/user_extension.dart";
import "package:photos/generated/l10n.dart";
import "package:photos/models/file/extensions/file_props.dart";
import 'package:photos/models/file/file.dart';
@@ -26,7 +27,7 @@ class AddedByWidget extends StatelessWidget {
} else {
final fileOwner = CollectionsService.instance
.getFileOwner(file.ownerID!, file.collectionID);
- addedBy = fileOwner.email;
+ addedBy = fileOwner.displayName ?? fileOwner.email;
}
if (addedBy == null || addedBy.isEmpty) {
return const SizedBox.shrink();