fix: tv home screen navigation (#732)

This commit is contained in:
lance chant
2025-06-02 15:15:31 +02:00
committed by GitHub
parent f9f21606ff
commit f0519ea88d

View File

@@ -36,6 +36,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { import {
ActivityIndicator, ActivityIndicator,
Platform,
RefreshControl, RefreshControl,
ScrollView, ScrollView,
TouchableOpacity, TouchableOpacity,
@@ -87,6 +88,12 @@ export const HomeIndex = () => {
const { downloadedFiles, cleanCacheDirectory } = useDownload(); const { downloadedFiles, cleanCacheDirectory } = useDownload();
useEffect(() => { useEffect(() => {
if (Platform.isTV) {
navigation.setOptions({
headerLeft: () => null,
});
return;
}
const hasDownloads = downloadedFiles && downloadedFiles.length > 0; const hasDownloads = downloadedFiles && downloadedFiles.length > 0;
navigation.setOptions({ navigation.setOptions({
headerLeft: () => ( headerLeft: () => (