feat(message-list): add Avatar to MessageListContent#9895
Merged
wmontwe merged 2 commits intothunderbird:mainfrom Oct 17, 2025
Merged
feat(message-list): add Avatar to MessageListContent#9895wmontwe merged 2 commits intothunderbird:mainfrom
wmontwe merged 2 commits intothunderbird:mainfrom
Conversation
c93ebae to
2229c90
Compare
wmontwe
requested changes
Oct 9, 2025
Member
There was a problem hiding this comment.
In contrast to the old image loader, landscapist using coil is able to load the contact picture directly from the contact photo uri.
So instead of handling bitmaps we just need to provide the uri similarly to ContactPhotoLoader.getPhotoUri. Ideally this is either a new method for the ContactRepository or a layer on top that just extracts the photo uri from the contact for a given address.
Instead of reusing the current placeholder, the new design uses two characters from the contact. So the placeholder could be build as composable and avoid the bitmap manipulation.
Box(contentAlignment = Alignment.Center) {
TextTitleSmall(text = monogram)
}
9cdf7f2 to
43fc8d5
Compare
wmontwe
requested changes
Oct 10, 2025
| import net.thunderbird.core.logging.legacy.Log | ||
|
|
||
| internal class ContactPhotoLoader( | ||
| private val contentResolver: ContentResolver, | ||
| private val contactRepository: ContactRepository, | ||
| ) { | ||
| fun loadContactPhoto(emailAddress: String): Bitmap? { | ||
| val photoUri = getPhotoUri(emailAddress) ?: return null | ||
| val photoUri = contactRepository.getPhotoUri(emailAddress = emailAddress) ?: return null |
Member
|
Optional: If you like you could also wire the click handling to trigger the message item selection when the avatar is clicked. |
43fc8d5 to
2c38254
Compare
2c38254 to
f29d9b3
Compare
f29d9b3 to
eb32b47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation Highlights
Contact / Avatar Retrieval
Dependency & Build Updates
Preview / Debug UI
ContactPhotoLoader Cleanup
Adapter / Fragment Wiring
NOTE: This feature is behind feature flag:
use_compose_for_message_list_items.