profile: fix old profile pic still showing
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details

The profile image never changed until a new one is successfully
loaded. This fix clears the picture before loading a new one.
pull/48/head
OFF0 2 years ago
parent 136e66ee94
commit f26cb737a4
Signed by: offbyn
GPG Key ID: 94A2F643C51F37FA

@ -147,6 +147,8 @@ function clearProfile() {
profileName.textContent = '';
profilePubkey.textContent = '';
profilePubkeyLabel.hidden = true;
profileImage.removeAttribute('src');
profileImage.hidden = true;
}
function renderProfile(evt, relay) {
profileContainer.dataset.pubkey = evt.pubkey;
@ -158,7 +160,8 @@ function renderProfile(evt, relay) {
profileName.textContent = content.name;
const noxyImg = getNoxyUrl('data', content.picture, evt.id, relay);
if (noxyImg) {
profileImage.setAttribute('src', getNoxyUrl('data', noxyImg, evt.id, relay))
profileImage.setAttribute('src', getNoxyUrl('data', noxyImg, evt.id, relay));
profileImage.hidden = false;
}
}
}

Loading…
Cancel
Save