Skip to content

Commit

Permalink
Merge pull request #14434 from Expensify/update-staging-from-main
Browse files Browse the repository at this point in the history
Update version to 1.2.57-2 on staging
  • Loading branch information
OSBotify authored Jan 20, 2023
2 parents 787a201 + c0f3316 commit 21fccb7
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 25 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001025701
versionName "1.2.57-1"
versionCode 1001025702
versionName "1.2.57-2"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
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.2.57.1</string>
<string>1.2.57.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.2.57.1</string>
<string>1.2.57.2</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions 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.2.57-1",
"version": "1.2.57-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
14 changes: 7 additions & 7 deletions src/components/ButtonWithMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ButtonWithMenu extends PureComponent {
super(props);

this.state = {
selectedItem: props.options[0],
selectedItemIndex: 0,
isMenuVisible: false,
};
}
Expand All @@ -53,15 +53,15 @@ class ButtonWithMenu extends PureComponent {
}

render() {
const selectedItemText = this.state.selectedItem.text;
const selectedItem = this.props.options[this.state.selectedItemIndex];
return (
<View>
{this.props.options.length > 1 ? (
<ButtonWithDropdown
buttonText={selectedItemText}
buttonText={selectedItem.text}
isLoading={this.props.isLoading}
isDisabled={this.props.isDisabled}
onButtonPress={event => this.props.onPress(event, this.state.selectedItem.value)}
onButtonPress={event => this.props.onPress(event, selectedItem.value)}
onDropdownPress={() => {
this.setMenuVisibility(true);
}}
Expand All @@ -72,7 +72,7 @@ class ButtonWithMenu extends PureComponent {
isDisabled={this.props.isDisabled}
style={[styles.w100]}
isLoading={this.props.isLoading}
text={selectedItemText}
text={selectedItem.text}
onPress={event => this.props.onPress(event, this.props.options[0].value)}
pressOnEnter
/>
Expand All @@ -84,10 +84,10 @@ class ButtonWithMenu extends PureComponent {
onItemSelected={() => this.setMenuVisibility(false)}
anchorPosition={styles.createMenuPositionRightSidepane}
headerText={this.props.menuHeaderText}
menuItems={_.map(this.props.options, item => ({
menuItems={_.map(this.props.options, (item, index) => ({
...item,
onSelected: () => {
this.setState({selectedItem: item});
this.setState({selectedItemIndex: index});
},
}))}
/>
Expand Down
28 changes: 17 additions & 11 deletions src/components/IOUConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ class IOUConfirmationList extends Component {
...participant, selected: true,
}));

this.splitOrRequestOptions = [{
text: props.translate(props.hasMultipleParticipants ? 'iou.split' : 'iou.request', {
amount: props.numberFormat(
props.iouAmount,
{style: 'currency', currency: props.iou.selectedCurrencyCode},
),
}),
value: props.hasMultipleParticipants ? CONST.IOU.IOU_TYPE.SPLIT : CONST.IOU.IOU_TYPE.REQUEST,
}];

this.state = {
participants: formattedParticipants,
};
Expand All @@ -119,6 +109,22 @@ class IOUConfirmationList extends Component {
this.confirm = this.confirm.bind(this);
}

/**
* Get the confirmation button options
* @returns {Array}
*/
getSplitOrRequestOptions() {
return [{
text: this.props.translate(this.props.hasMultipleParticipants ? 'iou.split' : 'iou.request', {
amount: this.props.numberFormat(
this.props.iouAmount,
{style: 'currency', currency: this.props.iou.selectedCurrencyCode},
),
}),
value: this.props.hasMultipleParticipants ? CONST.IOU.IOU_TYPE.SPLIT : CONST.IOU.IOU_TYPE.REQUEST,
}];
}

/**
* Get selected participants
* @returns {Array}
Expand Down Expand Up @@ -309,7 +315,7 @@ class IOUConfirmationList extends Component {
<ButtonWithMenu
isDisabled={shouldDisableButton}
onPress={(_event, value) => this.confirm(value)}
options={this.splitOrRequestOptions}
options={this.getSplitOrRequestOptions()}
/>
)}
/>
Expand Down

0 comments on commit 21fccb7

Please sign in to comment.