Enable usernames
This commit is contained in:
parent
38da3d3152
commit
43de83f0de
26 changed files with 196 additions and 438 deletions
|
@ -28,7 +28,6 @@ export type LeftPaneComposePropsType = {
|
|||
regionCode: string | undefined;
|
||||
searchTerm: string;
|
||||
uuidFetchState: UUIDFetchStateType;
|
||||
isUsernamesEnabled: boolean;
|
||||
};
|
||||
|
||||
enum TopButton {
|
||||
|
@ -58,7 +57,6 @@ export class LeftPaneComposeHelper extends LeftPaneHelper<LeftPaneComposePropsTy
|
|||
composeGroups,
|
||||
regionCode,
|
||||
searchTerm,
|
||||
isUsernamesEnabled,
|
||||
uuidFetchState,
|
||||
}: Readonly<LeftPaneComposePropsType>) {
|
||||
super();
|
||||
|
@ -70,15 +68,10 @@ export class LeftPaneComposeHelper extends LeftPaneHelper<LeftPaneComposePropsTy
|
|||
|
||||
const username = getUsernameFromSearch(this.searchTerm);
|
||||
|
||||
if (isUsernamesEnabled) {
|
||||
this.username = username;
|
||||
this.isUsernameVisible =
|
||||
isUsernamesEnabled &&
|
||||
Boolean(username) &&
|
||||
this.composeContacts.every(contact => contact.username !== username);
|
||||
} else {
|
||||
this.isUsernameVisible = false;
|
||||
}
|
||||
this.username = username;
|
||||
this.isUsernameVisible =
|
||||
Boolean(username) &&
|
||||
this.composeContacts.every(contact => contact.username !== username);
|
||||
|
||||
const phoneNumber = parseAndFormatPhoneNumber(searchTerm, regionCode);
|
||||
if (!username && phoneNumber) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue