【问题标题】:React Native Gifted Chat: Hide other user's avatarReact Native Gifted Chat:隐藏其他用户的头像
【发布时间】:2020-11-23 03:25:17
【问题描述】:

有没有办法隐藏其他用户的头像以响应原生天才聊天?我知道您可以隐藏当前用户的头像,但我无法为其他用户找到它。

【问题讨论】:

    标签: react-native-gifted-chat


    【解决方案1】:

    您可以在 renderAvatar 属性中重写将返回 null 的 Avatar 组件。

    例如:

    <CustomGiftedChat
          messages={messages}
          renderAvatar={() => null}
          onSend={this.onSend}
          user={{
            _id: 1,
          }}
        />
    

    【讨论】:

      猜你喜欢
      • 2021-12-08
      • 1970-01-01
      • 2020-11-21
      • 1970-01-01
      • 1970-01-01
      • 2021-02-12
      • 2021-10-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多