diff --git a/app/(auth)/(tabs)/(home)/index.tsx b/app/(auth)/(tabs)/(home)/index.tsx index 98c1603d..2f74e55e 100644 --- a/app/(auth)/(tabs)/(home)/index.tsx +++ b/app/(auth)/(tabs)/(home)/index.tsx @@ -69,9 +69,9 @@ export default function index() { const insets = useSafeAreaInsets(); - if (!Platform.isTV) { - const { downloadedFiles, cleanCacheDirectory } = useDownload(); + const { downloadedFiles, cleanCacheDirectory } = useDownload(); + if (!Platform.isTV) { useEffect(() => { const hasDownloads = downloadedFiles && downloadedFiles.length > 0; navigation.setOptions({ @@ -91,6 +91,12 @@ export default function index() { ), }); }, [downloadedFiles, navigation, router]); + + useEffect(() => { + cleanCacheDirectory().catch((e) => + console.error("Something went wrong cleaning cache directory") + ); + }, []); } const checkConnection = useCallback(async () => { @@ -111,11 +117,6 @@ export default function index() { setIsConnected(state.isConnected); }); - if (!Platform.isTV) { - cleanCacheDirectory().catch((e) => - console.error("Something went wrong cleaning cache directory") - ); - } return () => { unsubscribe(); }; diff --git a/components/ContextMenu.native.ts b/components/ContextMenu.tv.ts similarity index 100% rename from components/ContextMenu.native.ts rename to components/ContextMenu.tv.ts diff --git a/components/DropdownMenu.native.ts b/components/DropdownMenu.tv.ts similarity index 100% rename from components/DropdownMenu.native.ts rename to components/DropdownMenu.tv.ts diff --git a/packages/expo-haptics.native.ts b/packages/expo-haptics.tv.ts similarity index 100% rename from packages/expo-haptics.native.ts rename to packages/expo-haptics.tv.ts diff --git a/packages/expo-screen-orientation.ts b/packages/expo-screen-orientation.ts index 7b29bfe1..5978df82 100644 --- a/packages/expo-screen-orientation.ts +++ b/packages/expo-screen-orientation.ts @@ -1 +1,2 @@ export * from "expo-screen-orientation"; +console.log("LOADED"); diff --git a/packages/expo-screen-orientation.native.ts b/packages/expo-screen-orientation.tv.ts similarity index 98% rename from packages/expo-screen-orientation.native.ts rename to packages/expo-screen-orientation.tv.ts index b658398b..8bd1d5ca 100644 --- a/packages/expo-screen-orientation.native.ts +++ b/packages/expo-screen-orientation.tv.ts @@ -1,5 +1,5 @@ // export { Orientation, OrientationLock } from "expo-screen-orientation"; - +console.log("NOT"); export enum Orientation { /** * An unknown screen orientation. For example, the device is flat, perhaps on a table.