mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-09 15:38:39 +01:00
chore: PR comments
Fixing PR comments from coderabbit Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
This commit is contained in:
@@ -52,7 +52,7 @@ import { clearTopShelfCacheSafely } from "@/utils/topshelf/cache";
|
||||
export default function SettingsTV() {
|
||||
const { t } = useTranslation();
|
||||
const insets = useSafeAreaInsets();
|
||||
const { settings, updateSettings } = useSettings();
|
||||
const { settings, updateSettings, pluginSettings } = useSettings();
|
||||
const { logout, loginWithSavedCredential, loginWithPassword } = useJellyfin();
|
||||
const [user] = useAtom(userAtom);
|
||||
const [api] = useAtom(apiAtom);
|
||||
@@ -69,7 +69,6 @@ export default function SettingsTV() {
|
||||
settings.jellyseerrServerUrl || "",
|
||||
);
|
||||
const [jellyseerrPassword, setJellyseerrPassword] = useState("");
|
||||
const { pluginSettings } = useSettings();
|
||||
|
||||
const isJellyseerrLocked =
|
||||
pluginSettings?.jellyseerrServerUrl?.locked === true;
|
||||
|
||||
@@ -125,8 +125,11 @@ export default function SearchPage() {
|
||||
const { jellyseerrApi } = useJellyseerr();
|
||||
|
||||
// Alert when seerr server is configured but user hasn't connected (only when focused)
|
||||
const jellyseerrAlertedRef = useRef(false);
|
||||
useEffect(() => {
|
||||
if (!isFocused || !settings?.jellyseerrServerUrl || jellyseerrApi) return;
|
||||
if (jellyseerrAlertedRef.current) return;
|
||||
jellyseerrAlertedRef.current = true;
|
||||
Alert.alert(
|
||||
t("jellyseerr.connect_to_jellyseerr", "Connect to Jellyseerr"),
|
||||
t(
|
||||
@@ -134,7 +137,7 @@ export default function SearchPage() {
|
||||
"Jellyseerr is available. Connect in Settings to enable request features.",
|
||||
),
|
||||
);
|
||||
}, []);
|
||||
}, [isFocused, settings?.jellyseerrServerUrl, jellyseerrApi, t]);
|
||||
|
||||
// Validate jellyseerr session when switching to Discover
|
||||
useEffect(() => {
|
||||
@@ -147,6 +150,7 @@ export default function SearchPage() {
|
||||
validateJellyseerrSession(settings.jellyseerrServerUrl).then((status) => {
|
||||
if (status.valid) return;
|
||||
Alert.alert(
|
||||
t("jellyseerr.session_expired", "Session expired"),
|
||||
t(
|
||||
"jellyseerr.session_expired_connect_again",
|
||||
"Your Jellyseerr session has expired. Please reconnect in Settings.",
|
||||
|
||||
Reference in New Issue
Block a user