diff --git a/components/DownloadItem.tsx b/components/DownloadItem.tsx index f5e6914a..e74f800c 100644 --- a/components/DownloadItem.tsx +++ b/components/DownloadItem.tsx @@ -22,7 +22,7 @@ import { useQuery } from "@tanstack/react-query"; import { router } from "expo-router"; import { useAtom } from "jotai"; import { useCallback, useMemo, useRef, useState } from "react"; -import { TouchableOpacity, View, ViewProps } from "react-native"; +import { Alert, TouchableOpacity, View, ViewProps } from "react-native"; import { AudioTrackSelector } from "./AudioTrackSelector"; import { Bitrate, BitrateSelector } from "./BitrateSelector"; import { Button } from "./Button"; @@ -54,11 +54,14 @@ export const DownloadItem: React.FC = ({ item, ...props }) => { value: undefined, }); + const userCanDownload = useMemo(() => { + return user?.Policy?.EnableContentDownloading; + }, [user]); + /** * Bottom sheet */ const bottomSheetModalRef = useRef(null); - const snapPoints = useMemo(() => ["50%"], []); const handlePresentModalPress = useCallback(() => { bottomSheetModalRef.current?.present(); @@ -286,14 +289,21 @@ export const DownloadItem: React.FC = ({ item, ...props }) => {