Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001010104
versionName "1.1.1-4"
versionCode 1001010105
versionName "1.1.1-5"
}
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 @@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.1.4</string>
<string>1.1.1.5</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.1.4</string>
<string>1.1.1.5</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.1-4",
"version": "1.1.1-5",
"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
29 changes: 6 additions & 23 deletions src/pages/workspace/WorkspaceSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ import themedefault from '../../styles/themes/default';
import HeaderWithCloseButton from '../../components/HeaderWithCloseButton';
import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions';
import compose from '../../libs/compose';
import Growl from '../../libs/Growl';
import ONYXKEYS from '../../ONYXKEYS';
import Avatar from '../../components/Avatar';
import CONST from '../../CONST';
import Tooltip from '../../components/Tooltip';
import variables from '../../styles/variables';
import FullScreenLoadingIndicator from '../../components/FullscreenLoadingIndicator';

const propTypes = {
/** Whether the current screen is focused. */
Expand All @@ -43,24 +42,21 @@ const propTypes = {
name: PropTypes.string,
}),

/** All the polices that we have loaded in Onyx */
allPolicies: PropTypes.shape({
/** ID of the policy */
id: PropTypes.string,
}),

...withLocalizePropTypes,
...windowDimensionsPropTypes,
};

const defaultProps = {
policy: {},
allPolicies: null,
};

const WorkspaceSidebar = ({
translate, isSmallScreenWidth, policy, allPolicies, isFocused,
translate, isSmallScreenWidth, policy, isFocused,
}) => {
if (_.isEmpty(policy)) {
return <FullScreenLoadingIndicator />;
}

const menuItems = [
{
translationKey: 'workspace.common.card',
Expand All @@ -80,16 +76,6 @@ const WorkspaceSidebar = ({
},
];

// After all the policies have loaded, we can know if the given policyID points to a nonexistant workspace
// When free plan is out of beta and Permissions.canUseFreePlan() gets removed,
// all code involving 'allPolicies' can be removed since policy loading will no longer be delayed on login.
if (allPolicies !== null && _.isEmpty(policy)) {
Growl.error(translate('workspace.error.growlMessageInvalidPolicy'), CONST.GROWL.DURATION_LONG);
Navigation.dismissModal();
return null;
}


const openEditor = () => Navigation.navigate(ROUTES.getWorkspaceEditorRoute(policy.id));

return (
Expand Down Expand Up @@ -204,8 +190,5 @@ export default compose(
return `${ONYXKEYS.COLLECTION.POLICY}${policyID}`;
},
},
allPolicies: {
key: ONYXKEYS.COLLECTION.POLICY,
},
}),
)(WorkspaceSidebar);