-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
hide expensify from new chat page #50937
Changes from 3 commits
5866325
039f0d6
0fd9a41
0c50840
1a6950b
694ecd7
6916c06
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 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -38,7 +38,7 @@ type NewChatPageProps = { | |||||||||
isGroupChat?: boolean; | ||||||||||
}; | ||||||||||
|
||||||||||
const excludedGroupEmails = CONST.EXPENSIFY_EMAILS.filter((value) => value !== CONST.EMAIL.CONCIERGE); | ||||||||||
const excludedGroupEmails: string[] = CONST.EXPENSIFY_EMAILS.filter((value) => value !== CONST.EMAIL.CONCIERGE); | ||||||||||
|
||||||||||
function useOptions({isGroupChat}: NewChatPageProps) { | ||||||||||
const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState(''); | ||||||||||
|
@@ -229,7 +229,7 @@ function NewChatPage({isGroupChat}: NewChatPageProps) { | |||||||||
|
||||||||||
const itemRightSideComponent = useCallback( | ||||||||||
(item: ListItem & OptionsListUtils.Option, isFocused?: boolean) => { | ||||||||||
if (!!item.isSelfDM || (item.accountID && CONST.NON_ADDABLE_ACCOUNT_IDS.includes(item.accountID))) { | ||||||||||
if (!!item.isSelfDM || (item.login && excludedGroupEmails.includes(item.login))) { | ||||||||||
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. Can you add more context about using 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, the excludedGroupEmails contains the logins of all Expensify accounts. That's why I'm using login here. Previously, we were using NON_ADDABLE_ACCOUNT_IDS, which had the account IDs for CHRONOS and NOTIFICATIONS. However, excludedGroupEmails also includes the logins for these two accounts. 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. More context about using App/src/libs/OptionsListUtils.ts Lines 1661 to 1664 in 652d2ff
And this can cause this issue
You will see issue.mp4There 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. I think we need to remove |
||||||||||
return null; | ||||||||||
} | ||||||||||
/** | ||||||||||
|
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.
@Nodebrute, please remove
isGroupChat
prop as its been not used anywhere in the component.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.
@Nodebrute bump
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.
@Krishna2323 I’ve removed all instances where the isGroupChat prop was used.
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.
Thanks, looks good to me 🙌🏻. @ahmedGaber93 we can move forward here.