Skip to content

Commit

Permalink
TW-2169 added avatar and name for sender messages in web
Browse files Browse the repository at this point in the history
  • Loading branch information
KhaledNjim committed Dec 9, 2024
1 parent 9fa59f7 commit ddd99b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/pages/chat/events/message/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ class _MessageState extends State<Message> {
return const SizedBox();
}

if (sameSender && !ownMessage) {
if (sameSender &&
(!ownMessage || !Message.responsiveUtils.isMobile(context))) {
return Padding(
padding: MessageStyle.paddingAvatar,
child: FutureBuilder<User?>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ class MessageContentWithTimestampBuilder extends StatelessWidget {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
event.hideDisplayName(nextEvent) ||
event.hideDisplayNameInBubbleChat
event.hideDisplayName(nextEvent)
? const SizedBox()
: DisplayNameWidget(
event: event,
Expand Down
1 change: 0 additions & 1 deletion lib/utils/matrix_sdk_extensions/event_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ extension LocalizedBody on Event {
}.contains(messageType);

bool hideDisplayName(Event? nextEvent) =>
isOwnMessage ||
room.isDirectChat ||
!isSameSenderWith(nextEvent) ||
type == EventTypes.Encrypted;
Expand Down

0 comments on commit ddd99b4

Please sign in to comment.