Skip to content

Commit 1cf55f8

Browse files
chore: 🔖 Version Bump 3.1.0
1 parent 87a37e4 commit 1cf55f8

4 files changed

Lines changed: 30 additions & 27 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [Unreleased]
1+
## 3.1.0
22

33
* **Fix**: [423](https://github.com/SimformSolutionsPvtLtd/chatview/pull/423)
44
Rendering issue in attached image preview when sending message on web.

lib/src/widgets/chat_bubble_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class _ChatBubbleWidgetState extends State<ChatBubbleWidget> {
166166
bottom: (featureActiveConfig?.enableMessageGrouping ?? true) &&
167167
!widget.isLastInGroup
168168
? (featureActiveConfig?.messageGroupSpacing ??
169-
messageGroupDefaultSpacing)
169+
messageGroupDefaultSpacing)
170170
: 10.0,
171171
),
172172
child: Row(

lib/src/widgets/chat_groupedlist_widget.dart

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -396,27 +396,29 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
396396
?.repliedMsgAutoScrollConfig
397397
.enableScrollToRepliedMsg ??
398398
false;
399-
// ListView is reversed: index 0 = newest (bottom).
400-
// isLastInGroup → avatar shown (newest in group, visually bottom).
401-
// isFirstInGroup → name shown (oldest in group, visually top).
402-
//
403-
// Edited messages show an "Edited" label ABOVE the bubble,
404-
// creating a visual break only on the top side. So:
405-
// • isFirstInGroup=true when THIS message is edited
406-
// (Edited label above → detach from older message above).
407-
// • isLastInGroup=true when the NEWER/below neighbor is
408-
// edited (that neighbor's Edited label visually separates
409-
// it from the current message below).
410-
// The connection below the edited message is preserved so
411-
// messages sent after it stay grouped with it.
412-
final prevMessage =
413-
newIndex > 0 ? messages[newIndex - 1] : null;
414-
final isLastInGroup = newIndex == 0 ||
415-
!_isSameGroup(message, messages[newIndex - 1]) ||
416-
(prevMessage?.updatedAt != null);
417-
final isFirstInGroup = newIndex == messages.length - 1 ||
418-
!_isSameGroup(message, messages[newIndex + 1]) ||
419-
message.updatedAt != null; return ChatBubbleWidget(
399+
// ListView is reversed: index 0 = newest (bottom).
400+
// isLastInGroup → avatar shown (newest in group, visually bottom).
401+
// isFirstInGroup → name shown (oldest in group, visually top).
402+
//
403+
// Edited messages show an "Edited" label ABOVE the bubble,
404+
// creating a visual break only on the top side. So:
405+
// • isFirstInGroup=true when THIS message is edited
406+
// (Edited label above → detach from older message above).
407+
// • isLastInGroup=true when the NEWER/below neighbor is
408+
// edited (that neighbor's Edited label visually separates
409+
// it from the current message below).
410+
// The connection below the edited message is preserved so
411+
// messages sent after it stay grouped with it.
412+
final prevMessage =
413+
newIndex > 0 ? messages[newIndex - 1] : null;
414+
final isLastInGroup = newIndex == 0 ||
415+
!_isSameGroup(message, messages[newIndex - 1]) ||
416+
(prevMessage?.updatedAt != null);
417+
final isFirstInGroup = newIndex ==
418+
messages.length - 1 ||
419+
!_isSameGroup(message, messages[newIndex + 1]) ||
420+
message.updatedAt != null;
421+
return ChatBubbleWidget(
420422
key: messageKey,
421423
message: message,
422424
slideAnimation: _slideAnimation,
@@ -430,8 +432,9 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
430432
shouldHighlight: state == message.id,
431433
onReplyTap: enableScrollToRepliedMsg
432434
? (id) => _onReplyTap(id, messages)
433-
: null,isFirstInGroup: isFirstInGroup,
434-
isLastInGroup: isLastInGroup,
435+
: null,
436+
isFirstInGroup: isFirstInGroup,
437+
isLastInGroup: isLastInGroup,
435438
);
436439
},
437440
);

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: chatview
22
description: A Flutter package that allows you to integrate Chat View with highly customization options.
3-
version: 3.0.0
3+
version: 3.1.0
44
issue_tracker: https://github.com/SimformSolutionsPvtLtd/chatview/issues
55
repository: https://github.com/SimformSolutionsPvtLtd/chatview
66

@@ -19,7 +19,7 @@ dependencies:
1919
any_link_preview: 3.0.3
2020
audio_waveforms: 2.0.2
2121
cached_network_image: 3.4.1
22-
chatview_utils: 3.0.0
22+
chatview_utils: 3.1.0
2323

2424
emoji_picker_flutter: 4.4.0
2525
flutter:

0 commit comments

Comments
 (0)