// SPDX-License-Identifier: AGPL-3.0-or-later import styles from '@app/features/channel/components/active_now/ActiveNowSidebar.module.css'; import {useActiveFriendVoiceStates} from '@app/features/channel/components/active_now/useActiveFriendVoiceStates'; import {ACTIVE_NOW_DESCRIPTOR} from '@app/features/i18n/utils/CommonMessageDescriptors'; import {VoiceActivityCard} from '@app/features/user/components/profile/VoiceActivityCard'; import PrivacyPreferences from '@app/features/user/state/PrivacyPreferences'; import {msg} from '@lingui/core/macro'; import {useLingui} from '@lingui/react/macro'; import {observer} from 'mobx-react-lite'; const IT_S_QUIET_FOR_NOW_DESCRIPTOR = msg({ message: "It's quiet for now...", comment: 'Label in the channel and chat active now sidebar.', }); const WHEN_FRIENDS_ARE_ACTIVE_IN_VOICE_CHANNELS_THEIR_DESCRIPTOR = msg({ message: 'When friends are active in voice channels, their activity will appear here.', comment: 'Description text in the channel and chat active now sidebar.', }); export const ActiveNowSidebar: React.FC = observer(function ActiveNowSidebar() { const {i18n} = useLingui(); const showActiveNow = PrivacyPreferences.getShowActiveNow(); const activeChannels = useActiveFriendVoiceStates(); if (!showActiveNow) { return null; } return ( ); });