dont show nickname for self & their nickname for group

This commit is contained in:
Martti Malmi 2020-05-18 17:53:46 +03:00
parent a50dfdac12
commit c6b2e014bf
2 changed files with 3 additions and 1 deletions

View File

@ -330,7 +330,7 @@
<p>
Nickname: <input id="profile-nickname-their">
</p>
<p>
<p id="profile-nickname-my-container">
Their nickname for you: <span id="profile-nickname-my"></span>
</p>
</div>

View File

@ -799,6 +799,8 @@ function showProfile(pub) {
var name = event.target.value;
chats[pub].put('name', name);
});
$('.profile-nicknames').toggle(pub !== key.pub);
$('#profile-nickname-my-container').toggle(!chats[pub].uuid);
$('#profile-nickname-their').not(':focus').val(chats[pub] && chats[pub].theirNickname);
$('#profile-nickname-my').text(chats[pub] && chats[pub].myNickname && chats[pub].myNickname.length ? chats[pub].myNickname : '');
$('#profile-nickname-their').off().on('input', event => {