mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-30 20:36:29 +01:00
chore: remove debug console.log statements from providers and layout
This commit is contained in:
@@ -253,22 +253,19 @@ function Layout() {
|
|||||||
deviceId: getOrSetDeviceId(),
|
deviceId: getOrSetDeviceId(),
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
})
|
})
|
||||||
.then((_) => console.log("Posted expo push token"))
|
|
||||||
.catch((_) =>
|
.catch((_) =>
|
||||||
writeErrorLog("Failed to push expo push token to plugin"),
|
writeErrorLog("Failed to push expo push token to plugin"),
|
||||||
);
|
);
|
||||||
} else console.log("No token available");
|
}
|
||||||
}, [api, expoPushToken, user]);
|
}, [api, expoPushToken, user]);
|
||||||
|
|
||||||
const registerNotifications = useCallback(async () => {
|
const registerNotifications = useCallback(async () => {
|
||||||
if (Platform.OS === "android") {
|
if (Platform.OS === "android") {
|
||||||
console.log("Setting android notification channel 'default'");
|
|
||||||
await Notifications?.setNotificationChannelAsync("default", {
|
await Notifications?.setNotificationChannelAsync("default", {
|
||||||
name: "default",
|
name: "default",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create dedicated channel for download notifications
|
// Create dedicated channel for download notifications
|
||||||
console.log("Setting android notification channel 'downloads'");
|
|
||||||
await Notifications?.setNotificationChannelAsync("downloads", {
|
await Notifications?.setNotificationChannelAsync("downloads", {
|
||||||
name: "Downloads",
|
name: "Downloads",
|
||||||
importance: Notifications.AndroidImportance.DEFAULT,
|
importance: Notifications.AndroidImportance.DEFAULT,
|
||||||
|
|||||||
@@ -34,13 +34,6 @@ export function ServerUrlProvider({ children }: Props): React.ReactElement {
|
|||||||
const { switchServerUrl } = useJellyfin();
|
const { switchServerUrl } = useJellyfin();
|
||||||
const { ssid, permissionStatus } = useWifiSSID();
|
const { ssid, permissionStatus } = useWifiSSID();
|
||||||
|
|
||||||
console.log(
|
|
||||||
"[ServerUrlProvider] ssid:",
|
|
||||||
ssid,
|
|
||||||
"permissionStatus:",
|
|
||||||
permissionStatus,
|
|
||||||
);
|
|
||||||
|
|
||||||
const [isUsingLocalUrl, setIsUsingLocalUrl] = useState(false);
|
const [isUsingLocalUrl, setIsUsingLocalUrl] = useState(false);
|
||||||
const [effectiveServerUrl, setEffectiveServerUrl] = useState<string | null>(
|
const [effectiveServerUrl, setEffectiveServerUrl] = useState<string | null>(
|
||||||
null,
|
null,
|
||||||
@@ -76,13 +69,6 @@ export function ServerUrlProvider({ children }: Props): React.ReactElement {
|
|||||||
|
|
||||||
const targetUrl = shouldUseLocal ? config!.localUrl : remoteUrl;
|
const targetUrl = shouldUseLocal ? config!.localUrl : remoteUrl;
|
||||||
|
|
||||||
console.log("[ServerUrlProvider] evaluateAndSwitchUrl:", {
|
|
||||||
ssid,
|
|
||||||
shouldUseLocal,
|
|
||||||
targetUrl,
|
|
||||||
config,
|
|
||||||
});
|
|
||||||
|
|
||||||
switchServerUrl(targetUrl);
|
switchServerUrl(targetUrl);
|
||||||
setIsUsingLocalUrl(shouldUseLocal);
|
setIsUsingLocalUrl(shouldUseLocal);
|
||||||
setEffectiveServerUrl(targetUrl);
|
setEffectiveServerUrl(targetUrl);
|
||||||
@@ -90,7 +76,6 @@ export function ServerUrlProvider({ children }: Props): React.ReactElement {
|
|||||||
|
|
||||||
// Manual refresh function for when config changes
|
// Manual refresh function for when config changes
|
||||||
const refreshUrlState = useCallback(() => {
|
const refreshUrlState = useCallback(() => {
|
||||||
console.log("[ServerUrlProvider] refreshUrlState called");
|
|
||||||
evaluateAndSwitchUrl();
|
evaluateAndSwitchUrl();
|
||||||
}, [evaluateAndSwitchUrl]);
|
}, [evaluateAndSwitchUrl]);
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ export const WebSocketProvider = ({ children }: WebSocketProviderProps) => {
|
|||||||
const reconnectDelay = 10000;
|
const reconnectDelay = 10000;
|
||||||
|
|
||||||
newWebSocket.onopen = () => {
|
newWebSocket.onopen = () => {
|
||||||
console.log("WebSocket connection opened");
|
|
||||||
setIsConnected(true);
|
setIsConnected(true);
|
||||||
reconnectAttemptsRef.current = 0;
|
reconnectAttemptsRef.current = 0;
|
||||||
keepAliveInterval = setInterval(() => {
|
keepAliveInterval = setInterval(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user