Skip to content

Commit

Permalink
TW-1542: make message highlight brighter (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlockvn authored Aug 23, 2024
1 parent 7ed3c82 commit a0116d0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/config/themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ abstract class TwakeThemes {
),
),
),
highlightColor: LinagoraRefColors.material().tertiary[80],
colorScheme: ColorScheme.fromSeed(
seedColor: seed ?? AppConfig.colorSchemeSeed,
brightness: brightness,
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/chat/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ class ChatController extends State<Chat>
return eventIndex + addedHeadItemsInChat;
}

Future<void> scrollToEventId(String eventId, {bool highlight = false}) async {
Future<void> scrollToEventId(String eventId, {bool highlight = true}) async {
final eventIndex = timeline!.events.indexWhere((e) => e.eventId == eventId);
if (eventIndex == -1) {
loadTimelineFuture = _getTimeline(eventContextId: eventId).onError(
Expand Down
3 changes: 1 addition & 2 deletions lib/pages/chat/chat_event_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:flutter/material.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:inview_notifier_list/inview_notifier_list.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'package:matrix/matrix.dart';
import 'package:scroll_to_index/scroll_to_index.dart';

Expand Down Expand Up @@ -150,7 +149,7 @@ class ChatEventList extends StatelessWidget {
key: ValueKey(event.eventId),
index: index,
controller: controller.scrollController,
highlightColor: LinagoraRefColors.material().primary[99],
highlightColor: Theme.of(context).highlightColor,
child: event.isVisibleInGui
? Message(
key: ValueKey(event.eventId),
Expand Down
1 change: 1 addition & 0 deletions lib/pages/chat/chat_pinned_events/pinned_events_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ class _PinnedEventsIndicator extends StatelessWidget {
currentEvent.eventId,
),
index: index,
highlightColor: Theme.of(context).highlightColor,
controller: scrollController,
child: Container(
width: PinnedEventsStyle.maxWidthIndicator,
Expand Down
1 change: 1 addition & 0 deletions lib/pages/chat/events/message/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ class _MessageState extends State<Message> {
constraints: BoxConstraints(
maxWidth: ChatViewBodyStyle.chatScreenMaxWidth,
),
padding: MessageStyle.paddingMessage,
alignment: Alignment.bottomCenter,
child: SwipeableMessage(
event: widget.event,
Expand Down
3 changes: 3 additions & 0 deletions lib/pages/chat/events/message/message_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ class MessageStyle {
bottom: 4.0,
);

static EdgeInsets get paddingMessage =>
const EdgeInsets.symmetric(vertical: 2.0);

static EdgeInsets get paddingTimestamp => const EdgeInsets.only(
left: 8.0,
right: 4.0,
Expand Down

0 comments on commit a0116d0

Please sign in to comment.