Unlabs feature pinning (#22)

This commit is contained in:
Florian Duros 2024-09-16 16:51:59 +02:00 committed by GitHub
parent 74885c942f
commit 59852773ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 166 additions and 99 deletions

View file

@ -26,7 +26,6 @@ import { EchoChamber } from "../../../stores/local-echo/EchoChamber";
import { RoomNotifState } from "../../../RoomNotifs";
import Modal from "../../../Modal";
import ExportDialog from "../dialogs/ExportDialog";
import { useFeatureEnabled } from "../../../hooks/useSettings";
import { RightPanelPhases } from "../../../stores/right-panel/RightPanelStorePhases";
import { RoomSettingsTab } from "../dialogs/RoomSettingsDialog";
import { useEventEmitterState } from "../../../hooks/useEventEmitter";
@ -261,11 +260,10 @@ const RoomContextMenu: React.FC<IProps> = ({ room, onFinished, ...props }) => {
);
}
const pinningEnabled = useFeatureEnabled("feature_pinning");
const pinCount = usePinnedEvents(pinningEnabled ? room : undefined)?.length;
const pinCount = usePinnedEvents(room).length;
let pinsOption: JSX.Element | undefined;
if (pinningEnabled && !isVideoRoom) {
if (!isVideoRoom) {
pinsOption = (
<IconizedContextMenuOption
onClick={(ev: ButtonEvent) => {