diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml
index db76a651b818..245801923139 100644
--- a/.github/workflows/cherryPick.yml
+++ b/.github/workflows/cherryPick.yml
@@ -84,7 +84,7 @@ jobs:
- name: Save correct NEW_VERSION to env
run: |
- if [[ -z ${{ github.event.inputs.NEW_VERSION }} ]]; then
+ if [ -z ${{ github.event.inputs.NEW_VERSION }} ]; then
echo "NEW_VERSION=${{ needs.createNewVersion.outputs.NEW_VERSION }}" >> $GITHUB_ENV
echo "New version is ${{ env.NEW_VERSION }}"
else
@@ -120,6 +120,9 @@ jobs:
echo "::set-output name=SHOULD_AUTOMERGE::false"
fi
+ - name: Push changes to CP branch
+ run: git push
+
- name: Create Pull Request
id: createPullRequest
# Version: 2.4.3
diff --git a/.github/workflows/updateProtectedBranch.yml b/.github/workflows/updateProtectedBranch.yml
index 70aa094221f4..c926f8e44ae9 100644
--- a/.github/workflows/updateProtectedBranch.yml
+++ b/.github/workflows/updateProtectedBranch.yml
@@ -30,16 +30,16 @@ jobs:
echo "Cannot update main branch without specifying a source branch"
exit 1
- # If updating staging, the head branch will always be main
- # If updating production, the head branch will always be staging
+ # If updating staging, the source branch will always be main
+ # If updating production, the source branch will always be staging
- name: Set source branch
run: |
if [[ ${{ github.event.inputs.TARGET_BRANCH }} == 'staging' ]]; then
- echo "HEAD_BRANCH=main" >> $GITHUB_ENV
+ echo "SOURCE_BRANCH=main" >> $GITHUB_ENV
elif [[ ${{ github.event.inputs.TARGET_BRANCH }} == 'production' ]]; then
- echo "HEAD_BRANCH=staging" >> $GITHUB_ENV
+ echo "SOURCE_BRANCH=staging" >> $GITHUB_ENV
else
- echo "HEAD_BRANCH=${{ github.event.inputs.SOURCE_BRANCH }}" >> $GITHUB_ENV
+ echo "SOURCE_BRANCH=${{ github.event.inputs.SOURCE_BRANCH }}" >> $GITHUB_ENV
fi
# Version: 2.3.4
@@ -48,18 +48,28 @@ jobs:
fetch-depth: 0
token: ${{ secrets.OS_BOTIFY_TOKEN }}
- - name: Checkout head branch
- run: git checkout ${{ env.HEAD_BRANCH }}
+ - name: Checkout source branch
+ run: git checkout ${{ env.SOURCE_BRANCH }}
- name: Set New Version
run: echo "NEW_VERSION=$(npm run print-version --silent)" >> $GITHUB_ENV
+ - name: Create temporary branch to resolve conflicts
+ if: ${{ contains(fromJSON('["staging", "production"]'), github.event.inputs.TARGET_BRANCH) }}
+ run: |
+ git config user.name ${{ github.actor }}
+ git checkout ${{ github.event.inputs.TARGET_BRANCH }}
+ git checkout -b update-${{ github.event.inputs.TARGET_BRANCH }}-from-${{ env.SOURCE_BRANCH }}
+ git merge -Xtheirs ${{ env.SOURCE_BRANCH }}
+ git push --set-upstream origin update-${{ github.event.inputs.TARGET_BRANCH }}-from-${{ env.SOURCE_BRANCH }}
+ echo "SOURCE_BRANCH=update-${{ github.event.inputs.TARGET_BRANCH }}-from-${{ env.SOURCE_BRANCH }}" >> $GITHUB_ENV
+
- name: Create Pull Request
id: createPullRequest
# Version: 2.4.3
uses: repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3
with:
- source_branch: ${{ env.HEAD_BRANCH }}
+ source_branch: ${{ env.SOURCE_BRANCH }}
destination_branch: ${{ github.event.inputs.TARGET_BRANCH }}
github_token: ${{ secrets.OS_BOTIFY_TOKEN }}
pr_title: Update version to ${{ env.NEW_VERSION }} on ${{ github.event.inputs.TARGET_BRANCH }}
diff --git a/android/app/build.gradle b/android/app/build.gradle
index db40e1537e52..e78b73cdf91c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -148,8 +148,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
- versionCode 1001006605
- versionName "1.0.66-5"
+ versionCode 1001006613
+ versionName "1.0.66-13"
}
splits {
abi {
diff --git a/ios/ExpensifyCash/Info.plist b/ios/ExpensifyCash/Info.plist
index 5420ad9ae1eb..750bf36a13f1 100644
--- a/ios/ExpensifyCash/Info.plist
+++ b/ios/ExpensifyCash/Info.plist
@@ -30,7 +30,7 @@
CFBundleVersion
- 1.0.66.5
+ 1.0.66.13
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
diff --git a/ios/ExpensifyCashTests/Info.plist b/ios/ExpensifyCashTests/Info.plist
index eee15df15375..1221ef74bad2 100644
--- a/ios/ExpensifyCashTests/Info.plist
+++ b/ios/ExpensifyCashTests/Info.plist
@@ -19,6 +19,6 @@
CFBundleSignature
????
CFBundleVersion
- 1.0.66.5
+ 1.0.66.13
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 80f75b7712b9..689a21969a4b 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1,15 +1,15 @@
PODS:
- - Airship (14.2.0):
- - Airship/Automation (= 14.2.0)
- - Airship/Core (= 14.2.0)
- - Airship/ExtendedActions (= 14.2.0)
- - Airship/MessageCenter (= 14.2.0)
- - Airship/Automation (14.2.0):
+ - Airship (14.3.0):
+ - Airship/Automation (= 14.3.0)
+ - Airship/Core (= 14.3.0)
+ - Airship/ExtendedActions (= 14.3.0)
+ - Airship/MessageCenter (= 14.3.0)
+ - Airship/Automation (14.3.0):
- Airship/Core
- - Airship/Core (14.2.0)
- - Airship/ExtendedActions (14.2.0):
+ - Airship/Core (14.3.0)
+ - Airship/ExtendedActions (14.3.0):
- Airship/Core
- - Airship/MessageCenter (14.2.0):
+ - Airship/MessageCenter (14.3.0):
- Airship/Core
- boost-for-react-native (1.63.0)
- CocoaAsyncSocket (7.6.5)
@@ -494,8 +494,8 @@ PODS:
- React-Core
- RNSVG (12.1.0):
- React
- - urbanairship-react-native (10.0.0):
- - Airship (= 14.2.0)
+ - urbanairship-react-native (11.0.1):
+ - Airship (= 14.3.0)
- React-Core
- Yoga (1.14.0)
- YogaKit (1.18.1):
@@ -728,12 +728,12 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
- Airship: 02ad73780f9eed21870e36b0aaab327acda6a102
+ Airship: 7609d263d3a207f112d6db066af5852b80af6819
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
- DoubleConversion: cde416483dac037923206447da6e1454df403714
+ DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: 7b423f9e248eae65987838148c36eec1dbfe0b53
- FBReactNativeSpec: 884d4cc2b011759361797a4035c47e10099393b5
+ FBReactNativeSpec: 825b0f0851f5cc5c6268a920286281f62fc96c37
Firebase: c23a36d9e4cdf7877dfcba8dd0c58add66358999
FirebaseAnalytics: 3bb096873ee0d7fa4b6c70f5e9166b6da413cc7f
FirebaseCore: d3a978a3cfa3240bf7e4ba7d137fdf5b22b628ec
@@ -747,7 +747,7 @@ SPEC CHECKSUMS:
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154
FlipperKit: 8a20b5c5fcf9436cac58551dc049867247f64b00
- glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
+ glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62
GoogleAppMeasurement: a6a3a066369828db64eda428cb2856dc1cdc7c4e
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
@@ -808,7 +808,7 @@ SPEC CHECKSUMS:
RNReanimated: b8c8004b43446e3c2709fe64b2b41072f87428ad
RNScreens: e8e8dd0588b5da0ab57dcca76ab9b2d8987757e0
RNSVG: ce9d996113475209013317e48b05c21ee988d42e
- urbanairship-react-native: dfb6dc22b2f41ccaadd636b73d51b448cd1b2bbc
+ urbanairship-react-native: d415a12e67ba93bf3ce914df9a310b66a88a5cc3
Yoga: a7de31c64fe738607e7a3803e3f591a4b1df7393
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
diff --git a/package-lock.json b/package-lock.json
index 6216280967b0..ad3f4ce36cac 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
- "version": "1.0.66-5",
+ "version": "1.0.66-13",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -38431,9 +38431,9 @@
}
},
"urbanairship-react-native": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/urbanairship-react-native/-/urbanairship-react-native-10.0.0.tgz",
- "integrity": "sha512-0vJ6K+KnGeB5vJujFzfWXc7x+nFkdELj4TSOBkfW0VfxrQpojIXmOdXt0GHWOUOVTzFj2iA25qkfcSAaImQeGw=="
+ "version": "11.0.1",
+ "resolved": "https://registry.npmjs.org/urbanairship-react-native/-/urbanairship-react-native-11.0.1.tgz",
+ "integrity": "sha512-QNXz655hBveFSv5kMFivhUkpHopt0ojIFCWEP+H0vssKjrO8z0xDmlM6Gd4aeUT63nwTaAUbH7zU8qTLFFrs+w=="
},
"uri-js": {
"version": "4.4.0",
diff --git a/package.json b/package.json
index c63abaee41cb..0260ad51769f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
- "version": "1.0.66-5",
+ "version": "1.0.66-13",
"author": "Expensify, Inc.",
"homepage": "https://expensify.cash",
"description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
@@ -97,7 +97,7 @@
"rn-fetch-blob": "^0.12.0",
"save": "^2.4.0",
"underscore": "^1.10.2",
- "urbanairship-react-native": "^10.0.0"
+ "urbanairship-react-native": "^11.0.1"
},
"devDependencies": {
"@actions/core": "^1.2.6",
diff --git a/src/CONST.js b/src/CONST.js
index 71a80cf4f0b7..d268f302177f 100755
--- a/src/CONST.js
+++ b/src/CONST.js
@@ -231,6 +231,8 @@ const CONST = {
WARNING: 'warning',
DURATION: 2000,
},
+
+ DEFAULT_LOCALE: 'en',
};
export default CONST;
diff --git a/src/components/withLocalize.js b/src/components/withLocalize.js
index 4a45ac62004e..28b9409796d3 100755
--- a/src/components/withLocalize.js
+++ b/src/components/withLocalize.js
@@ -8,6 +8,7 @@ import {translate} from '../libs/translate';
import DateUtils from '../libs/DateUtils';
import {toLocalPhone, fromLocalPhone} from '../libs/LocalePhoneNumber';
import numberFormat from '../libs/numberFormat';
+import CONST from '../CONST';
const withLocalizePropTypes = {
/** Returns translated string for given locale and phrase */
@@ -66,7 +67,7 @@ function withLocalizeHOC(WrappedComponent) {
]),
};
WithLocalize.defaultProps = {
- preferredLocale: 'en',
+ preferredLocale: CONST.DEFAULT_LOCALE,
forwardedRef: undefined,
};
return React.forwardRef((props, ref) => (
diff --git a/src/languages/en.js b/src/languages/en.js
index cfe1a9790ade..89b0f5076fca 100755
--- a/src/languages/en.js
+++ b/src/languages/en.js
@@ -79,6 +79,7 @@ export default {
addAttachment: 'Add Attachment',
writeSomething: 'Write something...',
youAppearToBeOffline: 'You appear to be offline.',
+ fileUploadFailed: 'Upload Failed. File is not supported.',
},
reportActionContextMenu: {
copyToClipboard: 'Copy to Clipboard',
@@ -220,7 +221,7 @@ export default {
phrase2: 'terms of service',
phrase3: 'and',
phrase4: 'privacy policy',
- phrase5: '. Money transmission is provided by Expensify Payments LLC (NMLS ID:2017010) pursuant to its',
+ phrase5: 'Money transmission is provided by Expensify Payments LLC (NMLS ID:2017010) pursuant to its',
phrase6: 'licenses',
},
passwordForm: {
diff --git a/src/languages/es.js b/src/languages/es.js
index a199c313d8da..6bc5675e40bb 100644
--- a/src/languages/es.js
+++ b/src/languages/es.js
@@ -216,7 +216,7 @@ export default {
phrase2: 'términos de servicio',
phrase3: 'y',
phrase4: 'política de privacidad',
- phrase5: '. El envío de dinero es brindado por Expensify Payments LLC (NMLS ID:2017010) de conformidad con sus',
+ phrase5: 'El envío de dinero es brindado por Expensify Payments LLC (NMLS ID:2017010) de conformidad con sus',
phrase6: 'licencias',
},
passwordForm: {
diff --git a/src/libs/Network.js b/src/libs/Network.js
index e6f13c476564..5116cc2d002d 100644
--- a/src/libs/Network.js
+++ b/src/libs/Network.js
@@ -39,8 +39,8 @@ Onyx.connect({
// Merge the persisted requests with the requests in memory then clear out the queue as we only need to load
// this once when the app initializes
networkRequestQueue = [...networkRequestQueue, ...persistedRequests];
- Onyx.set(ONYXKEYS.NETWORK_REQUEST_QUEUE, []);
didLoadPersistedRequests = true;
+ Onyx.set(ONYXKEYS.NETWORK_REQUEST_QUEUE, []);
},
});
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js
index 5f8e4e475723..ce05c41675b7 100644
--- a/src/libs/actions/Report.js
+++ b/src/libs/actions/Report.js
@@ -21,6 +21,8 @@ import Log from '../Log';
import {isReportMessageAttachment, sortReportsByLastVisited} from '../reportUtils';
import Timers from '../Timers';
import {dangerouslyGetReportActionsMaxSequenceNumber, isReportMissingActions} from './ReportActions';
+import Growl from '../Growl';
+import {translate} from '../translate';
let currentUserEmail;
let currentUserAccountID;
@@ -57,6 +59,16 @@ Onyx.connect({
},
});
+let translateLocal = (phrase, variables) => translate(CONST.DEFAULT_LOCALE, phrase, variables);
+Onyx.connect({
+ key: ONYXKEYS.PREFERRED_LOCALE,
+ callback: (preferredLocale) => {
+ if (preferredLocale) {
+ translateLocal = (phrase, variables) => translate(preferredLocale, phrase, variables);
+ }
+ },
+});
+
const typingWatchTimers = {};
/**
@@ -1043,7 +1055,17 @@ function addAction(reportID, text, file) {
// the same way report actions can.
persist: !isAttachment,
})
- .then(({reportAction}) => updateReportWithNewAction(reportID, reportAction));
+ .then((response) => {
+ if (response.jsonCode === 408) {
+ Growl.show(translateLocal('reportActionCompose.fileUploadFailed'), CONST.GROWL.ERROR);
+ Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {
+ [optimisticReportActionID]: null,
+ });
+ console.error(response.message);
+ return;
+ }
+ updateReportWithNewAction(reportID, response.reportAction);
+ });
}
/**
diff --git a/src/libs/translate.js b/src/libs/translate.js
index 7560fdc15626..2d548f8acd84 100644
--- a/src/libs/translate.js
+++ b/src/libs/translate.js
@@ -3,6 +3,7 @@ import Str from 'expensify-common/lib/str';
import Log from './Log';
import Config from '../CONFIG';
import translations from '../languages/translations';
+import CONST from '../CONST';
/**
* Return translated string for given locale and phrase
@@ -12,7 +13,8 @@ import translations from '../languages/translations';
* @param {Object} [variables]
* @returns {String}
*/
-function translate(locale = 'en', phrase, variables = {}) {
+// eslint-disable-next-line no-undef
+function translate(locale = CONST.DEFAULT_LOCALE, phrase, variables = {}) {
const localeLanguage = locale.substring(0, 2);
const fullLocale = lodashGet(translations, locale, {});
const language = lodashGet(translations, localeLanguage, {});
diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js
index 6b94785958f2..96b2153541f3 100755
--- a/src/pages/NewChatPage.js
+++ b/src/pages/NewChatPage.js
@@ -65,6 +65,7 @@ class NewChatPage extends Component {
props.reports,
props.personalDetails,
'',
+ false,
props.betas,
);
@@ -153,6 +154,7 @@ class NewChatPage extends Component {
this.props.reports,
this.props.personalDetails,
searchValue,
+ false,
this.props.betas,
);
this.setState({
diff --git a/src/pages/home/report/ReportActionItemMessageEdit.js b/src/pages/home/report/ReportActionItemMessageEdit.js
index 798fc3ad5d0c..5e9bb1ec625d 100644
--- a/src/pages/home/report/ReportActionItemMessageEdit.js
+++ b/src/pages/home/report/ReportActionItemMessageEdit.js
@@ -62,6 +62,7 @@ class ReportActionItemMessageEdit extends React.Component {
* @param {String} newDraft
*/
updateDraft(newDraft) {
+ this.textInput.setNativeProps({text: newDraft});
const trimmedNewDraft = newDraft.trim();
this.setState({draft: trimmedNewDraft});
this.debouncedSaveDraft(trimmedNewDraft);
@@ -113,6 +114,7 @@ class ReportActionItemMessageEdit extends React.Component {
this.textInput = el}
onChangeText={this.updateDraft} // Debounced saveDraftComment
onKeyPress={this.triggerSaveOrCancel}
defaultValue={this.props.draftMessage}
diff --git a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js
index 19bdb905ccdf..2b671c1f0325 100755
--- a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js
+++ b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js
@@ -21,6 +21,9 @@ const personalDetailsPropTypes = PropTypes.shape({
});
const propTypes = {
+ /** Beta features list */
+ betas: PropTypes.arrayOf(PropTypes.string).isRequired,
+
/** Callback to inform parent modal of success */
onStepComplete: PropTypes.func.isRequired,
@@ -54,6 +57,7 @@ class IOUParticipantsRequest extends Component {
props.personalDetails,
'',
true,
+ props.betas,
);
this.state = {
@@ -125,6 +129,7 @@ class IOUParticipantsRequest extends Component {
this.props.personalDetails,
searchValue,
true,
+ this.props.betas,
);
this.setState({
searchValue,
@@ -153,5 +158,8 @@ export default compose(
reports: {
key: ONYXKEYS.COLLECTION.REPORT,
},
+ betas: {
+ key: ONYXKEYS.BETAS,
+ },
}),
)(IOUParticipantsRequest);
diff --git a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js
index df8b40695799..2aa79d7b9e6e 100755
--- a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js
+++ b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js
@@ -25,6 +25,9 @@ const personalDetailsPropTypes = PropTypes.shape({
});
const propTypes = {
+ /** Beta features list */
+ betas: PropTypes.arrayOf(PropTypes.string).isRequired,
+
/** Callback to inform parent modal of success */
onStepComplete: PropTypes.func.isRequired,
@@ -78,6 +81,7 @@ class IOUParticipantsSplit extends Component {
'',
props.participants,
true,
+ props.betas,
);
this.state = {
@@ -178,6 +182,7 @@ class IOUParticipantsSplit extends Component {
isOptionInList ? prevState.searchValue : '',
newSelectedOptions,
true,
+ this.props.betas,
);
return {
recentReports,
@@ -213,6 +218,7 @@ class IOUParticipantsSplit extends Component {
searchValue,
[],
true,
+ this.props.betas,
);
this.setState({
searchValue,
@@ -253,5 +259,8 @@ export default compose(
reports: {
key: ONYXKEYS.COLLECTION.REPORT,
},
+ betas: {
+ key: ONYXKEYS.BETAS,
+ },
}),
)(IOUParticipantsSplit);
diff --git a/src/pages/signin/TermsAndLicenses/TermsWithLicenses.js b/src/pages/signin/TermsAndLicenses/TermsWithLicenses.js
index 96b287c25da8..03f447154b8d 100755
--- a/src/pages/signin/TermsAndLicenses/TermsWithLicenses.js
+++ b/src/pages/signin/TermsAndLicenses/TermsWithLicenses.js
@@ -22,13 +22,17 @@ const TermsWithLicenses = ({translate}) => (
{translate('termsOfUse.phrase4')}
-
- {translate('termsOfUse.phrase5')}
-
-
- {translate('termsOfUse.phrase6')}
-
.
+
+
+ {translate('termsOfUse.phrase5')}
+ {' '}
+
+
+ {translate('termsOfUse.phrase6')}
+
+ .
+
);