mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-21 14:26:35 +01:00
chore: cleanup (#1565)
This commit is contained in:
@@ -20,10 +20,7 @@ import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Animated,
|
||||
Dimensions,
|
||||
Easing,
|
||||
PixelRatio,
|
||||
Platform,
|
||||
ScrollView,
|
||||
View,
|
||||
} from "react-native";
|
||||
@@ -83,22 +80,6 @@ export const Home = () => {
|
||||
const _invalidateCache = useInvalidatePlaybackProgressCache();
|
||||
const { showItemActions } = useTVItemActionModal();
|
||||
|
||||
// Log TV viewport dimensions for DPI scaling debug
|
||||
useEffect(() => {
|
||||
const w = Dimensions.get("window");
|
||||
const s = Dimensions.get("screen");
|
||||
console.log("========== TV DIMENSIONS ==========");
|
||||
console.log("Platform.OS:", Platform.OS, "isTV:", Platform.isTV);
|
||||
console.log("Window:", w.width, "x", w.height);
|
||||
console.log("Screen:", s.width, "x", s.height);
|
||||
console.log("PixelRatio:", PixelRatio.get());
|
||||
console.log(
|
||||
"scaleSize(210):",
|
||||
210 * Math.min(w.width / 1920, w.height / 1080),
|
||||
);
|
||||
console.log("====================================");
|
||||
}, []);
|
||||
|
||||
// Dynamic backdrop state with debounce
|
||||
const [focusedItem, setFocusedItem] = useState<BaseItemDto | null>(null);
|
||||
const debounceTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
|
||||
@@ -246,7 +246,7 @@ export const TVLogin: React.FC = () => {
|
||||
setCurrentScreen("user-selection");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("[TVLogin] Error in handleConnect:", error);
|
||||
if (__DEV__) console.error("[TVLogin] Error in handleConnect:", error);
|
||||
}
|
||||
},
|
||||
[checkUrl, setServer, serverName, setSelectedTVServer],
|
||||
@@ -485,10 +485,11 @@ export const TVLogin: React.FC = () => {
|
||||
});
|
||||
}
|
||||
} catch (saveError) {
|
||||
console.error(
|
||||
"[TVLogin] Failed to save pairing credential:",
|
||||
saveError,
|
||||
);
|
||||
if (__DEV__)
|
||||
console.error(
|
||||
"[TVLogin] Failed to save pairing credential:",
|
||||
saveError,
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
const message =
|
||||
@@ -589,7 +590,7 @@ export const TVLogin: React.FC = () => {
|
||||
pairingCode,
|
||||
handlePairingCredentials,
|
||||
(error) => {
|
||||
console.error("[TVLogin] Pairing error:", error);
|
||||
if (__DEV__) console.error("[TVLogin] Pairing error:", error);
|
||||
setShowPairingQR(false);
|
||||
Alert.alert(t("login.error_title"), t("companion_login.error_generic"));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user