Skip to content

imageStyle passed in renderAvatar doesn't apply to avatar placeholder #2646

@Eonsinde

Description

@Eonsinde
Image Image

You can see the placeholder being rendered when the Avatar shouldn't be displayed. In the second image, I used the Expo Inspector to highlight the placeholder for proper clarity and context

I tried to override it using the renderAvatar method, but realised that method is only called when isSameUser && isSameDay === false(i.e the first Message component of a given thread or the last Message component affected by the value given to the renderAvatarOnTop prop)

Image

I've tried every workaround possible, all to no avail. That damned placeholder will always be rendered for each Message component where the renderAvatar isn't called. Please help resolve. The issue is stemming from the fact that Gifted Chat internally renders the default placeholder(36x36 pixels) in the Message component anytime the isSameThread condition is true(i.e the First Message in a given thread). The only solution at the moment is to leave the size of the Avatar's image the same as the default placeholder(36x36 pixels)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions