Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added onAvatarPress #264

Closed
wants to merge 4 commits into from
Closed

Conversation

SunnyGurnani
Copy link
Contributor

GiftedAvatar already had onPress but was not being utilized. Added onAvatarPress () function.

@@ -118,7 +118,7 @@ See [example/App.js](example/App.js)
- **`renderSend`** _(Function)_ - render the send button
- **`renderAccessory`** _(Function)_ - renders a second line of actions below the message composer
- **`bottomOffset`** _(Integer)_ - distance of the chat from the bottom of the screen, useful if you display a tab bar

- **`onAvatarPress`** _(Function)_ - Called when Avatar is presses
Copy link
Contributor

@dgdavid dgdavid Oct 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that you have a typo on «presses». It should be «pressed».

Copy link
Contributor

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to combine the commits squashing them

@benjaminb10
Copy link

+1

Copy link
Collaborator

@cooperka cooperka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great @SunnyGurnani! Could you please rebase so we can merge it?

@@ -27,6 +27,7 @@ export default class Avatar extends React.Component {
<View style={[styles[this.props.position].container, this.props.containerStyle[this.props.position]]}>
<GiftedAvatar
avatarStyle={StyleSheet.flatten([styles[this.props.position].image, this.props.imageStyle[this.props.position]])}
onPress={this.props.onAvatarPress}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't want onPress here because this is actually a blank avatar that isn't visible.

@cooperka
Copy link
Collaborator

This PR can be closed in favor of #427 (rebased).

@kfiroo kfiroo closed this Apr 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants