Skip to content

Commit 7d9981e

Browse files
authored
Ensure sent markers are hidden when showing thread summary. (#31076)
* Ensure read markers are hidden when showing thread summary. * lint * update screenshot
1 parent 1d20a4c commit 7d9981e

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

playwright/e2e/threads/threads.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ test.describe("Threads", () => {
445445
await expect(locator.locator(".mx_EventTile").last().getByText("Hello Mr. User")).toBeAttached();
446446
});
447447

448-
test("navigate through right panel", async ({ page, app, user }) => {
448+
test("navigate through right panel", { tag: "@screenshot" }, async ({ page, app, user }) => {
449449
// Create room
450450
const roomId = await app.client.createRoom({});
451451
await page.goto("/#/room/" + roomId);
@@ -497,6 +497,9 @@ test.describe("Threads", () => {
497497
await expect(
498498
threadPanel.locator(".mx_EventTile_last").getByText("Hello again Mr. User in a thread"),
499499
).toBeVisible();
500+
await expect(threadPanel).toMatchScreenshot("thread-panel.png", {
501+
css: ".mx_MessageTimestamp { visibility: hidden !important; }",
502+
});
500503

501504
const rightPanel = page.locator(".mx_RightPanel");
502505
// Check that the threads are listed
17 KB
Loading

src/components/views/rooms/EventTile.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,9 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
360360
// We only show the 'sent' receipt on the last successful event.
361361
if (!this.props.lastSuccessful) return false;
362362

363+
// Don't show this in the thread view as it conflicts with the thread counter.
364+
if (this.context.timelineRenderingType === TimelineRenderingType.ThreadsList) return false;
365+
363366
// Check to make sure the sending state is appropriate. A null/undefined send status means
364367
// that the message is 'sent', so we're just double checking that it's explicitly not sent.
365368
if (this.props.eventSendStatus && this.props.eventSendStatus !== EventStatus.SENT) return false;

0 commit comments

Comments
 (0)