Skip to content

v2.2.0

Choose a tag to compare

@demchenkoalex demchenkoalex released this 17 May 14:11
· 105 commits to main since this release

2.2.0

⚠️ Breaking Changes ⚠️

  • ChatAnimatedList Redesign:
    • Significantly overhauled for robust handling of asynchronous controller updates.
    • The update operation (ChatOperation.update) now requires the index of the message to be updated.
  • CRITICAL: When implementing custom ChatControllers, you MUST now fetch the most up-to-date message instance from your data source before passing it to remove or update operations. The internal list now relies on the exact object reference. Failing to do so will lead to errors or unexpected behavior. (See InMemoryChatController for an example of fetching the actual message before emitting ChatOperation.remove or ChatOperation.update).

✨ Key Enhancements & Fixes ✨

  • Asynchronous Operations: ChatAnimatedList now uses an internal operation queue to serialize updates, preventing race conditions and resolving prior StreamOperation issues.
  • List Factorization: Common logic between normal and reversed ChatAnimatedList instances has been factorized, improving maintainability.
  • Bulk Insertions: Added insertAllMessages to ChatController and ChatAnimatedList for efficient bulk message additions with animations.
  • Diffing & Stability: ChatController's setMessages now uses an improved DiffUtil (with move support), fixing "out of bounds" errors during complex list updates.
  • Data Consistency: The controller now fetches the latest message version before updates or deletions to ensure operations use current data.
  • Bug Fixes:
    • Corrected message insertion position in reversed lists (#754, #755).
    • Ensured message update operations are correctly persisted (#778).
  • Testing: Introduced integration tests for ChatAnimatedList to validate list operations and item positioning.

  • FIX: update operation not persisted in the list (#778). (37472015)
  • FEAT: Fix StreamOperation Async issues / create insertAll / fixInsert on reverted list (#756). (60395f9b)

2.1.3

  • FIX: hide attachmentButton if no there is no onAttachmentTap provided (#757). (2eae2002)

2.1.2

  • FIX: add audio message type. (8d2b705a)

2.1.1

  • FIX: add video message type. (93a13840)