0.1.3-rc.11 • Published 1 year ago

react-native-truesight-chat v0.1.3-rc.11

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-native-truesight-chat

Build react native truesight app chat for Truesight team.

Installation

npm install react-native-truesight-chat

or

yarn add react-native-truesight-chat
yarn add react-native-permission react-native-spinkit @react-native-community/cameraroll react-native-blob-util react-native-reanimated@2.4.1

react-native-permission

  • Camera
  • PhotoLibrary
  • PhotoLibraryAddOnly
  • MediaLibrary
  • Notifications

react-native.config.ts

    'react-native-truesight-chat': {
          platforms: {
            android: null,
            ios: null,
          },
    },

Usage

Define a config TruesightChat with following properies as such:

PropertyTypeDescription
serverUrl
atomicStyles
listConversation
countConversation
listConversationMessage
countConversationMessage
listConversationAttachment
countConversationAttachment
multiUploadFile
create
singleListGlobalUser

Example:

TruesightChat.config({
  serverUrl: server.serverUrl,
  atomicStyles: atomicStyles,
  listConversation: conversationRepository.list,
  countConversation: conversationRepository.count,
  listConversationMessage: conversationMessageRepository.list,
  countConversationMessage: conversationMessageRepository.count,
  listConversationAttachment:
    conversationMessageRepository.listConversationAttachment,
  countConversationAttachment:
    conversationMessageRepository.countConversationAttachment,
  multiUploadFile: conversationRepository.multiUploadFile,
  create: conversationMessageRepository.create,
  singleListGlobalUser: conversationRepository.singleListGlobalUser,
});

ConversationFlatList extends FlatListProps

Define a list conversation style with following properies as such:

<ConversationFlatList
        navigation={navigation}
        target={ConversationChatScreen.displayName}
      />
PropertyTypeDescription
listarray
totalnumber
loadingboolean
refreshingboolean
onLoadMore() => void
errorstring
listHeaderComponentStyleStyleSheet
styleStyleSheet
renderItemReactElement
itemStyleStyleSheet

ConversationChat extends FlatListProps

Define a conversation chat style with following properies as such:

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT