"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ts/components/ContactListItem.tsx" between
Signal-Desktop-1.35.2.tar.gz and Signal-Desktop-1.36.1.tar.gz

About: Signal-Desktop is a cross-platform encrypted messaging service (also available for mobile devices).

ContactListItem.tsx  (Signal-Desktop-1.35.2):ContactListItem.tsx  (Signal-Desktop-1.36.1)
skipping to change at line 12 skipping to change at line 12
import classNames from 'classnames'; import classNames from 'classnames';
import { Avatar } from './Avatar'; import { Avatar } from './Avatar';
import { Emojify } from './conversation/Emojify'; import { Emojify } from './conversation/Emojify';
import { InContactsIcon } from './InContactsIcon'; import { InContactsIcon } from './InContactsIcon';
import { LocalizerType } from '../types/Util'; import { LocalizerType } from '../types/Util';
import { ColorType } from '../types/Colors'; import { ColorType } from '../types/Colors';
interface Props { interface Props {
title: string;
phoneNumber?: string;
isMe?: boolean;
name?: string;
color?: ColorType;
isVerified?: boolean;
profileName?: string;
avatarPath?: string; avatarPath?: string;
color?: ColorType;
i18n: LocalizerType; i18n: LocalizerType;
isAdmin?: boolean;
isMe?: boolean;
isVerified?: boolean;
name?: string;
onClick?: () => void; onClick?: () => void;
phoneNumber?: string;
profileName?: string;
title: string;
} }
export class ContactListItem extends React.Component<Props> { export class ContactListItem extends React.Component<Props> {
public renderAvatar() { public renderAvatar() {
const { const {
avatarPath, avatarPath,
i18n, i18n,
color, color,
name, name,
phoneNumber, phoneNumber,
skipping to change at line 54 skipping to change at line 55
profileName={profileName} profileName={profileName}
title={title} title={title}
size={52} size={52}
/> />
); );
} }
public render() { public render() {
const { const {
i18n, i18n,
isAdmin,
isMe,
isVerified,
name, name,
onClick, onClick,
isMe,
phoneNumber, phoneNumber,
profileName, profileName,
title, title,
isVerified,
} = this.props; } = this.props;
const displayName = isMe ? i18n('you') : title; const displayName = isMe ? i18n('you') : title;
const shouldShowIcon = Boolean(name); const shouldShowIcon = Boolean(name);
const showNumber = Boolean(isMe || name || profileName); const showNumber = Boolean(isMe || name || profileName);
const showVerified = !isMe && isVerified; const showVerified = !isMe && isVerified;
return ( return (
<button <button
onClick={onClick} onClick={onClick}
className={classNames( className={classNames(
'module-contact-list-item', 'module-contact-list-item',
onClick ? 'module-contact-list-item--with-click-handler' : null onClick ? 'module-contact-list-item--with-click-handler' : null
)} )}
> >
{this.renderAvatar()} {this.renderAvatar()}
<div className="module-contact-list-item__text"> <div className="module-contact-list-item__text">
<div className="module-contact-list-item__text__name"> <div className="module-contact-list-item__left">
<Emojify text={displayName} /> <div className="module-contact-list-item__text__name">
{shouldShowIcon ? ( <Emojify text={displayName} />
<span> {shouldShowIcon ? (
{' '} <span>
<InContactsIcon i18n={i18n} /> {' '}
</span> <InContactsIcon i18n={i18n} />
) : null} </span>
</div> ) : null}
<div className="module-contact-list-item__text__additional-data"> </div>
{showVerified ? ( <div className="module-contact-list-item__text__additional-data">
<div className="module-contact-list-item__text__verified-icon" /> {showVerified ? (
) : null} <div className="module-contact-list-item__text__verified-icon" /
{showVerified ? ` ${i18n('verified')}` : null} >
{showVerified && showNumber ? ' ∙ ' : null} ) : null}
{showNumber ? phoneNumber : null} {showVerified ? ` ${i18n('verified')}` : null}
{showVerified && showNumber ? ' ∙ ' : null}
{showNumber ? phoneNumber : null}
</div>
</div> </div>
{isAdmin ? (
<div className="module-contact-list-item__admin">
{i18n('GroupV2--admin')}
</div>
) : null}
</div> </div>
</button> </button>
); );
} }
} }
 End of changes. 9 change blocks. 
25 lines changed or deleted 35 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)