From b834daf593cb7ed4701da52baeabe8e78b55110f Mon Sep 17 00:00:00 2001
From: OSBotify <76178356+OSBotify@users.noreply.github.com>
Date: Tue, 13 Jun 2023 18:51:32 -0400
Subject: [PATCH 1/2] Merge pull request #20728 from
Expensify/version-BUILD-97D3A2F1-09C0-4CCE-B839-2047EF3C93CF
Update version to 1.3.27-6 on main
(cherry picked from commit 9a2400ca0d8e438fc7b8d83754ddf516624bfdbc)
---
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 0233484596f7..7c860d4ac340 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -106,8 +106,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
- versionCode 1001032705
- versionName "1.3.27-5"
+ versionCode 1001032706
+ versionName "1.3.27-6"
}
splits {
diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist
index 0f9251c9f640..a73349d4f9d5 100644
--- a/ios/NewExpensify/Info.plist
+++ b/ios/NewExpensify/Info.plist
@@ -32,7 +32,7 @@
CFBundleVersion
- 1.3.27.5
+ 1.3.27.6
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist
index 04eb5204b4c1..98de86749f65 100644
--- a/ios/NewExpensifyTests/Info.plist
+++ b/ios/NewExpensifyTests/Info.plist
@@ -19,6 +19,6 @@
CFBundleSignature
????
CFBundleVersion
- 1.3.27.5
+ 1.3.27.6
diff --git a/package-lock.json b/package-lock.json
index d4aab8430cd4..218431845e84 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "new.expensify",
- "version": "1.3.27-5",
+ "version": "1.3.27-6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "new.expensify",
- "version": "1.3.27-5",
+ "version": "1.3.27-6",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index 58a377ec0876..2e44fb324bf3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
- "version": "1.3.27-5",
+ "version": "1.3.27-6",
"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 609762a4dc1b1a9fc7fcc912b68bab7e17d4e256 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Ch=C3=A1vez?=
Date: Tue, 13 Jun 2023 16:36:32 -0600
Subject: [PATCH 2/2] Merge pull request #20654 from hoangzinh/df/20586
Fix App does not navigate to last opened public room in small screen devices after Sign in from a public room link
(cherry picked from commit 2950c92e543e07f79228b3f1cfcaa9809d5a9682)
---
.../Navigation/AppNavigator/AuthScreens.js | 14 ++++++++++++++
.../AppNavigator/ReportScreenWrapper.js | 18 ------------------
src/libs/actions/Report.js | 13 +++++++++++++
3 files changed, 27 insertions(+), 18 deletions(-)
diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js
index 8539f384504c..c4a84701a083 100644
--- a/src/libs/Navigation/AppNavigator/AuthScreens.js
+++ b/src/libs/Navigation/AppNavigator/AuthScreens.js
@@ -19,6 +19,7 @@ import KeyboardShortcut from '../../KeyboardShortcut';
import Navigation from '../Navigation';
import * as User from '../../actions/User';
import * as Modal from '../../actions/Modal';
+import * as Report from '../../actions/Report';
import modalCardStyleInterpolator from './modalCardStyleInterpolator';
import createResponsiveStackNavigator from './createResponsiveStackNavigator';
import SCREENS from '../../../SCREENS';
@@ -85,6 +86,10 @@ const propTypes = {
session: PropTypes.shape({
email: PropTypes.string.isRequired,
}),
+
+ /** The report ID of the last opened public room as anonymous user */
+ lastOpenedPublicRoomID: PropTypes.string,
+
...windowDimensionsPropTypes,
};
@@ -92,6 +97,7 @@ const defaultProps = {
session: {
email: null,
},
+ lastOpenedPublicRoomID: null,
};
class AuthScreens extends React.Component {
@@ -115,6 +121,11 @@ class AuthScreens extends React.Component {
App.openApp();
App.setUpPoliciesAndNavigate(this.props.session);
+
+ if (this.props.lastOpenedPublicRoomID) {
+ // Re-open the last opened public room if the user logged in from a public room link
+ Report.openLastOpenedPublicRoom(this.props.lastOpenedPublicRoomID);
+ }
Download.clearDownloads();
Timing.end(CONST.TIMING.HOMEPAGE_INITIAL_RENDER);
@@ -274,5 +285,8 @@ export default compose(
session: {
key: ONYXKEYS.SESSION,
},
+ lastOpenedPublicRoomID: {
+ key: ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID,
+ },
}),
)(AuthScreens);
diff --git a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.js b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.js
index f8235a68745b..37ecc92a8f55 100644
--- a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.js
+++ b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.js
@@ -12,8 +12,6 @@ import reportPropTypes from '../../../pages/reportPropTypes';
import FullScreenLoadingIndicator from '../../../components/FullscreenLoadingIndicator';
import {withNavigationPropTypes} from '../../../components/withNavigation';
import * as App from '../../actions/App';
-import * as Report from '../../actions/Report';
-import * as Session from '../../actions/Session';
const propTypes = {
/** Available reports that would be displayed in this navigator */
@@ -33,9 +31,6 @@ const propTypes = {
}),
),
- /** The report ID of the last opened public room as anonymous user */
- lastOpenedPublicRoomID: PropTypes.string,
-
isFirstTimeNewExpensifyUser: PropTypes.bool,
/** Navigation route context info provided by react navigation */
@@ -58,7 +53,6 @@ const defaultProps = {
betas: [],
policies: {},
isFirstTimeNewExpensifyUser: false,
- lastOpenedPublicRoomID: null,
};
/**
@@ -102,15 +96,6 @@ class ReportScreenWrapper extends Component {
}
}
- componentDidMount() {
- if (!this.props.lastOpenedPublicRoomID || Session.isAnonymousUser()) {
- return;
- }
- // Re-open the last opened public room if the user logged in
- Report.setLastOpenedPublicRoom('');
- Report.openReport(this.props.lastOpenedPublicRoomID);
- }
-
shouldComponentUpdate(nextProps) {
// Don't update if there is a reportID in the params already
if (lodashGet(this.props.route, 'params.reportID', null)) {
@@ -161,7 +146,4 @@ export default withOnyx({
isFirstTimeNewExpensifyUser: {
key: ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER,
},
- lastOpenedPublicRoomID: {
- key: ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID,
- },
})(ReportScreenWrapper);
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js
index 79e2ce35a1d9..6a7f72055b54 100644
--- a/src/libs/actions/Report.js
+++ b/src/libs/actions/Report.js
@@ -1680,6 +1680,18 @@ function setLastOpenedPublicRoom(reportID) {
Onyx.set(ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID, reportID);
}
+/**
+ * Navigates to the last opened public room
+ *
+ * @param {String} lastOpenedPublicRoomID
+ */
+function openLastOpenedPublicRoom(lastOpenedPublicRoomID) {
+ Navigation.isNavigationReady().then(() => {
+ setLastOpenedPublicRoom('');
+ Navigation.navigate(ROUTES.getReportRoute(lastOpenedPublicRoomID));
+ });
+}
+
/**
* Flag a comment as offensive
*
@@ -1804,4 +1816,5 @@ export {
leaveRoom,
setLastOpenedPublicRoom,
flagComment,
+ openLastOpenedPublicRoom,
};