Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
66df5d7
Set the reimbursement account loading
neil-marcellini Dec 3, 2022
bafb324
Add extra params to openWorkspaceReimburseView
neil-marcellini Dec 3, 2022
2ea9da4
Reimburse section with loading and offline states
neil-marcellini Dec 6, 2022
89ab681
Use workspace reimburse section
neil-marcellini Dec 6, 2022
0dacb1e
Debounce the loading state to prevent flashing
neil-marcellini Dec 6, 2022
c353af2
Fix prop types
neil-marcellini Dec 6, 2022
df0d06f
Match text style for the offline section
neil-marcellini Dec 6, 2022
8647dcd
Pass the policy to WorkspaceReimburseSection
neil-marcellini Dec 6, 2022
ce92ef1
Render nothing if the VBA is briefly loading
neil-marcellini Dec 7, 2022
211e5d3
Reduce loading debounce for a more responsive feel
neil-marcellini Dec 7, 2022
dde6907
Default the VBA to loading on the reimburse view
neil-marcellini Dec 7, 2022
2da2fec
Always debounce the loading spinner
neil-marcellini Dec 7, 2022
4292962
More descriptive name for state variable
neil-marcellini Dec 7, 2022
04db048
Use money wings for the offline illustration
neil-marcellini Dec 8, 2022
6d18d26
Remove useless promise return
neil-marcellini Dec 8, 2022
2a80599
Merge branch 'main' into neil-fix-reimburse
neil-marcellini Dec 8, 2022
8ec3222
Use a constant for loading spinner debounce time
neil-marcellini Dec 8, 2022
9db3ada
Explain setting isLoading with a separate action
neil-marcellini Dec 12, 2022
eaad93b
Also replace the existing message so that we are comparing the same t…
stitesExpensify Dec 12, 2022
935806e
Adds a keyboardDidHide listener to scroll to the last message after e…
priyeshshah11 Dec 12, 2022
0111f45
Load pdfjs webworker script from source
marcaaron Dec 13, 2022
3adf380
fixed typo & moved the listener inside the if block
priyeshshah11 Dec 13, 2022
5f3dff2
change keyboard type
sketchydroide Dec 13, 2022
f842a56
linter, need single quotes
sketchydroide Dec 13, 2022
e42a721
DRY up filter code
stitesExpensify Dec 13, 2022
e1630c1
Merge branch 'main' of github.com:Expensify/App into stites-fixQuoteEdit
stitesExpensify Dec 13, 2022
a6ef5b9
Merge branch 'main' into neil-fix-reimburse
neil-marcellini Dec 13, 2022
d2f08c9
Merge branch 'main' of github.com:Expensify/App into stites-fixQuoteEdit
stitesExpensify Dec 13, 2022
0f02541
Merge branch 'main' to fix lint
neil-marcellini Dec 13, 2022
b7c0703
added Keyboard import
priyeshshah11 Dec 13, 2022
41258f4
Make skeleton list footer dynamic based report action list height
yuwenmemon Dec 14, 2022
95f73c0
Make sure the skeleton renders properly and only when it needs to
yuwenmemon Dec 14, 2022
677745a
Make sure we don't animate if we're offline
yuwenmemon Dec 14, 2022
97d2843
Add a delay for android to allow animation to finish
tgolen Dec 14, 2022
50b4e2d
Merge branch 'main' into tgolen-fix-edit-comment-focus
tgolen Dec 14, 2022
ebbb2ac
Reduce animation length to a minimum
tgolen Dec 14, 2022
455cb41
Fix typo
tgolen Dec 14, 2022
940d2c1
fixed lint errors
priyeshshah11 Dec 14, 2022
3f2662e
Updated comment to be technical
priyeshshah11 Dec 15, 2022
9c7bc48
Updated comment to be user friendly
priyeshshah11 Dec 15, 2022
869a811
show tooltip for emoji picker button on hover the outer part
situchan Dec 15, 2022
c195e36
this fixes the issue
sketchydroide Dec 15, 2022
42cad37
this is confusing, so I'm removing, the change is actually done in th…
sketchydroide Dec 15, 2022
7d9c9d0
adding some context
sketchydroide Dec 15, 2022
a69d951
only apply this to android
sketchydroide Dec 15, 2022
aa8f7e4
removed unnecessary comment
priyeshshah11 Dec 15, 2022
f713f3d
using correct way to get platform
sketchydroide Dec 15, 2022
0b6d7b2
forgot import
sketchydroide Dec 15, 2022
c7b6206
maybe this was missing something, Webstorm was acting weird, had to r…
sketchydroide Dec 15, 2022
4114ef9
arghh, I hope this is that last one
sketchydroide Dec 15, 2022
a7674d4
Update src/libs/focusTextInputAfterAnimation/index.android.js
tgolen Dec 15, 2022
fa187d8
Increase animation time to 100ms
tgolen Dec 15, 2022
7340a47
removing autocorrect, we don't want that on an email
sketchydroide Dec 15, 2022
f15f96e
Merge pull request #13368 from Expensify/neil-fix-reimburse
neil-marcellini Dec 15, 2022
b0571a7
Merge branch 'main' of github.com:Expensify/App into yuwen-skeletonRe…
yuwenmemon Dec 15, 2022
2ac451f
Add comment
yuwenmemon Dec 15, 2022
0d62cc2
Merge pull request #13612 from situchan/fix/13455-tooltip-hover-emoji
thienlnam Dec 15, 2022
79a3d62
Merge pull request #13557 from Expensify/afonseca_change_keyboard_type
dangrous Dec 15, 2022
e9da529
Merge pull request #13546 from Expensify/marcaaron-fixPDFPreview
danieldoglas Dec 15, 2022
e144022
Merge pull request #13536 from Expensify/stites-fixQuoteEdit
marcochavezf Dec 15, 2022
b027a6c
escaping backslash
chiragsalian Dec 15, 2022
12f56ea
Merge pull request #13543 from priyeshshah11/fix-12198
dangrous Dec 15, 2022
92c7f76
permission update
chiragsalian Dec 15, 2022
41c0c63
Merge pull request #13635 from Expensify/chirag-deploy-fix-4
AndrewGable Dec 15, 2022
fd5fcb1
some console logs
chiragsalian Dec 15, 2022
85f10ec
string interpolation
chiragsalian Dec 15, 2022
3a662ba
updating actions
chiragsalian Dec 15, 2022
0e17da8
Merge pull request #13640 from Expensify/chirag-deploy-logs
francoisl Dec 15, 2022
1192950
Merge pull request #13621 from Expensify/afonseca_fix_caps_android_ro…
aldo-expensify Dec 15, 2022
18983f8
Merge pull request #13593 from Expensify/tgolen-fix-edit-comment-focus
AndrewGable Dec 15, 2022
35a7420
Escaping all instances of backslash
chiragsalian Dec 15, 2022
02065d0
updating the actions
chiragsalian Dec 15, 2022
1c9b81b
removing log since its no longer needed
chiragsalian Dec 15, 2022
e4daa15
Merge pull request #13644 from Expensify/chirag-deploy-fix-5
luacmartins Dec 15, 2022
3620bf2
Merge pull request #13590 from Expensify/yuwen-skeletonReportActionsList
yuwenmemon Dec 15, 2022
924df2a
Update version to 1.2.41-0
OSBotify Dec 16, 2022
1e0be12
Merge pull request #13652 from Expensify/version-PATCH-07CC243D-3F58-…
OSBotify Dec 16, 2022
3708a70
Merge branch 'main' into update-staging-from-main
OSBotify Dec 16, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,11 @@ function getMergeLogsAsJSON(fromRef, toRef) {
// Remove any double-quotes from commit subjects
let sanitizedOutput = stdout.replace(/(?<="subject": ").*(?="})/g, subject => subject.replace(/"/g, "'"));

// Also remove any newlines
sanitizedOutput = sanitizedOutput.replace(/(\r\n|\n|\r)/gm, '');
// Also remove any newlines and escape backslashes
sanitizedOutput = sanitizedOutput.replace(/(\r\n|\n|\r)/gm, '').replace(/\\/g, '\\\\');

// Then format as JSON and convert to a proper JS object
const json = `[${sanitizedOutput}]`.replace('},]', '}]')

// Escape backslashes in commit messages that end with a backslash
.replace('\\"}', '\\\\"}');
const json = `[${sanitizedOutput}]`.replace('},]', '}]');

return JSON.parse(json);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,11 @@ function getMergeLogsAsJSON(fromRef, toRef) {
// Remove any double-quotes from commit subjects
let sanitizedOutput = stdout.replace(/(?<="subject": ").*(?="})/g, subject => subject.replace(/"/g, "'"));

// Also remove any newlines
sanitizedOutput = sanitizedOutput.replace(/(\r\n|\n|\r)/gm, '');
// Also remove any newlines and escape backslashes
sanitizedOutput = sanitizedOutput.replace(/(\r\n|\n|\r)/gm, '').replace(/\\/g, '\\\\');

// Then format as JSON and convert to a proper JS object
const json = `[${sanitizedOutput}]`.replace('},]', '}]')

// Escape backslashes in commit messages that end with a backslash
.replace('\\"}', '\\\\"}');
const json = `[${sanitizedOutput}]`.replace('},]', '}]');

return JSON.parse(json);
});
Expand Down
2 changes: 1 addition & 1 deletion .github/libs/GitUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function getMergeLogsAsJSON(fromRef, toRef) {
let sanitizedOutput = stdout.replace(/(?<="subject": ").*(?="})/g, subject => subject.replace(/"/g, "'"));

// Also remove any newlines and escape backslashes
sanitizedOutput = sanitizedOutput.replace(/(\r\n|\n|\r)/gm, '').replace('\\', '\\\\');
sanitizedOutput = sanitizedOutput.replace(/(\r\n|\n|\r)/gm, '').replace(/\\/g, '\\\\');

// Then format as JSON and convert to a proper JS object
const json = `[${sanitizedOutput}]`.replace('},]', '}]');
Expand Down
Empty file modified .github/scripts/buildActions.sh
100644 → 100755
Empty file.
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 1001024003
versionName "1.2.40-3"
versionCode 1001024100
versionName "1.2.41-0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down
7 changes: 7 additions & 0 deletions config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
],
},

// We are importing this worker as a string by using asset/source otherwise it will default to loading via an HTTPS request later.
// This causes issues if we have gone offline before the pdfjs web worker is set up as we won't be able to load it from the server.
{
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.js'),
type: 'asset/source',
},

// Rule for react-native-web-webview
{
test: /postMock.html$/,
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.40</string>
<string>1.2.41</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.2.40.3</string>
<string>1.2.41.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.40</string>
<string>1.2.41</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.40.3</string>
<string>1.2.41.0</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.40-3",
"version": "1.2.41-0",
"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
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ const CONST = {
SIDEBAR_LOADED: 'sidebar_loaded',
COLD: 'cold',
REPORT_ACTION_ITEM_LAYOUT_DEBOUNCE_TIME: 1500,
SHOW_LOADING_SPINNER_DEBOUNCE_TIME: 250,
TOOLTIP_SENSE: 1000,
SPINNER_TIMEOUT: 15 * 1000,
TRIE_INITIALIZATION: 'trie_initialization',
Expand Down
30 changes: 15 additions & 15 deletions src/components/EmojiPicker/EmojiPickerButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ const defaultProps = {
const EmojiPickerButton = (props) => {
let emojiPopoverAnchor = null;
return (
<Pressable
ref={el => emojiPopoverAnchor = el}
style={({hovered, pressed}) => ([
styles.chatItemEmojiButton,
StyleUtils.getButtonBackgroundColorStyle(getButtonState(hovered, pressed)),
])}
disabled={props.isDisabled}
onPress={() => EmojiPickerAction.showEmojiPicker(props.onModalHide, props.onEmojiSelected, emojiPopoverAnchor)}
nativeID={props.nativeID}
>
{({hovered, pressed}) => (
<Tooltip text={props.translate('reportActionCompose.emoji')}>
<Tooltip containerStyles={[styles.alignSelfEnd]} text={props.translate('reportActionCompose.emoji')}>
<Pressable
ref={el => emojiPopoverAnchor = el}
style={({hovered, pressed}) => ([
styles.chatItemEmojiButton,
StyleUtils.getButtonBackgroundColorStyle(getButtonState(hovered, pressed)),
])}
disabled={props.isDisabled}
onPress={() => EmojiPickerAction.showEmojiPicker(props.onModalHide, props.onEmojiSelected, emojiPopoverAnchor)}
nativeID={props.nativeID}
>
{({hovered, pressed}) => (
<Icon
src={Expensicons.Emoji}
fill={StyleUtils.getIconFillColor(getButtonState(hovered, pressed))}
/>
</Tooltip>
)}
</Pressable>
)}
</Pressable>
</Tooltip>
);
};

Expand Down
6 changes: 5 additions & 1 deletion src/components/PDFView/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import _ from 'underscore';
import React, {Component} from 'react';
import {View, Dimensions} from 'react-native';
import {Document, Page} from 'react-pdf/dist/esm/entry.webpack';
import {Document, Page, pdfjs} from 'react-pdf/dist/esm/entry.webpack';
import pdfWorkerSource from 'pdfjs-dist/legacy/build/pdf.worker';
import FullScreenLoadingIndicator from '../FullscreenLoadingIndicator';
import styles from '../../styles/styles';
import variables from '../../styles/variables';
Expand All @@ -27,6 +28,9 @@ class PDFView extends Component {
this.initiatePasswordChallenge = this.initiatePasswordChallenge.bind(this);
this.attemptPDFLoad = this.attemptPDFLoad.bind(this);
this.toggleKeyboardOnSmallScreens = this.toggleKeyboardOnSmallScreens.bind(this);

const workerBlob = new Blob([pdfWorkerSource], {type: 'text/javascript'});
pdfjs.GlobalWorkerOptions.workerSrc = URL.createObjectURL(workerBlob);
}

componentDidUpdate(prevProps) {
Expand Down
4 changes: 3 additions & 1 deletion src/components/RoomNameInput/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import withLocalize from '../withLocalize';
import TextInput from '../TextInput';
import * as roomNameInputPropTypes from './roomNameInputPropTypes';
import * as RoomNameInputUtils from '../../libs/RoomNameInputUtils';
import getOperatingSystem from '../../libs/getOperatingSystem';

class RoomNameInput extends Component {
constructor(props) {
Expand All @@ -23,6 +24,7 @@ class RoomNameInput extends Component {
}

render() {
const keyboardType = getOperatingSystem() === CONST.OS.IOS ? 'default' : 'visible-password';
return (
<TextInput
ref={this.props.forwardedRef}
Expand All @@ -33,8 +35,8 @@ class RoomNameInput extends Component {
onChange={this.setModifiedRoomName}
value={this.props.value.substring(1)} // Since the room name always starts with a prefix, we omit the first character to avoid displaying it twice.
errorText={this.props.errorText}
autoCapitalize="none"
maxLength={CONST.REPORT.MAX_ROOM_NAME_LENGTH}
keyboardType={keyboardType} // this is a bit hacky solution to a RN issue https://github.com/facebook/react-native/issues/27449
/>
);
}
Expand Down
10 changes: 10 additions & 0 deletions src/libs/actions/BankAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,15 @@ function openWorkspaceView() {
API.read('OpenWorkspaceView');
}

/**
* Set the reimbursement account loading so that it happens right away, instead of when the API command is processed.
*
* @param {Boolean} isLoading
*/
function setReimbursementAccountLoading(isLoading) {
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {isLoading});
}

export {
addPersonalBankAccount,
clearOnfidoToken,
Expand All @@ -379,4 +388,5 @@ export {
openWorkspaceView,
validateBankAccount,
verifyIdentityForBankAccount,
setReimbursementAccountLoading,
};
30 changes: 28 additions & 2 deletions src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,13 +902,39 @@ function createWorkspace(ownerEmail = '', makeMeAdmin = false, policyName = '',
});
}

function openWorkspaceReimburseView(policyID) {
/**
*
* @param {string} policyID
* @param {string} subStep The sub step in first step of adding withdrawal bank account
* @param {*} localCurrentStep The locally stored current step of adding a withdrawal bank account
*/
function openWorkspaceReimburseView(policyID, subStep, localCurrentStep) {
if (!policyID) {
Log.warn('openWorkspaceReimburseView invalid params', {policyID});
return;
}
const onyxData = {
successData: [
{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
value: {
isLoading: false,
},
},
],
failureData: [
{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
value: {
isLoading: false,
},
},
],
};

API.read('OpenWorkspaceReimburseView', {policyID});
API.read('OpenWorkspaceReimburseView', {policyID, subStep, localCurrentStep}, onyxData);
}

function openWorkspaceMembersPage(policyID, clientMemberEmails) {
Expand Down
6 changes: 4 additions & 2 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,9 @@ function editReportComment(reportID, originalReportAction, textForNewComment) {

// Do not autolink if someone explicitly tries to remove a link from message.
// https://github.com/Expensify/App/issues/9090
const htmlForNewComment = parser.replace(textForNewComment, {filterRules: _.filter(_.pluck(parser.rules, 'name'), name => name !== 'autolink')});
const autolinkFilter = {filterRules: _.filter(_.pluck(parser.rules, 'name'), name => name !== 'autolink')};
const htmlForNewComment = parser.replace(textForNewComment, autolinkFilter);
const originalMessageHTML = parser.replace(originalReportAction.message[0].html, autolinkFilter);

// Delete the comment if it's empty
if (_.isEmpty(htmlForNewComment)) {
Expand All @@ -913,7 +915,7 @@ function editReportComment(reportID, originalReportAction, textForNewComment) {
}

// Skip the Edit if message is not changed
if (originalReportAction.message[0].html === htmlForNewComment.trim()) {
if (originalMessageHTML === htmlForNewComment.trim()) {
return;
}

Expand Down
17 changes: 17 additions & 0 deletions src/libs/focusTextInputAfterAnimation/index.android.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* For native Android devices, if an input is focused while an animation is happening, then the keyboard is not displayed. Delaying the focus until after the animation is done will ensure
* that the keyboard opens properly.
*
* @param {Object} inputRef
* @param {Number} animationLength you must use your best guess as to what a good animationLength is. It can't be too short, or the animation won't be finished. It can't be too long or
* the user will notice that it feels sluggish
*/
const focusTextInputAfterAnimation = (inputRef, animationLength = 0) => {
// This setTimeout is necessary because there are some animations that are just impossible to listen to in order to determine when they are finished (like when items are added to
// a FlatList).
setTimeout(() => {
inputRef.focus();
}, animationLength);
};

export default focusTextInputAfterAnimation;
11 changes: 11 additions & 0 deletions src/libs/focusTextInputAfterAnimation/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This library is a no-op for all platforms except for Android and will immediately focus the given input without any delays. This is important for native iOS clients because
* text inputs can only be focused from user interactions and wrapping the focus() inside a setTimeout breaks that use case since it's no longer triggered from a user interaction.
*
* @param {Object} inputRef
*/
const focusTextInputAfterAnimation = (inputRef) => {
inputRef.focus();
};

export default focusTextInputAfterAnimation;
5 changes: 4 additions & 1 deletion src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import * as ReportUtils from '../../../libs/ReportUtils';
import OfflineWithFeedback from '../../../components/OfflineWithFeedback';
import * as ReportActions from '../../../libs/actions/ReportActions';
import reportPropTypes from '../../reportPropTypes';
import focusTextInputAfterAnimation from '../../../libs/focusTextInputAfterAnimation';

const propTypes = {
/** Report for this action */
Expand Down Expand Up @@ -95,7 +96,9 @@ class ReportActionItem extends Component {
}

// Only focus the input when user edits a message, skip it for existing drafts being edited of the report.
this.textInput.focus();
// There is an animation when the comment is hidden and the edit form is shown, and there can be bugs on different mobile platforms
// if the input is given focus in the middle of that animation which can prevent the keyboard from opening.
focusTextInputAfterAnimation(this.textInput, 100);
}

checkIfContextMenuActive() {
Expand Down
10 changes: 9 additions & 1 deletion src/pages/home/report/ReportActionItemMessageEdit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import lodashGet from 'lodash/get';
import React from 'react';
import {InteractionManager, View} from 'react-native';
import {InteractionManager, Keyboard, View} from 'react-native';
import PropTypes from 'prop-types';
import _ from 'underscore';
import ExpensiMark from 'expensify-common/lib/ExpensiMark';
Expand Down Expand Up @@ -131,6 +131,14 @@ class ReportActionItemMessageEdit extends React.Component {
Report.saveReportActionDraft(this.props.reportID, this.props.action.reportActionID, '');
toggleReportActionComposeView(true, this.props.isSmallScreenWidth);
ReportActionComposeFocusManager.focus();

// Scroll to the last comment after editing to make sure the whole comment is clearly visible in the report.
if (this.props.index === 0) {
const keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', () => {
ReportScrollManager.scrollToIndex({animated: true, index: this.props.index}, false);
keyboardDidHideListener.remove();
});
}
}

/**
Expand Down
Loading