chore: Make message bubble color dark also in dark mode

This commit is contained in:
krille-chan 2024-12-16 16:18:05 +01:00
commit 7b1d46aa18
No known key found for this signature in database
2 changed files with 16 additions and 5 deletions

View file

@ -106,8 +106,11 @@ class Message extends StatelessWidget {
previousEvent!.senderId == event.senderId &&
previousEvent!.originServerTs.sameEnvironment(event.originServerTs);
final textColor =
ownMessage ? theme.colorScheme.onPrimary : theme.colorScheme.onSurface;
final textColor = ownMessage
? theme.brightness == Brightness.light
? theme.colorScheme.onPrimary
: theme.colorScheme.onPrimaryContainer
: theme.colorScheme.onSurface;
final rowMainAxisAlignment =
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
@ -141,7 +144,9 @@ class Message extends StatelessWidget {
if (ownMessage) {
color = displayEvent.status.isError
? Colors.redAccent
: theme.colorScheme.primary;
: theme.brightness == Brightness.light
? theme.colorScheme.primary
: theme.colorScheme.primaryContainer;
}
final resetAnimateIn = this.resetAnimateIn;