Skip to content

Commit

Permalink
Merge pull request #9311 from Expensify/OSBotify-cherry-pick-staging-…
Browse files Browse the repository at this point in the history
…9291

🍒 Cherry pick PR #9291 to staging 🍒
  • Loading branch information
OSBotify authored Jun 3, 2022
2 parents 8edfc64 + 5aabc8a commit 3c3133b
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 13 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001017101
versionName "1.1.71-1"
versionCode 1001017102
versionName "1.1.71-2"
}
splits {
abi {
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.71.1</string>
<string>1.1.71.2</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.71.1</string>
<string>1.1.71.2</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.1.71-1",
"version": "1.1.71-2",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
12 changes: 8 additions & 4 deletions src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ function getOptions(reports, personalDetails, activeReportID, {
selectedOptions = [],
maxRecentReportsToShow = 0,
excludeLogins = [],
excludeDefaultRooms = false,
excludeChatRooms = false,
includeMultipleParticipantReports = false,
includePersonalDetails = false,
includeRecentReports = false,
Expand Down Expand Up @@ -439,18 +439,22 @@ function getOptions(reports, personalDetails, activeReportID, {
return;
}

if (isChatRoom && (!Permissions.canUseDefaultRooms(betas) || excludeDefaultRooms)) {
if (isChatRoom && excludeChatRooms) {
return;
}

if (isPolicyExpenseChat && !Permissions.canUsePolicyExpenseChat(betas)) {
if (ReportUtils.isDefaultRoom(report) && !Permissions.canUseDefaultRooms(betas)) {
return;
}

if (ReportUtils.isUserCreatedPolicyRoom(report) && !Permissions.canUsePolicyRooms(betas)) {
return;
}

if (isPolicyExpenseChat && !Permissions.canUsePolicyExpenseChat(betas)) {
return;
}

// Save the report in the map if this is a single participant so we can associate the reportID with the
// personal detail option later. Individuals should not be associated with single participant
// policyExpenseChats or chatRooms since those are not people.
Expand Down Expand Up @@ -703,7 +707,7 @@ function getNewChatOptions(
betas,
searchValue: searchValue.trim(),
selectedOptions,
excludeDefaultRooms: true,
excludeChatRooms: true,
includeRecentReports: true,
includePersonalDetails: true,
maxRecentReportsToShow: 5,
Expand Down
6 changes: 5 additions & 1 deletion src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ class ReportScreen extends React.Component {
return null;
}

if (!Permissions.canUseDefaultRooms(this.props.betas) && ReportUtils.isChatRoom(this.props.report)) {
if (!Permissions.canUseDefaultRooms(this.props.betas) && ReportUtils.isDefaultRoom(this.props.report)) {
return null;
}

if (!Permissions.canUsePolicyRooms(this.props.betas) && ReportUtils.isUserCreatedPolicyRoom(this.props.report)) {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/WorkspaceNewRoomPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ class WorkspaceNewRoomPage extends React.Component {
}

render() {
if (!Permissions.canUseDefaultRooms(this.props.betas)) {
Log.info('Not showing create Policy Room page since user is not on default rooms beta');
if (!Permissions.canUsePolicyRooms(this.props.betas)) {
Log.info('Not showing create Policy Room page since user is not on policy rooms beta');
Navigation.dismissModal();
return null;
}
Expand Down

0 comments on commit 3c3133b

Please sign in to comment.