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 storedUserId = localStorage.getItem("userId");
|
||||
var userId;
|
||||
|
||||
if (autoLoginUserId) {
|
||||
userId = localStorage.getItem("userId");
|
||||
if (autoLoginUserId && autoLoginUserId != storedUserId) {
|
||||
|
||||
if (userId != autoLoginUserId) {
|
||||
|
||||
userId = autoLoginUserId;
|
||||
Dashboard.setCurrentUser(userId);
|
||||
}
|
||||
localStorage.setItem("userId", autoLoginUserId);
|
||||
ApiClient.currentUserId(autoLoginUserId);
|
||||
}
|
||||
|
||||
userId = userId || localStorage.getItem("userId");
|
||||
|
||||
return userId;
|
||||
return autoLoginUserId || storedUserId;
|
||||
},
|
||||
|
||||
setCurrentUser: function (userId) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue