chore: Nicer colors for reactions

pull/1646/head
krille-chan 6 days ago
parent dfe6717a29
commit 9ea7d307c2
No known key found for this signature in database

@ -4,6 +4,7 @@ import 'package:collection/collection.dart' show IterableExtension;
import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/future_loading_dialog.dart';
import 'package:fluffychat/widgets/matrix.dart';
@ -111,7 +112,9 @@ class _Reaction extends StatelessWidget {
final theme = Theme.of(context);
final textColor =
theme.brightness == Brightness.dark ? Colors.white : Colors.black;
final color = theme.colorScheme.surface;
final color = reacted == true
? theme.bubbleColor
: theme.colorScheme.surfaceContainerHigh;
Widget content;
if (reactionKey.startsWith('mxc://')) {
content = Row(
@ -144,7 +147,7 @@ class _Reaction extends StatelessWidget {
content = Text(
renderKey.toString() + (count > 1 ? ' $count' : ''),
style: TextStyle(
color: textColor,
color: reacted == true ? theme.onBubbleColor : textColor,
fontSize: DefaultTextStyle.of(context).style.fontSize,
),
);
@ -156,12 +159,6 @@ class _Reaction extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
color: color,
border: Border.all(
width: 1,
color: reacted!
? theme.colorScheme.primary
: theme.colorScheme.primaryContainer,
),
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2),
),
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),

Loading…
Cancel
Save