Introduce TitleTransition notification
This commit is contained in:
parent
09b5e6ef50
commit
3469a748fb
16 changed files with 336 additions and 51 deletions
|
@ -143,3 +143,30 @@ export function renderNumber(e164: string): string | undefined {
|
|||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export function hasNumberTitle(
|
||||
attributes: Pick<
|
||||
ConversationAttributesType,
|
||||
'e164' | 'type' | 'sharingPhoneNumber' | 'profileKey'
|
||||
>
|
||||
): boolean {
|
||||
return (
|
||||
!getSystemName(attributes) &&
|
||||
!getProfileName(attributes) &&
|
||||
Boolean(getNumber(attributes))
|
||||
);
|
||||
}
|
||||
|
||||
export function hasUsernameTitle(
|
||||
attributes: Pick<
|
||||
ConversationAttributesType,
|
||||
'e164' | 'type' | 'sharingPhoneNumber' | 'profileKey' | 'username'
|
||||
>
|
||||
): boolean {
|
||||
return (
|
||||
!getSystemName(attributes) &&
|
||||
!getProfileName(attributes) &&
|
||||
!getNumber(attributes) &&
|
||||
Boolean(attributes.username)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue