mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
minor cleanup
This commit is contained in:
parent
c808cd9871
commit
265af89fe6
1 changed files with 6 additions and 11 deletions
|
@ -92,21 +92,16 @@ var Dashboard = {
|
||||||
}
|
}
|
||||||
|
|
||||||
var autoLoginUserId = getParameterByName('u');
|
var autoLoginUserId = getParameterByName('u');
|
||||||
|
var storedUserId = localStorage.getItem("userId");
|
||||||
var userId;
|
var userId;
|
||||||
|
|
||||||
if (autoLoginUserId) {
|
if (autoLoginUserId && autoLoginUserId != storedUserId) {
|
||||||
userId = localStorage.getItem("userId");
|
|
||||||
|
|
||||||
if (userId != autoLoginUserId) {
|
localStorage.setItem("userId", autoLoginUserId);
|
||||||
|
ApiClient.currentUserId(autoLoginUserId);
|
||||||
userId = autoLoginUserId;
|
|
||||||
Dashboard.setCurrentUser(userId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
userId = userId || localStorage.getItem("userId");
|
return autoLoginUserId || storedUserId;
|
||||||
|
|
||||||
return userId;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setCurrentUser: function (userId) {
|
setCurrentUser: function (userId) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue