Update and expand ways to access pinned messages (#7906)
* Hide pinned messages header button when nothing is pinned Signed-off-by: Robin Townsend <robin@robin.town> * Add pinned messages option to room info panel Signed-off-by: Robin Townsend <robin@robin.town> * Add pinned messages option to room header menu Signed-off-by: Robin Townsend <robin@robin.town> * Make condition more concise Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
parent
33657947d3
commit
464bb727db
6 changed files with 51 additions and 1 deletions
|
@ -82,7 +82,7 @@ const PinnedMessagesHeaderButton = ({ room, isHighlighted, onClick }: IHeaderBut
|
|||
const pinningEnabled = useSettingValue("feature_pinning");
|
||||
const pinnedEvents = usePinnedEvents(pinningEnabled && room);
|
||||
const readPinnedEvents = useReadPinnedEvents(pinningEnabled && room);
|
||||
if (!pinningEnabled) return null;
|
||||
if (!pinnedEvents?.length) return null;
|
||||
|
||||
let unreadIndicator;
|
||||
if (pinnedEvents.some(id => !readPinnedEvents.has(id))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue