Skip to content

Commit

Permalink
Update style when selected msg
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored and hoangdat committed Sep 7, 2023
1 parent 854753c commit 83a5af6
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions lib/pages/chat/events/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ class Message extends StatelessWidget {
if (ownMessage) _menuActionsRowBuilder(context, ownMessage),
Container(
alignment: alignment,
padding: const EdgeInsets.only(left: 8),
padding: EdgeInsetsDirectional.only(
start: 8,
end: selected || controller.responsive.isDesktop(context)
? 8
: 0,
),
child: Material(
color: Colors.transparent,
borderRadius: MessageStyle.bubbleBorderRadius,
Expand Down Expand Up @@ -540,12 +545,15 @@ class Message extends StatelessWidget {
onTap: () =>
controller.selectMode ? onSelect!(event) : null,
child: Center(
child: Padding(
child: Container(
margin: EdgeInsetsDirectional.only(
start: selected ? 0.0 : 8.0,
),
padding: EdgeInsets.only(
left: selected ? 0 : 8.0,
right: selected
? 0
: ownMessage
: ownMessage ||
controller.responsive.isDesktop(context)
? 8.0
: 16.0,
top: selected ? 0 : 1.0,
Expand Down Expand Up @@ -630,7 +638,6 @@ class Message extends StatelessWidget {
return Container(
padding: EdgeInsets.symmetric(
vertical: selected ? 1 : 0,
horizontal: selected ? 8 : 0,
),
color: selected
? LinagoraSysColors.material().secondaryContainer
Expand All @@ -644,7 +651,11 @@ class Message extends StatelessWidget {
Align(
alignment: AlignmentDirectional.centerStart,
child: Padding(
padding: const EdgeInsets.only(right: 18),
padding: EdgeInsetsDirectional.only(
start: (selected || controller.responsive.isDesktop(context))
? 16
: 8,
),
child: Icon(
selected ? Icons.check_circle_rounded : Icons.circle_outlined,
color: selected
Expand Down

0 comments on commit 83a5af6

Please sign in to comment.