This commit is contained in:
sarendsen
2025-01-06 14:28:24 +01:00
parent 5055a700c9
commit 74ce9d7eea
6 changed files with 10 additions and 8 deletions

View File

@@ -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();
};

View File

@@ -1 +1,2 @@
export * from "expo-screen-orientation";
console.log("LOADED");

View File

@@ -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.