hide pubkey when not needed on conversationHeader and listItem

pull/1374/head
Audric Ackermann 5 years ago
parent 16b8fc8620
commit f57c85dc0d
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -1112,7 +1112,7 @@
}
.module-conversation-header__title {
margin-inline-start: 6px;
margin: 0px 20px;
min-width: 0;
font-size: 16px;
@ -1130,6 +1130,12 @@
align-items: center;
-webkit-user-select: text;
.module-contact-name__profile-name {
width: 100%;
overflow: hidden !important;
text-overflow: ellipsis;
}
}
.module-conversation-header__title__profile-name {

@ -348,6 +348,11 @@ class ConversationListItem extends React.PureComponent<Props> {
const displayedPubkey = profileName ? shortenedPubkey : phoneNumber;
const displayName = isMe ? i18n('noteToSelf') : profileName;
let shouldShowPubkey = false;
if (!name || name.length === 0) {
shouldShowPubkey = true;
}
return (
<div className="module-conversation__user">
<ContactName
@ -357,7 +362,7 @@ class ConversationListItem extends React.PureComponent<Props> {
module="module-conversation__user"
i18n={window.i18n}
boldProfileName={true}
shouldShowPubkey={false}
shouldShowPubkey={shouldShowPubkey}
/>
</div>
);

@ -36,7 +36,7 @@ export class ContactName extends React.Component<Props> {
fontWeight: 'bold',
}
: {}) as React.CSSProperties;
const textProfile = profileName || name || '';
const textProfile = profileName || name || i18n('anonymous');
const profileElement = shouldShowProfile ? (
<span style={styles} className={`${prefix}__profile-name`}>
<Emojify text={textProfile} i18n={i18n} />

@ -179,16 +179,7 @@ class ConversationHeader extends React.Component<Props> {
<span className="module-conversation-header__title-text">{text}</span>
);
let title;
if (profileName) {
title = `${profileName}`;
} else {
if (name) {
title = `${name}`;
} else {
title = `User ${window.shortenPubkey(phoneNumber)}`;
}
}
const title = profileName || name || phoneNumber;
return (
<div className="module-conversation-header__title">

@ -583,8 +583,6 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
title = window.i18n('anonymous');
}
title = `${title} ${window.shortenPubkey(blockedNumber)}`;
results.push({
id: blockedNumber,
title,

Loading…
Cancel
Save