Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001032004
versionName "1.3.20-4"
versionCode 1001032005
versionName "1.3.20-5"
}

splits {
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.3.20.4</string>
<string>1.3.20.5</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.3.20.4</string>
<string>1.3.20.5</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.3.20-4",
"version": "1.3.20-5",
"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
18 changes: 18 additions & 0 deletions src/libs/Navigation/AppNavigator/MainDrawerNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import Permissions from '../../Permissions';
import Timing from '../../actions/Timing';
import CONST from '../../../CONST';
import * as App from '../../actions/App';
import * as Report from '../../actions/Report';
import * as Session from '../../actions/Session';

// Screens
import ReportScreen from '../../../pages/home/ReportScreen';
Expand Down Expand Up @@ -38,6 +40,9 @@ const propTypes = {
}),
),

/** The report ID of the last opened public room as anonymous user */
lastOpenedPublicRoomID: PropTypes.string,

isFirstTimeNewExpensifyUser: PropTypes.bool,

route: PropTypes.shape({
Expand All @@ -54,6 +59,7 @@ const defaultProps = {
betas: [],
policies: {},
isFirstTimeNewExpensifyUser: false,
lastOpenedPublicRoomID: null,
};

/**
Expand Down Expand Up @@ -91,6 +97,15 @@ class MainDrawerNavigator extends Component {
this.isFromCache = _.size(props.reports) > 0;
}

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) {
const initialNextParams = getInitialReportScreenParams(
nextProps.reports,
Expand Down Expand Up @@ -172,4 +187,7 @@ export default withOnyx({
isFirstTimeNewExpensifyUser: {
key: ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER,
},
lastOpenedPublicRoomID: {
key: ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID,
},
})(MainDrawerNavigator);
15 changes: 0 additions & 15 deletions src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import * as EmojiPickerAction from '../../libs/actions/EmojiPickerAction';
import TaskHeader from '../../components/TaskHeader';
import MoneyRequestHeader from '../../components/MoneyRequestHeader';
import * as ComposerActions from '../../libs/actions/Composer';
import * as Session from '../../libs/actions/Session';

const propTypes = {
/** Navigation route context info provided by react navigation */
Expand Down Expand Up @@ -84,9 +83,6 @@ const propTypes = {
/** The account manager report ID */
accountManagerReportID: PropTypes.string,

/** The report ID of the last opened public room as anonymous user */
lastOpenedPublicRoomID: PropTypes.string,

/** All of the personal details for everyone */
personalDetails: PropTypes.objectOf(personalDetailsPropType),

Expand All @@ -107,7 +103,6 @@ const defaultProps = {
policies: {},
accountManagerReportID: null,
personalDetails: {},
lastOpenedPublicRoomID: null,
};

/**
Expand Down Expand Up @@ -198,13 +193,6 @@ class ReportScreen extends React.Component {
}

fetchReportIfNeeded() {
// Re-open the last opened public room if the user logged in
if (this.props.lastOpenedPublicRoomID && !Session.isAnonymousUser()) {
Report.setLastOpenedPublicRoom('');
Report.openReport(this.props.lastOpenedPublicRoomID);
return;
}

const reportIDFromPath = getReportID(this.props.route);

// Report ID will be empty when the reports collection is empty.
Expand Down Expand Up @@ -400,9 +388,6 @@ export default compose(
withDrawerState,
withNetwork(),
withOnyx({
lastOpenedPublicRoomID: {
key: ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID,
},
isSidebarLoaded: {
key: ONYXKEYS.IS_SIDEBAR_LOADED,
},
Expand Down