From 28f2fbd6a771ca67c109aa51a7fc881f313b6556 Mon Sep 17 00:00:00 2001 From: MerlinScheurer Date: Sun, 22 Jun 2025 12:14:32 +0200 Subject: [PATCH] Fix remove theater mode localstorage flag --- frontend/src/components/VideoPlayer.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/src/components/VideoPlayer.tsx b/frontend/src/components/VideoPlayer.tsx index 47a19977..de8fc4bb 100644 --- a/frontend/src/components/VideoPlayer.tsx +++ b/frontend/src/components/VideoPlayer.tsx @@ -126,7 +126,6 @@ const VideoPlayer = ({ const [searchParams] = useSearchParams(); const searchParamVideoProgress = searchParams.get('t'); - const theaterModeFromStorage = localStorage.getItem('theaterMode') === 'true'; const volumeFromStorage = Number(localStorage.getItem('playerVolume') ?? 1); const playBackSpeedFromStorage = Number(localStorage.getItem('playerSpeed') || 1); const playBackSpeedIndex = @@ -141,7 +140,7 @@ const VideoPlayer = ({ const [showHelpDialog, setShowHelpDialog] = useState(false); const [showInfoDialog, setShowInfoDialog] = useState(false); const [infoDialogContent, setInfoDialogContent] = useState(''); - const [isTheaterMode, setIsTheaterMode] = useState(theaterModeFromStorage); + const [isTheaterMode, setIsTheaterMode] = useState(false); const [theaterModeKeyPressed, setTheaterModeKeyPressed] = useState(false); const questionmarkPressed = useKeyPress('?'); @@ -361,8 +360,6 @@ const VideoPlayer = ({ const newTheaterMode = !isTheaterMode; setIsTheaterMode(newTheaterMode); - localStorage.setItem('theaterMode', newTheaterMode.toString()); - infoDialog(newTheaterMode ? 'Theater mode' : 'Normal mode'); } else if (!theaterModePressed) { setTheaterModeKeyPressed(false); @@ -377,8 +374,6 @@ const VideoPlayer = ({ if (escapePressed && isTheaterMode) { setIsTheaterMode(false); - localStorage.setItem('theaterMode', 'false'); - infoDialog('Normal mode'); } }, [escapePressed, isTheaterMode]);