fix: Username not visible after edit events

This commit is contained in:
krille-chan 2023-07-16 15:06:20 +09:00
parent 82f4c326b4
commit a06b3e6a9e
No known key found for this signature in database

View file

@ -77,13 +77,14 @@ class Message extends StatelessWidget {
nextEvent == null || nextEvent == null ||
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs); !event.originServerTs.sameEnvironment(nextEvent!.originServerTs);
final sameSender = nextEvent != null && final sameSender = nextEvent != null &&
[ [
EventTypes.Message, EventTypes.Message,
EventTypes.Sticker, EventTypes.Sticker,
EventTypes.Encrypted, EventTypes.Encrypted,
].contains(nextEvent!.type) ].contains(nextEvent!.type) &&
? nextEvent!.senderId == event.senderId && !displayTime nextEvent?.relationshipType == null &&
: false; nextEvent!.senderId == event.senderId &&
!displayTime;
final textColor = ownMessage final textColor = ownMessage
? Theme.of(context).colorScheme.onPrimary ? Theme.of(context).colorScheme.onPrimary
: Theme.of(context).colorScheme.onBackground; : Theme.of(context).colorScheme.onBackground;