Skip to content

Commit 9f15c43

Browse files
committed
Merge branch 'main' into fix/55211
2 parents 2ca8af0 + af66079 commit 9f15c43

47 files changed

Lines changed: 330 additions & 241 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009019602
118-
versionName "9.1.96-2"
117+
versionCode 1009019700
118+
versionName "9.1.97-0"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

ios/NewExpensify/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<key>CFBundlePackageType</key>
2424
<string>APPL</string>
2525
<key>CFBundleShortVersionString</key>
26-
<string>9.1.96</string>
26+
<string>9.1.97</string>
2727
<key>CFBundleSignature</key>
2828
<string>????</string>
2929
<key>CFBundleURLTypes</key>
@@ -44,7 +44,7 @@
4444
</dict>
4545
</array>
4646
<key>CFBundleVersion</key>
47-
<string>9.1.96.2</string>
47+
<string>9.1.97.0</string>
4848
<key>FullStory</key>
4949
<dict>
5050
<key>OrgId</key>

ios/NotificationServiceExtension/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<key>CFBundleName</key>
1212
<string>$(PRODUCT_NAME)</string>
1313
<key>CFBundleShortVersionString</key>
14-
<string>9.1.96</string>
14+
<string>9.1.97</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.1.96.2</string>
16+
<string>9.1.97.0</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

ios/ShareViewController/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<key>CFBundleName</key>
1212
<string>$(PRODUCT_NAME)</string>
1313
<key>CFBundleShortVersionString</key>
14-
<string>9.1.96</string>
14+
<string>9.1.97</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.1.96.2</string>
16+
<string>9.1.97.0</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionAttributes</key>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.expensify",
3-
"version": "9.1.96-2",
3+
"version": "9.1.97-0",
44
"author": "Expensify, Inc.",
55
"homepage": "https://new.expensify.com",
66
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",

src/ONYXKEYS.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,9 @@ const ONYXKEYS = {
565565
NVP_LAST_ECASH_ANDROID_LOGIN: 'nvp_lastECashAndroidLogin',
566566
NVP_LAST_ANDROID_LOGIN: 'nvp_lastAndroidLogin',
567567

568+
/** Draft report comments */
569+
NVP_DRAFT_REPORT_COMMENTS: 'nvp_draftReportComments',
570+
568571
/** Collection Keys */
569572
COLLECTION: {
570573
DOWNLOAD: 'download_',
@@ -598,7 +601,8 @@ const ONYXKEYS = {
598601
REPORT_ACTIONS_DRAFTS: 'reportActionsDrafts_',
599602
REPORT_ACTIONS_PAGES: 'reportActionsPages_',
600603
REPORT_ACTIONS_REACTIONS: 'reportActionsReactions_',
601-
REPORT_DRAFT_COMMENT: 'reportDraftComment_',
604+
/** @deprecated */
605+
REPORT_DRAFT_COMMENT: 'reportDraftComment_', // eslint-disable-line deprecation/deprecation
602606
REPORT_IS_COMPOSER_FULL_SIZE: 'reportIsComposerFullSize_',
603607
REPORT_USER_IS_TYPING: 'reportUserIsTyping_',
604608
REPORT_USER_IS_LEAVING_ROOM: 'reportUserIsLeavingRoom_',
@@ -1001,6 +1005,7 @@ type OnyxCollectionValuesMapping = {
10011005
[ONYXKEYS.COLLECTION.REPORT_ACTIONS_DRAFTS]: OnyxTypes.ReportActionsDrafts;
10021006
[ONYXKEYS.COLLECTION.REPORT_ACTIONS_PAGES]: OnyxTypes.Pages;
10031007
[ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS]: OnyxTypes.ReportActionReactions;
1008+
// eslint-disable-next-line deprecation/deprecation
10041009
[ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT]: string;
10051010
[ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE]: boolean;
10061011
[ONYXKEYS.COLLECTION.REPORT_USER_IS_TYPING]: OnyxTypes.ReportUserIsTyping;
@@ -1226,6 +1231,7 @@ type OnyxValuesMapping = {
12261231
[ONYXKEYS.ONBOARDING_USER_REPORTED_INTEGRATION]: OnboardingAccounting;
12271232
[ONYXKEYS.HYBRID_APP]: OnyxTypes.HybridApp;
12281233
[ONYXKEYS.NVP_CSV_EXPORT_LAYOUTS]: Record<string, OnyxTypes.ExportTemplate>;
1234+
[ONYXKEYS.NVP_DRAFT_REPORT_COMMENTS]: OnyxTypes.DraftReportComments;
12291235
};
12301236

12311237
type OnyxDerivedValuesMapping = {

src/components/LHNOptionsList/LHNOptionsList.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import useRootNavigationState from '@hooks/useRootNavigationState';
1919
import useScrollEventEmitter from '@hooks/useScrollEventEmitter';
2020
import useTheme from '@hooks/useTheme';
2121
import useThemeStyles from '@hooks/useThemeStyles';
22-
import {isValidDraftComment} from '@libs/DraftCommentUtils';
2322
import getPlatform from '@libs/getPlatform';
2423
import Log from '@libs/Log';
2524
import {getIOUReportIDOfLastAction, getLastMessageTextForReport} from '@libs/OptionsListUtils';
@@ -53,7 +52,7 @@ function LHNOptionsList({style, contentContainerStyles, data, onSelectRow, optio
5352
const [policy] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: false});
5453
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {canBeMissing: true});
5554
const [transactions] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION, {canBeMissing: false});
56-
const [draftComments] = useOnyx(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT, {canBeMissing: false});
55+
const [draftComments] = useOnyx(ONYXKEYS.NVP_DRAFT_REPORT_COMMENTS, {canBeMissing: true});
5756
const [transactionViolations] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS, {canBeMissing: false});
5857
const [dismissedProductTraining, dismissedProductTrainingMetadata] = useOnyx(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING, {canBeMissing: true});
5958
const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID, {canBeMissing: true});
@@ -189,7 +188,7 @@ function LHNOptionsList({style, contentContainerStyles, data, onSelectRow, optio
189188
? (getOriginalMessage(itemParentReportAction)?.IOUTransactionID ?? CONST.DEFAULT_NUMBER_ID)
190189
: CONST.DEFAULT_NUMBER_ID;
191190
const itemTransaction = transactions?.[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`];
192-
const hasDraftComment = isValidDraftComment(draftComments?.[`${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${reportID}`]);
191+
const hasDraftComment = !!draftComments?.[reportID];
193192

194193
const isReportArchived = !!itemReportNameValuePairs?.private_isArchived;
195194
const canUserPerformWrite = canUserPerformWriteAction(item, isReportArchived);
@@ -288,7 +287,6 @@ function LHNOptionsList({style, contentContainerStyles, data, onSelectRow, optio
288287
policy,
289288
personalDetails,
290289
data.length,
291-
draftComments,
292290
optionMode,
293291
preferredLocale,
294292
transactions,
@@ -305,7 +303,6 @@ function LHNOptionsList({style, contentContainerStyles, data, onSelectRow, optio
305303
policy,
306304
personalDetails,
307305
data.length,
308-
draftComments,
309306
optionMode,
310307
preferredLocale,
311308
transactions,

src/components/SidePanel/useSyncSidePanelWithHistory/index.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@ import {useEffect} from 'react';
33
import usePrevious from '@hooks/usePrevious';
44
import useResponsiveLayout from '@hooks/useResponsiveLayout';
55
import useSidePanel from '@hooks/useSidePanel';
6+
import Navigation from '@libs/Navigation/Navigation';
67
import navigationRef from '@libs/Navigation/navigationRef';
78
import CONST from '@src/CONST';
89

10+
function toggleSidePanelWithHistory(isVisible: boolean) {
11+
Navigation.isNavigationReady().then(() => {
12+
navigationRef.dispatch({
13+
type: CONST.NAVIGATION.ACTION_TYPE.TOGGLE_SIDE_PANEL_WITH_HISTORY,
14+
payload: {isVisible},
15+
});
16+
});
17+
}
18+
919
export default function useSyncSidePanelWithHistory() {
1020
const {closeSidePanel, openSidePanel, shouldHideSidePanel} = useSidePanel();
1121
const {isExtraLargeScreenWidth} = useResponsiveLayout();
@@ -16,18 +26,12 @@ export default function useSyncSidePanelWithHistory() {
1626
// If the window width has been expanded and the modal is displayed, remove its history entry.
1727
// The side panel is only synced with the history when it's displayed as RHP.
1828
if (!shouldHideSidePanel && isExtraLargeScreenWidth) {
19-
navigationRef.dispatch({
20-
type: CONST.NAVIGATION.ACTION_TYPE.TOGGLE_SIDE_PANEL_WITH_HISTORY,
21-
payload: {isVisible: false},
22-
});
29+
toggleSidePanelWithHistory(false);
2330
return;
2431
}
2532

2633
// When shouldHideSidePanel changes, synchronize the side panel with the browser history.
27-
navigationRef.dispatch({
28-
type: CONST.NAVIGATION.ACTION_TYPE.TOGGLE_SIDE_PANEL_WITH_HISTORY,
29-
payload: {isVisible: !shouldHideSidePanel},
30-
});
34+
toggleSidePanelWithHistory(!shouldHideSidePanel);
3135
}, [shouldHideSidePanel, isExtraLargeScreenWidth]);
3236

3337
useEffect(() => {

0 commit comments

Comments
 (0)