From e5aadcb2032b373e0160ad2bdb7e6b45fac3c25c Mon Sep 17 00:00:00 2001 From: Septicity Date: Mon, 6 Apr 2026 16:17:33 -0500 Subject: [PATCH] fix: Re-introduce timeline regrouping for PMP messages after sticky scroll fix --- src/app/features/room/message/Message.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index 98e7e927a..053c5a17e 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -386,9 +386,9 @@ function MessageInternal( useEffect(() => { const triggerTimelineRegroup = () => { - room.emit(RoomEvent.Timeline, mEvent, room, false, false, { - liveEvent: true, - } as IRoomTimelineData); + // A Local Echo update seems to trigger a visual refresh without + // scrolling the viewport. + room.emit(RoomEvent.LocalEchoUpdated, mEvent, room); }; const onUpdate = () => { @@ -396,6 +396,11 @@ function MessageInternal( triggerTimelineRegroup(); }; + if (mEvent.getClearContent()) { + setContentVersion((v) => (v === 0 ? 1 : v)); + triggerTimelineRegroup(); + } + mEvent.on(MatrixEventEvent.Decrypted, onUpdate); mEvent.on(MatrixEventEvent.Replaced, onUpdate); return () => {