Add "Copy Text" context menu option

This commit is contained in:
Henry Hiles 2026-09-22 20:18:16 -04:00
commit 8f35ea2435
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -331,6 +331,16 @@ final class const RoomChat({
}, },
child: ListTile(leading: Icon(Icons.link), title: Text("Copy Link")), child: ListTile(leading: Icon(Icons.link), title: Text("Copy Link")),
), ),
if (event.content case MessageContent(:final body?))
PopupMenuItem(
onTap: () async {
await Clipboard.setData(ClipboardData(text: body));
},
child: ListTile(
leading: Icon(Icons.copy),
title: Text("Copy Text"),
),
),
if (ref.watch( if (ref.watch(
PowerLevelController.provider( PowerLevelController.provider(
.redaction(targetUser: event.sender, roomId: roomId), .redaction(targetUser: event.sender, roomId: roomId),