From 259472c8c88f2a6d52b0b51984b3646456714db6 Mon Sep 17 00:00:00 2001 From: OSBotify <76178356+OSBotify@users.noreply.github.com> Date: Thu, 15 Jun 2023 04:30:02 -0400 Subject: [PATCH 1/2] Merge pull request #20793 from Expensify/version-BUILD-CEEB244C-2777-44BD-A7CD-203FAF8585FC Update version to 1.3.28-3 on main (cherry picked from commit 8742a58337a830b0adcaa4cb6d98cd6d8c79d983) --- 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 1630538e4b8e..e46080882adc 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 1001032802 - versionName "1.3.28-2" + versionCode 1001032803 + versionName "1.3.28-3" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index f3a960f1a98c..ec7a607d6881 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.28.2 + 1.3.28.3 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index a2b4783ca4dd..2e332d335ec5 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.28.2 + 1.3.28.3 diff --git a/package-lock.json b/package-lock.json index 7d460c18d812..d6ee58ed16bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.28-2", + "version": "1.3.28-3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.28-2", + "version": "1.3.28-3", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index a7b899d37204..20703ad2b793 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.28-2", + "version": "1.3.28-3", "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 650dd03a2e28a67746ee668703db786e4edd7cca Mon Sep 17 00:00:00 2001 From: Vit Horacek <36083550+mountiny@users.noreply.github.com> Date: Thu, 15 Jun 2023 10:23:46 +0200 Subject: [PATCH 2/2] Merge pull request #20740 from tienifr/fix/20412 fix: 20412 new user is not navigating to concierge chat after tab on link (cherry picked from commit 9ed4a16e185ae43bdeb246a571173e6c0ec7a7df) --- src/libs/Navigation/Navigation.js | 22 ---------------------- src/libs/SidebarUtils.js | 23 +++++++++++++++++++++++ src/libs/actions/Report.js | 3 ++- src/pages/home/ReportScreen.js | 7 +++---- src/pages/home/sidebar/SidebarLinks.js | 5 +++++ 5 files changed, 33 insertions(+), 27 deletions(-) diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index d61eb7143de0..952faaf9a6b7 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -17,11 +17,6 @@ const navigationIsReadyPromise = new Promise((resolve) => { resolveNavigationIsReadyPromise = resolve; }); -let resolveReportScreenIsReadyPromise; -let reportScreenIsReadyPromise = new Promise((resolve) => { - resolveReportScreenIsReadyPromise = resolve; -}); - let pendingRoute = null; /** @@ -219,20 +214,6 @@ function setIsNavigationReady() { resolveNavigationIsReadyPromise(); } -function resetIsReportScreenReadyPromise() { - reportScreenIsReadyPromise = new Promise((resolve) => { - resolveReportScreenIsReadyPromise = resolve; - }); -} - -function isReportScreenReady() { - return reportScreenIsReadyPromise; -} - -function setIsReportScreenIsReady() { - resolveReportScreenIsReadyPromise(); -} - export default { canNavigate, navigate, @@ -244,9 +225,6 @@ export default { isNavigationReady, setIsNavigationReady, getReportIDFromRoute, - resetIsReportScreenReadyPromise, - isReportScreenReady, - setIsReportScreenIsReady, getTopmostReportId, }; diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index 7da1017f2d9e..eace44054613 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -90,6 +90,26 @@ Onyx.connect({ callback: (val) => (preferredLocale = val || CONST.LOCALES.DEFAULT), }); +let resolveSidebarIsReadyPromise; + +let sidebarIsReadyPromise = new Promise((resolve) => { + resolveSidebarIsReadyPromise = resolve; +}); + +function resetIsSidebarLoadedReadyPromise() { + sidebarIsReadyPromise = new Promise((resolve) => { + resolveSidebarIsReadyPromise = resolve; + }); +} + +function isSidebarLoadedReady() { + return sidebarIsReadyPromise; +} + +function setIsSidebarLoadedReady() { + resolveSidebarIsReadyPromise(); +} + /** * @param {String} reportIDFromRoute * @returns {String[]} An array of reportIDs sorted in the proper order @@ -354,4 +374,7 @@ function getOptionData(reportID) { export default { getOptionData, getOrderedReportIDs, + setIsSidebarLoadedReady, + isSidebarLoadedReady, + resetIsSidebarLoadedReadyPromise, }; diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index cb4376593526..b481eff7d13f 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -23,6 +23,7 @@ import * as CollectionUtils from '../CollectionUtils'; import * as EmojiUtils from '../EmojiUtils'; import * as ErrorUtils from '../ErrorUtils'; import * as Welcome from './Welcome'; +import SidebarUtils from '../SidebarUtils'; let currentUserEmail; let currentUserAccountID; @@ -1593,7 +1594,7 @@ function openReportFromDeepLink(url, isAuthenticated) { // Navigate to the report after sign-in/sign-up. InteractionManager.runAfterInteractions(() => { - Navigation.isReportScreenReady().then(() => { + SidebarUtils.isSidebarLoadedReady().then(() => { if (reportID) { Navigation.navigate(ROUTES.getReportRoute(reportID)); } diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index 652ea5eb5d2c..c18116ce5635 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -149,7 +149,6 @@ class ReportScreen extends React.Component { this.fetchReportIfNeeded(); ComposerActions.setShouldShowComposeInput(true); - Navigation.setIsReportScreenIsReady(); } componentDidUpdate(prevProps) { @@ -168,10 +167,10 @@ class ReportScreen extends React.Component { } componentWillUnmount() { - if (this.unsubscribeVisibilityListener) { - this.unsubscribeVisibilityListener(); + if (!this.unsubscribeVisibilityListener) { + return; } - Navigation.resetIsReportScreenReadyPromise(); + this.unsubscribeVisibilityListener(); } /** diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index a072402a4ca3..9b502193d704 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -110,9 +110,14 @@ class SidebarLinks extends React.Component { componentDidMount() { App.setSidebarLoaded(); + SidebarUtils.setIsSidebarLoadedReady(); this.isSidebarLoaded = true; } + componentWillUnmount() { + SidebarUtils.resetIsSidebarLoadedReadyPromise(); + } + showSearchPage() { if (this.props.isCreateMenuOpen) { // Prevent opening Search page when click Search icon quickly after clicking FAB icon