fix about text

This commit is contained in:
Martti Malmi 2020-04-12 16:38:49 +03:00
parent b5da7095ee
commit e3742315cb

View File

@ -672,7 +672,6 @@ function showProfile(pub) {
var qrCodeEl = $('#profile-page-qr');
qrCodeEl.empty();
$('#profile-nickname-their').val('');
$('#profile .profile-about-content').empty();
$('#profile').show();
addUserToHeader(pub);
setTheirOnlineStatus(pub);
@ -680,8 +679,8 @@ function showProfile(pub) {
$('#profile .profile-photo-container').show();
$('#profile .profile-photo').attr('src', photo);
});
$('#profile .profile-about').empty();
$('#profile .profile-about').toggle(chats[pub].about && chats[pub].about.length > 0);
$('#profile .profile-about-content').empty();
$('#profile .profile-about-content').text(chats[pub].about);
const link = getUserChatLink(pub);
$('#profile .add-friend').off().on('click', () => {
@ -921,9 +920,9 @@ function deleteChat(pub) {
function getDisplayName(pub) {
var displayName;
if (chats[pub].theirNickname && chats[pub].theirNickname.length) {
displayName = chats[pub].theirNickname;
displayName = chats[pub].theirNickname;
if (chats[pub].name && chats[pub].name.length) {
displayName = displayName + ' (' + chats[pub].name + ')';
displayName = displayName + ' (' + chats[pub].name + ')';
}
} else {
displayName = chats[pub].name;