Disable rooms on mobile temporarily
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user