Skip to content

Commit

Permalink
Merge pull request #12734 from Expensify/OSBotify-cherry-pick-staging…
Browse files Browse the repository at this point in the history
…-12722

🍒 Cherry pick PR #12722 to staging 🍒
  • Loading branch information
OSBotify authored Nov 15, 2022
2 parents 3bf0b72 + 497f3d7 commit 10ed3fd
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 53 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 1001022703
versionName "1.2.27-3"
versionCode 1001022704
versionName "1.2.27-4"
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.27.3</string>
<string>1.2.27.4</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.27.3</string>
<string>1.2.27.4</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.27-3",
"version": "1.2.27-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.",
Expand Down
3 changes: 0 additions & 3 deletions src/ONYXKEYS.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ export default {
// Is report data loading?
IS_LOADING_REPORT_DATA: 'isLoadingReportData',

// Are we loading the initial app data?
IS_LOADING_INITIAL_APP_DATA: 'isLoadingInitialAppData',

// Is Keyboard shortcuts modal open?
IS_SHORTCUTS_MODAL_OPEN: 'isShortcutsModalOpen',

Expand Down
15 changes: 0 additions & 15 deletions src/libs/actions/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,35 +123,20 @@ function openApp() {
key: ONYXKEYS.IS_LOADING_REPORT_DATA,
value: true,
},
{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.IS_LOADING_INITIAL_APP_DATA,
value: true,
},
],
successData: [
{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.IS_LOADING_REPORT_DATA,
value: false,
},
{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.IS_LOADING_INITIAL_APP_DATA,
value: false,
},
],
failureData: [
{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.IS_LOADING_REPORT_DATA,
value: false,
},
{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.IS_LOADING_INITIAL_APP_DATA,
value: false,
},
],
});
}
Expand Down
49 changes: 21 additions & 28 deletions src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,9 @@ class ReportScreen extends React.Component {
isReportReadyForDisplay() {
const reportIDFromPath = getReportID(this.props.route);

// We need to wait for the initial app data to load as it tells us which reports are unread. Waiting will allow the new marker to be set
// correctly when the report mounts. If we don't do this, the report may initialize in the "read" state and the marker won't be set at all.
const isLoadingInitialAppData = this.props.isLoadingInitialAppData;

// This is necessary so that when we are retrieving the next report data from Onyx the ReportActionsView will remount completely
const isTransitioning = this.props.report && this.props.report.reportID !== reportIDFromPath;
return reportIDFromPath && this.props.report.reportID && !isTransitioning && !isLoadingInitialAppData;
return reportIDFromPath && this.props.report.reportID && !isTransitioning;
}

fetchReportIfNeeded() {
Expand Down Expand Up @@ -283,15 +279,26 @@ class ReportScreen extends React.Component {
this.setState({skeletonViewContainerHeight});
}}
>
{this.isReportReadyForDisplay() && (
<ReportActionsView
reportActions={this.props.reportActions}
report={this.props.report}
session={this.props.session}
isComposerFullSize={this.props.isComposerFullSize}
isDrawerOpen={this.props.isDrawerOpen}
parentViewHeight={this.state.skeletonViewContainerHeight}
/>
{(this.isReportReadyForDisplay() && !isLoadingInitialReportActions) && (
<>
<ReportActionsView
reportActions={this.props.reportActions}
report={this.props.report}
session={this.props.session}
isComposerFullSize={this.props.isComposerFullSize}
isDrawerOpen={this.props.isDrawerOpen}
parentViewHeight={this.state.skeletonViewContainerHeight}
/>
<ReportFooter
errors={addWorkspaceRoomOrChatErrors}
pendingAction={addWorkspaceRoomOrChatPendingAction}
isOffline={this.props.network.isOffline}
reportActions={this.props.reportActions}
report={this.props.report}
isComposerFullSize={this.props.isComposerFullSize}
onSubmitComment={this.onSubmitComment}
/>
</>
)}

{/* Note: The report should be allowed to mount even if the initial report actions are not loaded. If we prevent rendering the report while they are loading then
Expand All @@ -301,17 +308,6 @@ class ReportScreen extends React.Component {
containerHeight={this.state.skeletonViewContainerHeight}
/>
)}
{this.isReportReadyForDisplay() && !isLoadingInitialReportActions && (
<ReportFooter
errors={addWorkspaceRoomOrChatErrors}
pendingAction={addWorkspaceRoomOrChatPendingAction}
isOffline={this.props.network.isOffline}
reportActions={this.props.reportActions}
report={this.props.report}
isComposerFullSize={this.props.isComposerFullSize}
onSubmitComment={this.onSubmitComment}
/>
)}
</View>
</FullPageNotFoundView>
</ScreenWrapper>
Expand Down Expand Up @@ -357,8 +353,5 @@ export default compose(
personalDetails: {
key: ONYXKEYS.PERSONAL_DETAILS,
},
isLoadingInitialAppData: {
key: ONYXKEYS.IS_LOADING_INITIAL_APP_DATA,
},
}),
)(ReportScreen);

0 comments on commit 10ed3fd

Please sign in to comment.