1

In my react-native-gifted-chat tick is not showing. New to react so not sure on how to fix this.

  1. the message contains sent: true and recieve:true
  2. using react-native > .61 and react-native-gifted-chat = 0.16.1
  3. renderTicks is not boolean but a function. it just has currentMessage as paramters not even any props.

Do I have to write the ticks manually?

jay
  • 65
  • 1
  • 10

1 Answers1

0

My solution is custom the renderTick, and render it directly in message.

// custom tick
const renderTick = (props) => {
  return (
    <Text>
      {props.currentMessage.isSent && "✓"}
      {props.currentMessage.isReceived && "✓"}
    </Text>
  )
}

And render the message like this:

// Custom message text
const renderMessageText = (props) => (
  <View>
    <Text>
      {props.currentMessage.text}
    </Text>
    renderTick(props)
  </View>
)
Lewis
  • 41
  • 5