From 72db893979e81ae7eccbcf4e2d3c052a75288cb5 Mon Sep 17 00:00:00 2001 From: Naveen Singh <36371707+naveensingh@users.noreply.github.com> Date: Wed, 24 Sep 2025 14:26:34 +0530 Subject: [PATCH] fix: correct contact photo retrieval in call history (#586) Refs: https://github.com/FossifyOrg/Phone/issues/585 --- CHANGELOG.md | 3 +++ app/src/main/kotlin/org/fossify/phone/helpers/RecentsHelper.kt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26fb2dd6..11ae25dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Fixed wrong contact photo in call history for some contacts ([#585]) ## [1.7.1] - 2025-09-12 ### Changed @@ -196,6 +198,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#535]: https://github.com/FossifyOrg/Phone/issues/535 [#543]: https://github.com/FossifyOrg/Phone/issues/543 [#565]: https://github.com/FossifyOrg/Phone/issues/565 +[#585]: https://github.com/FossifyOrg/Phone/issues/585 [Unreleased]: https://github.com/FossifyOrg/Phone/compare/1.7.1...HEAD [1.7.1]: https://github.com/FossifyOrg/Phone/compare/1.7.0...1.7.1 diff --git a/app/src/main/kotlin/org/fossify/phone/helpers/RecentsHelper.kt b/app/src/main/kotlin/org/fossify/phone/helpers/RecentsHelper.kt index ae6ac06b..a8a85920 100644 --- a/app/src/main/kotlin/org/fossify/phone/helpers/RecentsHelper.kt +++ b/app/src/main/kotlin/org/fossify/phone/helpers/RecentsHelper.kt @@ -220,7 +220,7 @@ class RecentsHelper(private val context: Context) { if (contactPhotosMap.containsKey(number)) { photoUri = contactPhotosMap[number]!! } else { - val contact = contacts.firstOrNull { it.doesContainPhoneNumber(number) } + val contact = contacts.firstOrNull { it.doesHavePhoneNumber(number) } if (contact != null) { photoUri = contact.photoUri contactPhotosMap[number] = contact.photoUri