From 36d792874a83fee5070410b60197080150b8d1a9 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 18 Jul 2017 10:13:04 +0200 Subject: [PATCH] Fix initial text not removed in /contacts --- www/common/common-messaging.js | 8 +++++++- www/contacts/main.js | 7 ++++--- www/contacts/main.less | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/www/common/common-messaging.js b/www/common/common-messaging.js index 89958f2f9..cecd43dcc 100644 --- a/www/common/common-messaging.js +++ b/www/common/common-messaging.js @@ -89,7 +89,7 @@ define([ }); $remove.click(function (e) { e.stopPropagation(); - common.confirm(common.Messages.getKey('contacts_confirmRemove', [ + common.confirm(common.Messages._getKey('contacts_confirmRemove', [ common.fixHTML(data.displayName) ]), function (yes) { if (!yes) { return; } @@ -364,6 +364,7 @@ define([ }; // Display a new channel var display = function (curvePublic) { + $msgContainer.find('.info').hide(); var isNew = false; var $chat = $msgContainer.find('.chat').filter(function (idx, el) { return $(el).data('key') === curvePublic; @@ -421,7 +422,12 @@ define([ var $friend = $listContainer.find('.friend').filter(function (idx, el) { return $(el).data('key') === curvePublic; }); + var $chat = $msgContainer.find('.chat').filter(function (idx, el) { + return $(el).data('key') === curvePublic; + }); $friend.remove(); + $chat.remove(); + $msgContainer.find('.info').show(); }; var updateUI = function (curvePublic, types) { var data = getFriend(common, curvePublic); diff --git a/www/contacts/main.js b/www/contacts/main.js index d5d1ca86f..d98a747b1 100644 --- a/www/contacts/main.js +++ b/www/contacts/main.js @@ -49,11 +49,12 @@ define([ Cryptpad.initMessaging(Cryptpad, $list, $messages); - var $title = $('

').text(Messages.contacts_info1).appendTo($messages); - var $ul = $('