-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix-new-chat #2103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix-new-chat #2103
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -407,16 +407,21 @@ function getSidebarOptions(reports, personalDetails, draftComments, activeReport | |
| * | ||
| * @param {Boolean} hasSelectableOptions | ||
| * @param {Boolean} hasUserToInvite | ||
| * @param {String} searchValue | ||
| * @param {Boolean} [maxParticipantsReached] | ||
| * @return {String} | ||
| */ | ||
| function getHeaderMessage(hasSelectableOptions, hasUserToInvite, maxParticipantsReached = false) { | ||
| function getHeaderMessage(hasSelectableOptions, hasUserToInvite, searchValue, maxParticipantsReached = false) { | ||
| if (maxParticipantsReached) { | ||
| return CONST.MESSAGES.MAXIMUM_PARTICIPANTS_REACHED; | ||
| } | ||
|
|
||
| if (!hasSelectableOptions && !hasUserToInvite) { | ||
| return CONST.MESSAGES.NO_CONTACTS_FOUND; | ||
| if (/^\d+$/.test(searchValue)) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this check if it starts with a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, you're right. |
||
| return CONST.MESSAGES.NO_PHONE_NUMBER; | ||
| } | ||
|
|
||
| return searchValue; | ||
| } | ||
|
|
||
| return ''; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we change a method signature we must update all usages. 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes, I've just checked it.

I've thought the only newChat function.
Your concern can be solved easily by adding a props(this.state.searchValue) in the NewGroupPage.js.
Thanks.