React-native-gifted-chat: Feature Request: Disable avatars?

Created on 23 Nov 2016  路  6Comments  路  Source: FaridSafi/react-native-gifted-chat

I don't need avatars for my use case. The most immediate way to do so seemed returning null from renderAvatar. However, this messes up the styles. avatars or showAvatars prop might be handy.
simulator screen shot nov 23 2016 4 11 47 pm

Most helpful comment

This is happening as a consequence that this piece of code used to avoid render the avatar in consecutive messages of an user in the same day (but keeping the gap/alignment).

In fact, as we can see in your attached picture, the last message (which doesn't have nextMessage) is using given renderAvatar function.

I think that needs a refactorization. If I find some free time, and if nobody make it before, I'll try to fix it and make a PR.

All 6 comments

On another note, why is Avatar rendered if I had renderAvatar={() => null} on the component

This is happening as a consequence that this piece of code used to avoid render the avatar in consecutive messages of an user in the same day (but keeping the gap/alignment).

In fact, as we can see in your attached picture, the last message (which doesn't have nextMessage) is using given renderAvatar function.

I think that needs a refactorization. If I find some free time, and if nobody make it before, I'll try to fix it and make a PR.

Mmm, I'm not sure right now, but reviewing https://github.com/FaridSafi/react-native-gifted-chat/pull/234 it seems that could solve this.

The option to disable avatars and initials would be really helpful...I also don't need it in my app.

Not able to resolve the problem.
renderAvatar={() => null} does not work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cerberusv2px picture cerberusv2px  路  3Comments

inceptivetech picture inceptivetech  路  3Comments

luisar picture luisar  路  3Comments

tafelito picture tafelito  路  3Comments

maharjanaman picture maharjanaman  路  3Comments