From 690b1c6e68cefa8bf7b395a7febbd25b9cf93b42 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Thu, 21 Dec 2023 21:00:17 +0100 Subject: [PATCH] Fix subtitles not being able to be turned off while logged in Co-authored-by: William Oldham --- src/hooks/auth/useAuthData.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hooks/auth/useAuthData.ts b/src/hooks/auth/useAuthData.ts index 993e25c2..4cd1494d 100644 --- a/src/hooks/auth/useAuthData.ts +++ b/src/hooks/auth/useAuthData.ts @@ -24,7 +24,9 @@ export function useAuthData() { const clearProgress = useProgressStore((s) => s.clear); const setTheme = useThemeStore((s) => s.setTheme); const setAppLanguage = useLanguageStore((s) => s.setLanguage); - const setCaptionLanguage = useSubtitleStore((s) => s.setLanguage); + const importSubtitleLanguage = useSubtitleStore( + (s) => s.importSubtitleLanguage + ); const replaceBookmarks = useBookmarkStore((s) => s.replaceBookmarks); const replaceItems = useProgressStore((s) => s.replaceItems); @@ -72,7 +74,7 @@ export function useAuthData() { } if (settings.defaultSubtitleLanguage) { - setCaptionLanguage(settings.defaultSubtitleLanguage); + importSubtitleLanguage(settings.defaultSubtitleLanguage); } if (settings.applicationTheme) { @@ -83,7 +85,7 @@ export function useAuthData() { replaceBookmarks, replaceItems, setAppLanguage, - setCaptionLanguage, + importSubtitleLanguage, setTheme, ] );