From 90ac16854b98dac6c8a41fed8bff010dcd505e1b Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 16 Sep 2022 13:59:50 -0500 Subject: [PATCH] Add `data-event-id` to `AnnouncementView` so it appears for state events in the timeline Follow-up to https://github.com/vector-im/hydrogen-web/pull/690 Split off from https://github.com/vector-im/hydrogen-web/pull/653 --- .../web/ui/session/room/timeline/AnnouncementView.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/platform/web/ui/session/room/timeline/AnnouncementView.js b/src/platform/web/ui/session/room/timeline/AnnouncementView.js index 5ae92daa..8b68d33b 100644 --- a/src/platform/web/ui/session/room/timeline/AnnouncementView.js +++ b/src/platform/web/ui/session/room/timeline/AnnouncementView.js @@ -22,8 +22,11 @@ export class AnnouncementView extends TemplateView { super(vm); } - render(t) { - return t.li({className: "AnnouncementView"}, t.div(vm => vm.announcement)); + render(t, vm) { + return t.li({ + className: "AnnouncementView", + 'data-event-id': vm.eventId + }, t.div(vm => vm.announcement)); } /* This is called by the parent ListView, which just has 1 listener for the whole list */