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

Merge pull request #5619 from grafixeyehero/Fix-Clear-query-cache-on-user-logout

Clear the cache view on user logout
This commit is contained in:
Bill Thornton 2024-05-30 17:27:05 -04:00 committed by GitHub
commit 4959a777c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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