Skip to content

v5.6.0

Choose a tag to compare

@suraj-chauhan-cometchat suraj-chauhan-cometchat released this 24 Nov 15:42
· 1 commit to v5 since this release
v5.6.0
705b39c

New

  • Added offline support, off by default. Turn it on with offline in UIKitSettings (true, UIKitOfflineSettings or an SDK OfflineConfig). It needs Chat SDK React Native 4.2.1 or later. The peer dependency stays *, and with an older SDK offline stays off.
  • Added cached first paint with offline on, on the message list, threads, conversations, users, groups, group members and banned members, reactions, the notification feed, pinned and saved.
  • Added queued sends with offline on. A message sent offline shows the clock and Not sent yet, and goes out on reconnect. Unsent messages offer only Retry and Delete, and a failed one shows Not sent. Tap to retry.
  • Added the offline states with offline on: Connect to load … for a list with nothing saved, Connect to search for an offline keyword search, and a tappable Connect to load more at a message-list edge. Each loads once by itself on reconnect.
  • Added media from the SDK's cached copy with offline on. Media the device never downloaded shows Available when online, and Download and Share use the saved copy.
  • Added an upload tray that survives leaving the chat and a restart. Interrupted files come back as failed, with Retry.
  • Added the ccMessageSendStateChanged and ccOfflineCacheReset message events, with the MessageSendState, MessageSendStateChangedEvent and OfflineCacheResetEvent types. They are never emitted with offline off.
  • Added hideOfflineNotices on CometChatMessageList and CometChatConversations.
  • Added style tokens in messageListStyles.offlineStyles: failedRowStyle, failedIconStyle, retryTextStyle, notSentYetTextStyle, mediaPlaceholderStyle, footerStyle and noticeStyle.
  • Added offline strings in all 18 locales, with plural forms.
  • Added react-native-fs as an optional peer, used only for playable copies of cached audio and video.

Enhancements

  • Hid presence while the SDK is disconnected, in every list and header, with offline on.

Fixes

  • Fixed Retry on a failed text or custom message doing nothing. A row the server rejected through moderation no longer shows Retry.
  • Fixed an edit landing on the wrong row when two messages had no muid.
  • Fixed the reconnect catch-up re-fetching the same page forever, and never paging when the request limit was not 30.
  • Fixed message-list listeners re-subscribing on every unread-count change, which could miss a connection event.
  • Fixed lists refetching with the request builder of their first render on reconnect.
  • Fixed a failed reaction staying on screen until the next reload.
  • Fixed a jump to a message mixing in an older page that was still loading.
  • Fixed a slow answer for a previous search replacing the new search's results.
  • Fixed the Saved Messages list showing the oldest message first. It now shows the newest message first, as the React UI Kit does.
  • Fixed a failed interactive message (form, card or scheduler) showing a Retry that did nothing.
  • Fixed Download, Open and Share writing outside the Downloads or Documents folder when a file name contained / or ... They now keep only the base name.
  • Fixed Download and Share copying a file:// attachment another user sent. A local file is copied only when it lies inside the SDK's offline media cache, with offline on or off.
  • Fixed the app crashing on iPad when you tap a file or video message. The preview now opens full screen.