From dfd8eff3bd42f14ba3ad980c37c5e05deaa92ada Mon Sep 17 00:00:00 2001 From: OSBotify <76178356+OSBotify@users.noreply.github.com> Date: Wed, 7 Dec 2022 18:04:41 -0500 Subject: [PATCH 1/2] Merge pull request #13421 from Expensify/version-BUILD-5E71025F-37A7-4D23-8D64-D4EC52F6ADAC Update version to 1.2.36-4 on main (cherry picked from commit 367119d312f2af3675ecce8fbccf283b41062a42) --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5600b6971b7b..51a571a10c0a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -156,8 +156,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001023603 - versionName "1.2.36-3" + versionCode 1001023604 + versionName "1.2.36-4" buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() if (isNewArchitectureEnabled()) { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 1cb734fde960..985d07759945 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -30,7 +30,7 @@ CFBundleVersion - 1.2.36.3 + 1.2.36.4 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 66d60e085b67..6b4f494ff64b 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.2.36.3 + 1.2.36.4 diff --git a/package-lock.json b/package-lock.json index a88652479b69..f23acc9ed36c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.2.36-3", + "version": "1.2.36-4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.2.36-3", + "version": "1.2.36-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 6bd74b59fcb9..875861e8e693 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.2.36-3", + "version": "1.2.36-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.", From 69b382e8d1da3d90dc75dd8d70354302eefb15e9 Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Wed, 7 Dec 2022 14:47:51 -0800 Subject: [PATCH 2/2] Merge pull request #13412 from Expensify/tgolen-fix-currency-selector (cherry picked from commit c9de2b409f6d41768467d8c455ed4cb598f5b88b) --- src/libs/OptionsListUtils.js | 18 ------------------ src/pages/iou/IOUCurrencySelection.js | 15 ++++++--------- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index bc9a4facd57f..758e00a6fecb 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -779,23 +779,6 @@ function getHeaderMessage(hasSelectableOptions, hasUserToInvite, searchValue, ma return ''; } -/** - * Returns the currency list for sections display - * - * @param {Object} currencyOptions - * @param {String} searchValue - * @returns {Array} - */ -function getCurrencyListForSections(currencyOptions, searchValue) { - const filteredOptions = _.filter(currencyOptions, currencyOption => ( - isSearchStringMatch(searchValue, currencyOption.text))); - - return { - // returns filtered options i.e. options with string match if search text is entered - currencyOptions: filteredOptions, - }; -} - export { addSMSDomainIfPhoneNumber, isCurrentUser, @@ -804,7 +787,6 @@ export { getMemberInviteOptions, getHeaderMessage, getPersonalDetailsForLogins, - getCurrencyListForSections, getIOUConfirmationOptionsFromMyPersonalDetail, getIOUConfirmationOptionsFromParticipants, getSearchText, diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 2621b19ce81f..b7affe898beb 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -3,7 +3,6 @@ import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; import ONYXKEYS from '../../ONYXKEYS'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; import OptionsSelector from '../../components/OptionsSelector'; import Navigation from '../../libs/Navigation/Navigation'; import ScreenWrapper from '../../components/ScreenWrapper'; @@ -41,11 +40,9 @@ class IOUCurrencySelection extends Component { constructor(props) { super(props); - const {currencyOptions} = OptionsListUtils.getCurrencyListForSections(this.getCurrencyOptions(this.props.currencyList), ''); - this.state = { searchValue: '', - currencyData: currencyOptions, + currencyData: this.getCurrencyOptions(this.props.currencyList), }; this.getCurrencyOptions = this.getCurrencyOptions.bind(this); this.getSections = this.getSections.bind(this); @@ -90,13 +87,13 @@ class IOUCurrencySelection extends Component { * @return {void} */ changeSearchValue(searchValue) { - const {currencyOptions} = OptionsListUtils.getCurrencyListForSections( - this.getCurrencyOptions(this.props.currencyList), - searchValue, - ); + const currencyOptions = this.getCurrencyOptions(this.props.currencyList); + const searchRegex = new RegExp(searchValue, 'i'); + const filteredCurrencies = _.filter(currencyOptions, currencyOption => searchRegex.test(currencyOption.text)); + this.setState({ searchValue, - currencyData: currencyOptions, + currencyData: filteredCurrencies, }); }