chore: Follow up select events

This commit is contained in:
Krille 2023-12-27 16:15:11 +01:00
commit 7e4775d8df
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -451,13 +451,12 @@ class Message extends StatelessWidget {
), ),
if (hovered || selected) if (hovered || selected)
Positioned( Positioned(
left: ownMessage ? 4 : null, left: 4,
right: ownMessage ? null : 4,
bottom: 4, bottom: 4,
child: Material( child: Material(
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.surfaceVariant .background
.withOpacity(0.9), .withOpacity(0.9),
elevation: Theme.of(context) elevation: Theme.of(context)
.appBarTheme .appBarTheme
@ -469,7 +468,20 @@ class Message extends StatelessWidget {
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
IconButton(
icon: Icon(
selected
? Icons.check_circle
: longPressSelect
? Icons.check_circle_outlined
: Icons.check_circle_outlined,
size: 16,
),
tooltip: L10n.of(context)!.select,
onPressed: () => onSelect(event),
),
if (hovered) ...[ if (hovered) ...[
if (event.room.canSendDefaultMessages)
IconButton( IconButton(
icon: const Icon( icon: const Icon(
Icons.reply_outlined, Icons.reply_outlined,
@ -479,18 +491,6 @@ class Message extends StatelessWidget {
onPressed: () => onSwipe(), onPressed: () => onSwipe(),
), ),
], ],
IconButton(
icon: Icon(
selected
? Icons.check_circle
: longPressSelect
? Icons.check_circle_outlined
: Icons.menu,
size: 16,
),
tooltip: L10n.of(context)!.select,
onPressed: () => onSelect(event),
),
], ],
), ),
), ),