diff --git a/src/app/components/VoiceRoomItem.svelte b/src/app/components/VoiceRoomItem.svelte index 2fd4f9b7..2ba3edf9 100644 --- a/src/app/components/VoiceRoomItem.svelte +++ b/src/app/components/VoiceRoomItem.svelte @@ -5,6 +5,7 @@ import SecondaryNavItem from "@lib/components/SecondaryNavItem.svelte" import ProfileCircle from "@app/components/ProfileCircle.svelte" import RoomName from "@app/components/RoomName.svelte" + import {isMobileViewport} from "@lib/html" import {pushToast} from "@app/util/toast" import { deriveVoiceParticipants, @@ -26,6 +27,10 @@ let joinAbortController: AbortController | undefined const handleClick = async () => { + if (isMobileViewport()) { + pushToast({theme: "error", message: "Voice rooms are not yet supported on mobile."}) + return + } if (isActive) { await leaveVoiceRoom() return diff --git a/src/lib/html.ts b/src/lib/html.ts index f736178a..255033fe 100644 --- a/src/lib/html.ts +++ b/src/lib/html.ts @@ -80,6 +80,9 @@ export const createScroller = ({ export const isMobile = "ontouchstart" in document.documentElement +// Remove this when we implement voice rooms on mobile +export const isMobileViewport = () => window.innerWidth <= 768 + export const downloadText = (filename: string, text: string) => { const blob = new Blob([text], {type: "text/plain"}) const url = URL.createObjectURL(blob)