From 599b2e655565d5c3f9e6c1a8d50bb85aaeebb482 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 10 Aug 2020 15:11:32 +1000 Subject: [PATCH] add back way to remove existing nickname set for a user --- js/models/conversations.js | 3 +++ ts/components/ConversationListItem.tsx | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index b043565a1..c545d63f7 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -626,6 +626,9 @@ onInviteContacts: () => { window.Whisper.events.trigger('inviteContacts', this); }, + onClearNickname: () => { + this.setLokiProfile({ displayName: null }); + }, }; return result; diff --git a/ts/components/ConversationListItem.tsx b/ts/components/ConversationListItem.tsx index bdf978a10..cdd3294f8 100644 --- a/ts/components/ConversationListItem.tsx +++ b/ts/components/ConversationListItem.tsx @@ -64,6 +64,7 @@ type PropsHousekeeping = { onCopyPublicKey?: () => void; onUnblockContact?: () => void; onInviteContacts?: () => void; + onClearNickname?: () => void; }; type Props = PropsData & PropsHousekeeping; @@ -199,14 +200,14 @@ export class ConversationListItem extends React.PureComponent { {i18n('changeNickname')} ) : null} */} - { /* getClearNicknameMenuItem( + { getClearNicknameMenuItem( isPublic, isRss, isMe, hasNickname, onClearNickname, i18n - ) */} + ) } {getCopyIdMenuItem( isPublic, isRss,