diff --git a/android/app/build.gradle b/android/app/build.gradle
index 4b9ebc7ed1a8..afdc2cd3abea 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -150,8 +150,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
- versionCode 1001010103
- versionName "1.1.1-3"
+ versionCode 1001010104
+ versionName "1.1.1-4"
}
splits {
abi {
diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist
index 9cc22a969788..d290a2e6f701 100644
--- a/ios/NewExpensify/Info.plist
+++ b/ios/NewExpensify/Info.plist
@@ -31,7 +31,7 @@
CFBundleVersion
- 1.1.1.3
+ 1.1.1.4
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist
index b4f002a5fcf6..2bf2db0a0f10 100644
--- a/ios/NewExpensifyTests/Info.plist
+++ b/ios/NewExpensifyTests/Info.plist
@@ -19,6 +19,6 @@
CFBundleSignature
????
CFBundleVersion
- 1.1.1.3
+ 1.1.1.4
diff --git a/package-lock.json b/package-lock.json
index d9ff846e4251..6289b6ba93ed 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
- "version": "1.1.1-3",
+ "version": "1.1.1-4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 0a4605b55616..7d526c6925ac 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
- "version": "1.1.1-3",
+ "version": "1.1.1-4",
"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.",
diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js
index acb4d445492d..b2d7b12f1534 100644
--- a/src/libs/actions/Policy.js
+++ b/src/libs/actions/Policy.js
@@ -228,6 +228,7 @@ function create(name = '') {
}
res = response;
+ // We are awaiting this merge so that we can guarantee our policy is available to any React components connected to the policies collection before we navigate to a new route.
return Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${response.policyID}`, {
employeeList: getSimplifiedEmployeeList(response.policy.employeeList),
id: response.policyID,
diff --git a/src/pages/home/sidebar/SidebarScreen.js b/src/pages/home/sidebar/SidebarScreen.js
index 437cec2766ca..725d30e898c1 100755
--- a/src/pages/home/sidebar/SidebarScreen.js
+++ b/src/pages/home/sidebar/SidebarScreen.js
@@ -1,7 +1,10 @@
+import _ from 'underscore';
+import lodashGet from 'lodash/get';
import React, {Component} from 'react';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import PropTypes from 'prop-types';
+import {withNavigation} from '@react-navigation/compat';
import styles from '../../../styles/styles';
import SidebarLinks from './SidebarLinks';
import PopoverMenu from '../../../components/PopoverMenu';
@@ -61,7 +64,17 @@ class SidebarScreen extends Component {
// This is a short-term workaround, see this issue for updates on a long-term solution: https://github.com/Expensify/App/issues/5296
setTimeout(() => {
if (this.props.isFirstTimeNewExpensifyUser) {
- this.toggleCreateMenu();
+ // If we are rendering the SidebarScreen at the same time as a workspace route that means we've already created a workspace via workspace/new and should not open the global
+ // create menu right now.
+ const routes = lodashGet(this.props.navigation.getState(), 'routes', []);
+ const topRouteName = lodashGet(_.last(routes), 'name', '');
+ const isDisplayingWorkspaceRoute = topRouteName.toLowerCase().includes('workspace');
+
+ // It's also possible that we already have a workspace policy. In either case we will not toggle the menu but do still want to set the NVP in this case since the user does
+ // not need to create a workspace.
+ if (!isAdminOfFreePolicy(this.props.allPolicies) && !isDisplayingWorkspaceRoute) {
+ this.toggleCreateMenu();
+ }
// Set the NVP back to false so we don't automatically open the menu again
// Note: this may need to be moved if this NVP is used for anything else later
@@ -180,6 +193,7 @@ class SidebarScreen extends Component {
SidebarScreen.propTypes = propTypes;
export default compose(
+ withNavigation,
withLocalize,
withWindowDimensions,
withOnyx({