More permissive username search
This commit is contained in:
parent
89525d3e16
commit
4a41e87173
17 changed files with 121 additions and 31 deletions
|
@ -12,7 +12,6 @@ import { SearchInput } from '../SearchInput';
|
|||
import type { LocalizerType } from '../../types/Util';
|
||||
import type { ParsedE164Type } from '../../util/libphonenumberInstance';
|
||||
import { parseAndFormatPhoneNumber } from '../../util/libphonenumberInstance';
|
||||
import { getUsernameFromSearch } from '../../types/Username';
|
||||
import type { UUIDFetchStateType } from '../../util/uuidFetchState';
|
||||
import {
|
||||
isFetchingByUsername,
|
||||
|
@ -27,6 +26,7 @@ export type LeftPaneComposePropsType = {
|
|||
regionCode: string | undefined;
|
||||
searchTerm: string;
|
||||
uuidFetchState: UUIDFetchStateType;
|
||||
username: string | undefined;
|
||||
};
|
||||
|
||||
enum TopButtons {
|
||||
|
@ -57,6 +57,7 @@ export class LeftPaneComposeHelper extends LeftPaneHelper<LeftPaneComposePropsTy
|
|||
regionCode,
|
||||
searchTerm,
|
||||
uuidFetchState,
|
||||
username,
|
||||
}: Readonly<LeftPaneComposePropsType>) {
|
||||
super();
|
||||
|
||||
|
@ -65,8 +66,6 @@ export class LeftPaneComposeHelper extends LeftPaneHelper<LeftPaneComposePropsTy
|
|||
this.searchTerm = searchTerm;
|
||||
this.uuidFetchState = uuidFetchState;
|
||||
|
||||
const username = getUsernameFromSearch(this.searchTerm);
|
||||
|
||||
this.username = username;
|
||||
this.isUsernameVisible =
|
||||
Boolean(username) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue