chore: Replace copy action with pin event action in UI

This commit is contained in:
Christian Kußowski 2025-11-21 09:13:07 +01:00
commit a8bcf12763
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -52,11 +52,10 @@ class ChatView extends StatelessWidget {
onPressed: () => controller
.enterThread(controller.selectedEvents.single.eventId),
),
if (controller.canPinSelectedEvents)
IconButton(
icon: const Icon(Icons.push_pin_outlined),
onPressed: controller.pinEvent,
tooltip: L10n.of(context).pinMessage,
icon: const Icon(Icons.copy_outlined),
tooltip: L10n.of(context).copyToClipboard,
onPressed: controller.copyEventsAction,
),
if (controller.canRedactSelectedEvents)
IconButton(
@ -79,15 +78,16 @@ class ChatView extends StatelessWidget {
}
},
itemBuilder: (context) => [
if (controller.canPinSelectedEvents)
PopupMenuItem(
onTap: controller.copyEventsAction,
onTap: controller.pinEvent,
value: null,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.copy_outlined),
const Icon(Icons.push_pin_outlined),
const SizedBox(width: 12),
Text(L10n.of(context).copy),
Text(L10n.of(context).pinMessage),
],
),
),