1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Backport pull request #5619 from jellyfin-web/release-10.9.z

Clear the cache view on user logout

Original-merge: 4959a777c9

Merged-by: thornbill <thornbill@users.noreply.github.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
grafixeyehero 2024-06-01 18:42:05 -04:00 committed by Joshua M. Boniface
parent 39fa14a6f8
commit 7e0afdfd66

View file

@ -6,6 +6,7 @@ import Dashboard from '../utils/dashboard';
import Events from '../utils/events.ts'; import Events from '../utils/events.ts';
import { setUserInfo } from '../scripts/settings/userSettings'; import { setUserInfo } from '../scripts/settings/userSettings';
import appSettings from '../scripts/settings/appSettings'; import appSettings from '../scripts/settings/appSettings';
import viewContainer from './viewContainer';
import { queryClient } from 'utils/query/queryClient'; import { queryClient } from 'utils/query/queryClient';
const normalizeImageOptions = options => { const normalizeImageOptions = options => {
@ -44,6 +45,8 @@ class ServerConnections extends ConnectionManager {
credentialProvider.credentials(credentialProvider.credentials()); credentialProvider.credentials(credentialProvider.credentials());
// Reset the query cache // Reset the query cache
queryClient.resetQueries(); queryClient.resetQueries();
// Reset cached views
viewContainer.reset();
if (window.NativeShell && typeof window.NativeShell.onLocalUserSignedOut === 'function') { if (window.NativeShell && typeof window.NativeShell.onLocalUserSignedOut === 'function') {
window.NativeShell.onLocalUserSignedOut(logoutInfo); window.NativeShell.onLocalUserSignedOut(logoutInfo);