fix: home refresh

This commit is contained in:
sarendsen
2025-03-13 16:41:43 +01:00
parent ab5df3c9ef
commit c0e9f29c04
2 changed files with 5 additions and 5 deletions

View File

@@ -188,12 +188,12 @@ export const HomeIndex = () => {
const invalidateCache = useInvalidatePlaybackProgressCache();
const refetch = useCallback(async () => {
const refetch = async () => {
setLoading(true);
await refreshStreamyfinPluginSettings();
await invalidateCache();
setLoading(false);
}, []);
};
const createCollectionConfig = useCallback(
(

View File

@@ -1,4 +1,4 @@
import { atom, useAtom } from "jotai";
import { atom, useAtom, useAtomValue } from "jotai";
import { useCallback, useEffect, useMemo } from "react";
import * as ScreenOrientation from "@/packages/expo-screen-orientation";
import { storage } from "../mmkv";
@@ -226,7 +226,7 @@ export const settingsAtom = atom<Partial<Settings> | null>(null);
export const pluginSettingsAtom = atom(storage.get<PluginLockableSettings>(STREAMYFIN_PLUGIN_SETTINGS));
export const useSettings = () => {
const [api] = useAtom(apiAtom);
const api = useAtomValue(apiAtom);
const [_settings, setSettings] = useAtom(settingsAtom);
const [pluginSettings, _setPluginSettings] = useAtom(pluginSettingsAtom);