Rename loadIconAsync to loadIcon as it's no longer guaranteed to be called off the main thread
This commit is contained in:
@@ -48,7 +48,7 @@ class Contact(
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun loadIconAsync(context: Context, size: Int): LauncherIcon? {
|
||||
override suspend fun loadIcon(context: Context, size: Int): LauncherIcon? {
|
||||
val contentResolver = context.contentResolver
|
||||
val uri = ContactsContract.Contacts.getLookupUri(id, lookupKey) ?: return null
|
||||
val bmp = ContactsContract.Contacts.openContactPhotoInputStream(contentResolver, uri, false)
|
||||
|
||||
Reference in New Issue
Block a user