From 0bea79e6547a77f76c8dd717b62bd2185d068d82 Mon Sep 17 00:00:00 2001 From: Suhas Dissanayake Date: Sun, 12 May 2024 20:30:49 +0530 Subject: [PATCH] fix: contact photo and name not loading due to missing return statement --- .../contacts/domain/repositories/PhoneLookupRepository.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/bnyro/contacts/domain/repositories/PhoneLookupRepository.kt b/app/src/main/java/com/bnyro/contacts/domain/repositories/PhoneLookupRepository.kt index 5d5fefe4..d25a1e4a 100644 --- a/app/src/main/java/com/bnyro/contacts/domain/repositories/PhoneLookupRepository.kt +++ b/app/src/main/java/com/bnyro/contacts/domain/repositories/PhoneLookupRepository.kt @@ -111,14 +111,13 @@ class PhoneLookupRepository(private val context: Context) { query?.use { cursor -> if (cursor.moveToFirst()) { - BasicContactData( + return@withContext BasicContactData( number = phoneNumber, name = cursor.stringValue( PhoneLookup.DISPLAY_NAME ), thumbnail = cursor.stringValue(PhoneLookup.PHOTO_THUMBNAIL_URI)?.toUri() ) - } } BasicContactData(