From 7f0726017776c27f8050a008446c55781f27432a Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Mon, 3 Mar 2025 15:18:09 +0100 Subject: [PATCH] fix: hide setting (use only vlc3 for now) --- components/settings/OtherSettings.tsx | 70 +++++++-------------------- 1 file changed, 17 insertions(+), 53 deletions(-) diff --git a/components/settings/OtherSettings.tsx b/components/settings/OtherSettings.tsx index b947b9a6..7dbaed33 100644 --- a/components/settings/OtherSettings.tsx +++ b/components/settings/OtherSettings.tsx @@ -1,5 +1,5 @@ import { Platform } from "react-native"; -import {ScreenOrientationEnum, useSettings, VideoPlayer} from "@/utils/atoms/settings"; +import { ScreenOrientationEnum, useSettings, VideoPlayer } from "@/utils/atoms/settings"; import { BitrateSelector, BITRATES } from "@/components/BitrateSelector"; import { BACKGROUND_FETCH_TASK, @@ -7,9 +7,7 @@ import { unregisterBackgroundFetchAsync, } from "@/utils/background-tasks"; import { Ionicons } from "@expo/vector-icons"; -const BackgroundFetch = !Platform.isTV - ? require("expo-background-fetch") - : null; +const BackgroundFetch = !Platform.isTV ? require("expo-background-fetch") : null; import * as ScreenOrientation from "@/packages/expo-screen-orientation"; const TaskManager = !Platform.isTV ? require("expo-task-manager") : null; import { useRouter } from "expo-router"; @@ -22,7 +20,7 @@ import { ListItem } from "../list/ListItem"; import { useTranslation } from "react-i18next"; import DisabledSetting from "@/components/settings/DisabledSetting"; import Dropdown from "@/components/common/Dropdown"; -import {isNumber} from "lodash"; +import { isNumber } from "lodash"; export const OtherSettings: React.FC = () => { const router = useRouter(); @@ -85,10 +83,7 @@ export const OtherSettings: React.FC = () => { return ( - + { ScreenOrientationEnum[item]} title={ @@ -116,17 +105,11 @@ export const OtherSettings: React.FC = () => { {t(ScreenOrientationEnum[settings.defaultVideoOrientation])} - + } label={t("home.settings.other.orientation")} - onSelected={(defaultVideoOrientation) => - updateSettings({ defaultVideoOrientation }) - } + onSelected={(defaultVideoOrientation) => updateSettings({ defaultVideoOrientation })} /> @@ -137,13 +120,11 @@ export const OtherSettings: React.FC = () => { - updateSettings({ safeAreaInControlsEnabled: value }) - } + onValueChange={(value) => updateSettings({ safeAreaInControlsEnabled: value })} /> - {(Platform.OS === "ios" || Platform.isTVOS)&& ( + {/* {(Platform.OS === "ios" || Platform.isTVOS)&& ( { } /> - )} + )} */} - Linking.openURL( - "https://jellyfin.org/docs/general/clients/web-config/#custom-menu-links" - ) - } + onPress={() => Linking.openURL("https://jellyfin.org/docs/general/clients/web-config/#custom-menu-links")} > - updateSettings({ showCustomMenuLinks: value }) - } + onValueChange={(value) => updateSettings({ showCustomMenuLinks: value })} /> { title={t("home.settings.other.hide_libraries")} showArrow /> - + { selected={settings.defaultBitrate} title={ - - {settings.defaultBitrate?.key} - - + {settings.defaultBitrate?.key} + } label={t("home.settings.other.default_quality")} @@ -228,9 +194,7 @@ export const OtherSettings: React.FC = () => { - updateSettings({ disableHapticFeedback }) - } + onValueChange={(disableHapticFeedback) => updateSettings({ disableHapticFeedback })} />