make relatedEvent store a rowId

This commit is contained in:
Henry Hiles 2026-09-29 15:17:35 -04:00
commit 9bc2d9955a
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
4 changed files with 30 additions and 15 deletions

View file

@ -22,7 +22,7 @@ extension BuildEventOptions on Event {
required WidgetRef ref,
required String roomId,
required String userId,
required void Function(Event, RelationType) onRelation,
required void Function(int, RelationType) onRelation,
}) {
final theme = Theme.of(context);
final danger = theme.colorScheme.error;
@ -150,7 +150,7 @@ extension BuildEventOptions on Event {
),
))
PopupMenuItem(
onTap: () => onRelation(this, .reply),
onTap: () => onRelation(rowId, .reply),
child: const ListTile(
leading: Icon(Icons.reply),
title: Text("Reply"),
@ -159,7 +159,7 @@ extension BuildEventOptions on Event {
if (content is MessageContent && sender == userId)
PopupMenuItem(
onTap: () => onRelation(this, .edit),
onTap: () => onRelation(rowId, .edit),
child: const ListTile(leading: Icon(Icons.edit), title: Text("Edit")),
),