[mob][photos] Fallback to using first file as thumbnail for contacts section elements if PersonFaceWidget fails in contact section

This commit is contained in:
ashilkn
2025-02-03 19:43:16 +05:30
parent f69dd18364
commit c96102c2b8
2 changed files with 14 additions and 0 deletions

View File

@@ -108,6 +108,13 @@ class _ContactSearchThumbnailWidgetState
return PersonFaceWidget(
snapshot.data!,
personId: _personID,
onErrorCallback: () {
if (mounted) {
setState(() {
_mostRecentFileOfPerson = null;
});
}
},
);
} else if (snapshot.connectionState == ConnectionState.done &&
snapshot.data == null) {

View File

@@ -213,6 +213,13 @@ class _ContactRecommendationState extends State<ContactRecommendation> {
return PersonFaceWidget(
snapshot.data!,
personId: _personID,
onErrorCallback: () {
if (mounted) {
setState(() {
_mostRecentFileOfPerson = null;
});
}
},
);
} else if (snapshot.connectionState ==
ConnectionState.done &&