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

Commit

Permalink
Sort the pinning message list in the same order than the banner
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Aug 29, 2024
1 parent d16ab09 commit f5aab67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/views/right_panel/PinnedMessagesCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { filterBoolean } from "../../../utils/arrays";
import Modal from "../../../Modal";
import { UnpinAllDialog } from "../dialogs/UnpinAllDialog";
import EmptyState from "./EmptyState";
import { useFetchedPinnedEvents, usePinnedEvents, useReadPinnedEvents } from "../../../hooks/usePinnedEvents";
import { usePinnedEvents, useReadPinnedEvents, useSortedFetchedPinnedEvents } from "../../../hooks/usePinnedEvents";

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

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

0 comments on commit f5aab67

Please sign in to comment.