Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit f5aab67

Browse files
committed
Sort the pinning message list in the same order than the banner
1 parent d16ab09 commit f5aab67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/views/right_panel/PinnedMessagesCard.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { filterBoolean } from "../../../utils/arrays";
3434
import Modal from "../../../Modal";
3535
import { UnpinAllDialog } from "../dialogs/UnpinAllDialog";
3636
import EmptyState from "./EmptyState";
37-
import { useFetchedPinnedEvents, usePinnedEvents, useReadPinnedEvents } from "../../../hooks/usePinnedEvents";
37+
import { usePinnedEvents, useReadPinnedEvents, useSortedFetchedPinnedEvents } from "../../../hooks/usePinnedEvents";
3838

3939
/**
4040
* List the pinned messages in a room inside a Card.
@@ -59,7 +59,7 @@ export function PinnedMessagesCard({ room, onClose, permalinkCreator }: PinnedMe
5959
const roomContext = useRoomContext();
6060
const pinnedEventIds = usePinnedEvents(room);
6161
const readPinnedEvents = useReadPinnedEvents(room);
62-
const pinnedEvents = useFetchedPinnedEvents(room, pinnedEventIds);
62+
const pinnedEvents = useSortedFetchedPinnedEvents(room, pinnedEventIds);
6363

6464
useEffect(() => {
6565
if (!cli || cli.isGuest()) return; // nothing to do

0 commit comments

Comments
 (0)