Skip to content

Commit cf58c8c

Browse files
committed
chore: improve CHANGELOG
1 parent 3427412 commit cf58c8c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

packages/flutter_chat_ui/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
## 2.2.0
22

3+
**⚠️ Breaking Changes ⚠️**
4+
5+
- **`ChatAnimatedList` Redesign**:
6+
- Significantly overhauled for robust handling of asynchronous controller updates.
7+
- The `update` operation (`ChatOperation.update`) now requires the `index` of the message to be updated.
8+
- **CRITICAL**: When implementing custom `ChatController`s, 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`).
9+
10+
**✨ Key Enhancements & Fixes ✨**
11+
12+
- **Asynchronous Operations**: `ChatAnimatedList` now uses an internal operation queue to serialize updates, preventing race conditions and resolving prior `StreamOperation` issues.
13+
- **List Factorization**: Common logic between normal and reversed `ChatAnimatedList` instances has been factorized, improving maintainability.
14+
- **Bulk Insertions**: Added `insertAllMessages` to `ChatController` and `ChatAnimatedList` for efficient bulk message additions with animations.
15+
- **Diffing & Stability**: `ChatController`'s `setMessages` now uses an improved `DiffUtil` (with move support), fixing "out of bounds" errors during complex list updates.
16+
- **Data Consistency**: The controller now fetches the latest message version before updates or deletions to ensure operations use current data.
17+
- **Bug Fixes**:
18+
- Corrected message insertion position in reversed lists ([#754](https://github.com/flyerhq/flutter_chat_ui/issues/754), [#755](https://github.com/flyerhq/flutter_chat_ui/issues/755)).
19+
- Ensured message update operations are correctly persisted ([#778](https://github.com/flyerhq/flutter_chat_ui/issues/778)).
20+
- **Testing**: Introduced integration tests for `ChatAnimatedList` to validate list operations and item positioning.
21+
22+
---
23+
324
- **FIX**: update operation not persisted in the list ([#778](https://github.com/flyerhq/flutter_chat_ui/issues/778)). ([37472015](https://github.com/flyerhq/flutter_chat_ui/commit/374720152912648643c03f761b0a27eafcf0a46f))
425
- **FEAT**: Fix StreamOperation Async issues / create insertAll / fixInsert on reverted list ([#756](https://github.com/flyerhq/flutter_chat_ui/issues/756)). ([60395f9b](https://github.com/flyerhq/flutter_chat_ui/commit/60395f9ba97ac4b8000aea70c7040d55bb40b6aa))
526

0 commit comments

Comments
 (0)