mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
fixes #1304 - Wrong profile picture
This commit is contained in:
parent
7a6ab8a7da
commit
e4fe1517b9
@ -70,6 +70,9 @@
|
||||
|
||||
var header = document.querySelector('.viewMenuBar');
|
||||
|
||||
var headerUserButton = header.querySelector('.headerUserButton');
|
||||
var hasImage;
|
||||
|
||||
if (user.name) {
|
||||
if (user.imageUrl && AppInfo.enableUserImage) {
|
||||
|
||||
@ -81,15 +84,21 @@
|
||||
url += "&height=" + (userButtonHeight * Math.max(devicePixelRatio || 1, 2));
|
||||
}
|
||||
|
||||
var headerUserButton = header.querySelector('.headerUserButton');
|
||||
if (headerUserButton) {
|
||||
headerUserButton.icon = null;
|
||||
headerUserButton.src = url;
|
||||
headerUserButton.classList.add('headerUserButtonRound');
|
||||
hasImage = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hasUserButton && !hasImage) {
|
||||
headerUserButton.icon = 'person';
|
||||
headerUserButton.src = null;
|
||||
headerUserButton.classList.remove('headerUserButtonRound');
|
||||
}
|
||||
|
||||
updateLocalUser(user.localUser);
|
||||
requiresUserRefresh = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user