-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[CP Staging] Fix same name policy rooms and policy room title and mobile app crashing when creating policy room #6724
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
07b9ae9
Make sure to return report name for the policy room
mountiny 8831bac
Update the comment to reflect change
mountiny 783496a
Fix lint
mountiny 23943f3
Update a comment
mountiny 4d74742
Make sure to display room name
mountiny 9bbd555
Use isPolicyRoom
mountiny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,8 +85,9 @@ const HeaderView = (props) => { | |
}; | ||
}, | ||
); | ||
const isPolicyRoom = ReportUtils.isPolicyRoom(props.report); | ||
const isDefaultChatRoom = ReportUtils.isDefaultRoom(props.report); | ||
const title = isDefaultChatRoom | ||
const title = isDefaultChatRoom || isPolicyRoom | ||
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. We need to show similar style of title for both, default and policy rooms. I need to keep them separate though as the default dooms have subtitle and avatar, which is a different behaviour and design than policy room. |
||
? props.report.reportName | ||
: _.map(displayNamesWithTooltips, ({displayName}) => displayName).join(', '); | ||
|
||
|
@@ -145,7 +146,7 @@ const HeaderView = (props) => { | |
tooltipEnabled | ||
numberOfLines={1} | ||
textStyles={[styles.headerText]} | ||
shouldUseFullTitle={isDefaultChatRoom} | ||
shouldUseFullTitle={isDefaultChatRoom || isPolicyRoom} | ||
/> | ||
{isDefaultChatRoom && ( | ||
<ExpensifyText | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The
isDefaultPolicy
does not check for basic policy room, so we need to add this check here too.