More permissive username search

This commit is contained in:
Fedor Indutny 2024-02-14 10:18:49 -08:00 committed by GitHub
parent 89525d3e16
commit 4a41e87173
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 121 additions and 31 deletions

View file

@ -9,7 +9,6 @@ import type { Row } from '../ConversationList';
import { RowType } from '../ConversationList';
import { SearchInput } from '../SearchInput';
import type { LocalizerType } from '../../types/Util';
import { getUsernameFromSearch } from '../../types/Username';
import type { ShowConversationType } from '../../state/ducks/conversations';
import type { UUIDFetchStateType } from '../../util/uuidFetchState';
import { isFetchingByUsername } from '../../util/uuidFetchState';
@ -21,6 +20,7 @@ import { Button } from '../Button';
export type LeftPaneFindByUsernamePropsType = {
searchTerm: string;
uuidFetchState: UUIDFetchStateType;
username: string | undefined;
};
type DoLookupActionsType = Readonly<{
@ -39,13 +39,14 @@ export class LeftPaneFindByUsernameHelper extends LeftPaneHelper<LeftPaneFindByU
constructor({
searchTerm,
uuidFetchState,
username,
}: Readonly<LeftPaneFindByUsernamePropsType>) {
super();
this.searchTerm = searchTerm;
this.uuidFetchState = uuidFetchState;
this.username = getUsernameFromSearch(this.searchTerm);
this.username = username;
}
override getHeaderContents({