feat: add MobileVoiceJoinSheet bottom sheet for voice preview

This commit is contained in:
Jannis Braun
2026-03-23 20:59:26 +01:00
parent acf6f6fe99
commit 8aa66816d8
2 changed files with 217 additions and 0 deletions
@@ -16,7 +16,9 @@ import { TransferOwnershipModal } from '../modals/TransferOwnershipModal';
import { MobileFolderSheet } from './MobileFolderSheet';
import { useInstanceStore } from '../../stores/instanceStore';
import { VoiceUserRow } from '../voice/VoiceUserRow';
import { MobileVoiceJoinSheet } from '../voice/MobileVoiceJoinSheet';
import { buildVoiceModMenuItems, VolumeSliderItem } from '../voice/voiceMenuItems';
import { joinVoiceChannel } from '../../utils/voice';
type ResolvedItem =
| { type: 'space'; space: TaggedSpace }
@@ -192,6 +194,12 @@ export function MobileSpacesScreen() {
});
};
const handleVoiceJoin = useCallback((chId: string, _preMuted: boolean) => {
joinVoiceChannel(chId);
setVoiceJoinChannelId(null);
pushMobileScreen('voice');
}, [pushMobileScreen]);
const toggleCategory = (categoryId: string) => {
setCollapsedCategories(prev => {
const next = new Set(prev);
@@ -908,6 +916,16 @@ export function MobileSpacesScreen() {
/>
);
})()}
{voiceJoinChannelId && selectedSpaceId && (
<MobileVoiceJoinSheet
channelId={voiceJoinChannelId}
channelName={channels.find(c => c.id === voiceJoinChannelId)?.name || ''}
spaceId={selectedSpaceId}
onClose={() => setVoiceJoinChannelId(null)}
onJoin={handleVoiceJoin}
/>
)}
</div>
);
}