Reverse pinned message list (#19)
This commit is contained in:
parent
85b4f17a56
commit
f31776378d
3 changed files with 5 additions and 6 deletions
|
@ -156,7 +156,7 @@ function PinnedMessages({ events, room, permalinkCreator }: PinnedMessagesProps)
|
||||||
})}
|
})}
|
||||||
role="list"
|
role="list"
|
||||||
>
|
>
|
||||||
{events.reverse().map((event, i) => (
|
{events.map((event, i) => (
|
||||||
<>
|
<>
|
||||||
<PinnedEventTile
|
<PinnedEventTile
|
||||||
key={event.getId()}
|
key={event.getId()}
|
||||||
|
|
|
@ -190,7 +190,6 @@ describe("<PinnedMessagesCard />", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should show two pinned messages", async () => {
|
it("should show two pinned messages", async () => {
|
||||||
//const room = mkRoom([pin1], [pin2]);
|
|
||||||
const { asFragment } = await initPinnedMessagesCard([pin1], [pin2]);
|
const { asFragment } = await initPinnedMessagesCard([pin1], [pin2]);
|
||||||
|
|
||||||
expect(screen.queryAllByRole("listitem")).toHaveLength(2);
|
expect(screen.queryAllByRole("listitem")).toHaveLength(2);
|
||||||
|
|
|
@ -184,7 +184,7 @@ exports[`<PinnedMessagesCard /> should show two pinned messages 1`] = `
|
||||||
class="mx_EventTile_body translate"
|
class="mx_EventTile_body translate"
|
||||||
dir="auto"
|
dir="auto"
|
||||||
>
|
>
|
||||||
First pinned message
|
The second one
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -250,7 +250,7 @@ exports[`<PinnedMessagesCard /> should show two pinned messages 1`] = `
|
||||||
class="mx_EventTile_body translate"
|
class="mx_EventTile_body translate"
|
||||||
dir="auto"
|
dir="auto"
|
||||||
>
|
>
|
||||||
The second one
|
First pinned message
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -379,7 +379,7 @@ exports[`<PinnedMessagesCard /> unpin all should not allow to unpinall 1`] = `
|
||||||
class="mx_EventTile_body translate"
|
class="mx_EventTile_body translate"
|
||||||
dir="auto"
|
dir="auto"
|
||||||
>
|
>
|
||||||
First pinned message
|
The second one
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -445,7 +445,7 @@ exports[`<PinnedMessagesCard /> unpin all should not allow to unpinall 1`] = `
|
||||||
class="mx_EventTile_body translate"
|
class="mx_EventTile_body translate"
|
||||||
dir="auto"
|
dir="auto"
|
||||||
>
|
>
|
||||||
The second one
|
First pinned message
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue