Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2454b9e
fix: invoice room avatar flickers when deleting workspace
daledah Nov 6, 2024
c6f2ce2
fix: move logics to optimistic data
daledah Nov 6, 2024
8695325
refactor: change variable name
daledah Nov 11, 2024
67e96f2
use stored session and credentials
dangrous Nov 22, 2024
4cd19b6
Merge branch 'main' into dangrous-stashedcopilot
dangrous Dec 3, 2024
c0f47de
pass backTo for goBack
FitseTLT Dec 4, 2024
0cb9ab9
fix can't press pay button if edit composer is focused
bernhardoj Dec 6, 2024
4e1cc08
prettier
bernhardoj Dec 6, 2024
1b4e668
Fix Split expense with deleted workspace
narefyev91 Dec 6, 2024
2ea8a9e
fix temporary thread message disappear
mkzie2 Dec 7, 2024
34eb593
Fix: Two emoji skin tones are displayed after changing tone in browser
nyomanjyotisa Dec 9, 2024
5757334
Merge branch 'main' into dangrous-stashedcopilot
dangrous Dec 9, 2024
3774319
update comment
bernhardoj Dec 10, 2024
fb5915e
Merge branch 'main' into fix/51130
daledah Dec 10, 2024
431f03f
Fixing search query line height
abzokhattab Dec 10, 2024
f743ef1
Fix Search page header not refreshing query
Kicu Dec 10, 2024
5a853e4
fix unverified contact method is displayed
mkzie2 Dec 10, 2024
3099f08
fix lint
mkzie2 Dec 10, 2024
c8e8517
Merge pull request #53680 from bernhardoj/fix/53140-can't-press-pay-b…
Beamanator Dec 10, 2024
bddea4d
Merge pull request #53701 from callstack-internal/fix-split-expense-a…
amyevans Dec 10, 2024
fd009af
Merge pull request #53837 from abzokhattab/fix-search-query-line-height
dangrous Dec 10, 2024
7a98f0d
Merge pull request #53629 from FitseTLT/fix-navigate-back-with-backTo…
dangrous Dec 10, 2024
e367196
Add shouldCallDirectly for closeModal logic
huult Dec 10, 2024
8460a8d
Merge pull request #53733 from mkzie2/mkzie2-issue/52146
marcochavezf Dec 10, 2024
b27d5c7
Merge pull request #53744 from nyomanjyotisa/issue-52918
jasperhuangg Dec 10, 2024
04dec5f
Add comment to explain shouldCallDirectly
huult Dec 10, 2024
deeab96
Merge pull request #52980 from Expensify/dangrous-stashedcopilot
blimpich Dec 10, 2024
b29b3e4
Merge pull request #53873 from huult/53848-transaction-freeze-on-repl…
Beamanator Dec 10, 2024
b5d7962
Update version to 9.0.73-7
OSBotify Dec 10, 2024
03f19c1
Merge pull request #53864 from mkzie2/mkzie2-issue/53819
luacmartins Dec 10, 2024
d31f259
Update version to 9.0.73-8
OSBotify Dec 10, 2024
499079b
Merge pull request #52093 from daledah/fix/51130
cead22 Dec 10, 2024
fca45c9
Merge pull request #53859 from software-mansion-labs/kicu/53823-fix-s…
luacmartins Dec 10, 2024
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 @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009007306
versionName "9.0.73-6"
versionCode 1009007308
versionName "9.0.73-8"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.73.6</string>
<string>9.0.73.8</string>
<key>FullStory</key>
<dict>
<key>OrgId</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>9.0.73.6</string>
<string>9.0.73.8</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.0.73</string>
<key>CFBundleVersion</key>
<string>9.0.73.6</string>
<string>9.0.73.8</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
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": "9.0.73-6",
"version": "9.0.73-8",
"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
29 changes: 20 additions & 9 deletions src/components/AttachmentModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,17 +379,28 @@ function AttachmentModal({
);

/**
* close the modal
* Closes the modal.
* @param {boolean} [shouldCallDirectly] If true, directly calls `onModalClose`.
* This is useful when you plan to continue navigating to another page after closing the modal, to avoid freezing the app due to navigating to another page first and dismissing the modal later.
* If `shouldCallDirectly` is false or undefined, it calls `attachmentModalHandler.handleModalClose` to close the modal.
* This ensures smooth modal closing behavior without causing delays in closing.
*/
const closeModal = useCallback(() => {
setIsModalOpen(false);
const closeModal = useCallback(
(shouldCallDirectly?: boolean) => {
setIsModalOpen(false);

if (typeof onModalClose === 'function') {
attachmentModalHandler.handleModalClose(onModalClose);
}
if (typeof onModalClose === 'function') {
if (shouldCallDirectly) {
onModalClose();
return;
}
attachmentModalHandler.handleModalClose(onModalClose);
}

// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, [onModalClose]);
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
},
[onModalClose],
);

/**
* open the modal
Expand Down Expand Up @@ -419,7 +430,7 @@ function AttachmentModal({
icon: Expensicons.Camera,
text: translate('common.replace'),
onSelected: () => {
closeModal();
closeModal(true);
Navigation.navigate(
ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute(
CONST.IOU.ACTION.EDIT,
Expand Down
5 changes: 5 additions & 0 deletions src/components/EmojiPicker/EmojiSkinToneList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ function EmojiSkinToneList() {
}, [preferredSkinTone]);

const currentSkinTone = getSkinToneEmojiFromIndex(preferredSkinTone);

useEffect(() => {
setHighlightedIndex(currentSkinTone.skinTone);
}, [currentSkinTone.skinTone]);

return (
<View style={[styles.flexRow, styles.p3, styles.ph4, styles.emojiPickerContainer]}>
{!isSkinToneListVisible && (
Expand Down
4 changes: 4 additions & 0 deletions src/components/Search/SearchPageHeaderInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ function SearchPageHeaderInput({queryJSON, children}: SearchPageHeaderInputProps
}
}, [isCannedQuery, isFocused, registerSearchPageInput, unregisterSearchPageInput]);

useEffect(() => {
setTextInputValue(queryText);
}, [queryText]);

useEffect(() => {
const substitutionsMap = buildSubstitutionsMap(originalInputQuery, personalDetails, reports, taxRates);
setAutocompleteSubstitutions(substitutionsMap);
Expand Down
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,8 @@ function isUserCreatedPolicyRoom(report: OnyxEntry<Report>): boolean {
* Whether the provided report is a Policy Expense chat.
*/
function isPolicyExpenseChat(option: OnyxInputOrEntry<Report> | OptionData | Participant): boolean {
return getChatType(option) === CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT ?? (option && 'isPolicyExpenseChat' in option && option.isPolicyExpenseChat) ?? false;
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
return getChatType(option) === CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT || (option && 'isPolicyExpenseChat' in option && option.isPolicyExpenseChat) || false;
}

function isInvoiceRoom(report: OnyxEntry<Report>): boolean {
Expand Down
37 changes: 36 additions & 1 deletion src/libs/actions/Delegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import * as SequentialQueue from '@libs/Network/SequentialQueue';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {Delegate, DelegatedAccess, DelegateRole} from '@src/types/onyx/Account';
import type Credentials from '@src/types/onyx/Credentials';
import type Response from '@src/types/onyx/Response';
import type Session from '@src/types/onyx/Session';
import {confirmReadyToOpenApp, openApp} from './App';
import updateSessionAuthTokens from './Session/updateSessionAuthTokens';
import updateSessionUser from './Session/updateSessionUser';
Expand All @@ -25,13 +27,38 @@ Onyx.connect({
},
});

let credentials: Credentials = {};
Onyx.connect({
key: ONYXKEYS.CREDENTIALS,
callback: (value) => (credentials = value ?? {}),
});

let stashedCredentials: Credentials = {};
Onyx.connect({
key: ONYXKEYS.STASHED_CREDENTIALS,
callback: (value) => (stashedCredentials = value ?? {}),
});

let session: Session = {};
Onyx.connect({
key: ONYXKEYS.SESSION,
callback: (value) => (session = value ?? {}),
});

let stashedSession: Session = {};
Onyx.connect({
key: ONYXKEYS.STASHED_SESSION,
callback: (value) => (stashedSession = value ?? {}),
});

const KEYS_TO_PRESERVE_DELEGATE_ACCESS = [
ONYXKEYS.NVP_TRY_FOCUS_MODE,
ONYXKEYS.PREFERRED_THEME,
ONYXKEYS.NVP_PREFERRED_LOCALE,
ONYXKEYS.SESSION,
ONYXKEYS.STASHED_SESSION,
ONYXKEYS.IS_LOADING_APP,
ONYXKEYS.CREDENTIALS,
ONYXKEYS.STASHED_CREDENTIALS,

// We need to preserve the sidebar loaded state since we never unrender the sidebar when connecting as a delegate
// This allows the report screen to load correctly when the delegate token expires and the delegate is returned to their original account.
Expand All @@ -43,6 +70,9 @@ function connect(email: string) {
return;
}

Onyx.set(ONYXKEYS.STASHED_CREDENTIALS, credentials);
Onyx.set(ONYXKEYS.STASHED_SESSION, session);

const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
Expand Down Expand Up @@ -172,6 +202,11 @@ function disconnect() {
updateSessionAuthTokens(response?.authToken, response?.encryptedAuthToken);

NetworkStore.setAuthToken(response?.authToken ?? null);

Onyx.set(ONYXKEYS.CREDENTIALS, stashedCredentials);
Onyx.set(ONYXKEYS.SESSION, stashedSession);
Onyx.set(ONYXKEYS.STASHED_CREDENTIALS, {});
Onyx.set(ONYXKEYS.STASHED_SESSION, {});
confirmReadyToOpenApp();
openApp();

Expand Down
7 changes: 5 additions & 2 deletions src/libs/actions/Policy/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,17 @@ function deleteWorkspace(policyID: string, policyName: string) {
const currentTime = DateUtils.getDBTime();
reportsToArchive.forEach((report) => {
const {reportID, ownerAccountID} = report ?? {};
const isInvoiceReceiverReport = report?.invoiceReceiver && 'policyID' in report.invoiceReceiver && report.invoiceReceiver.policyID === policyID;
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {
stateNum: CONST.REPORT.STATE_NUM.APPROVED,
statusNum: CONST.REPORT.STATUS_NUM.CLOSED,
oldPolicyName: allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${policyID}`]?.name ?? '',
policyName: '',
...(!isInvoiceReceiverReport && {
oldPolicyName: allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${policyID}`]?.name ?? '',
policyName: '',
}),
// eslint-disable-next-line @typescript-eslint/naming-convention
private_isArchived: currentTime,
},
Expand Down
7 changes: 6 additions & 1 deletion src/libs/setShouldShowComposeInputKeyboardAware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import * as Composer from '@userActions/Composer';
import type SetShouldShowComposeInputKeyboardAware from './types';

const setShouldShowComposeInputKeyboardAware: SetShouldShowComposeInputKeyboardAware = (shouldShow) => {
Composer.setShouldShowComposeInput(shouldShow);
// We want to show the main composer when the edit composer loses focus.
// If it loses focus due to a pressable being pressed, the press event might not be captured.
// To address this, we delay showing the main composer to allow the press event to be completed.
setTimeout(() => {
Composer.setShouldShowComposeInput(shouldShow);
}, 0);
};

export default setShouldShowComposeInputKeyboardAware;
2 changes: 1 addition & 1 deletion src/pages/Search/SearchTypeMenuNarrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function SearchTypeMenuNarrow({typeMenuItems, activeItemIndex, queryJSON, title,
/>
<Text
numberOfLines={1}
style={[styles.textStrong, styles.flexShrink1, styles.label]}
style={[styles.textStrong, styles.flexShrink1, styles.textLineHeightNormal, styles.fontSizeLabel]}
>
{menuTitle}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ function ReportActionItem({
pendingAction={
draftMessage !== undefined ? undefined : action.pendingAction ?? (action.isOptimisticAction ? CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD : undefined)
}
shouldHideOnDelete={!ReportActionsUtils.isThreadParentMessage(action, reportID)}
shouldHideOnDelete={!isThreadReportParentAction}
errors={linkedTransactionRouteError ?? ErrorUtils.getLatestErrorMessageField(action as ErrorUtils.OnyxDataWithErrors)}
errorRowStyles={[styles.ml10, styles.mr2]}
needsOffscreenAlphaCompositing={ReportActionsUtils.isMoneyRequestAction(action)}
Expand Down
3 changes: 1 addition & 2 deletions src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import INPUT_IDS from '@src/types/form/NewContactMethodForm';
import type {Errors} from '@src/types/onyx/OnyxCommon';
import {isEmptyObject} from '@src/types/utils/EmptyObject';

type NewContactMethodPageProps = PlatformStackScreenProps<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD>;

Expand Down Expand Up @@ -163,7 +162,7 @@ function NewContactMethodPage({route}: NewContactMethodPageProps) {
User.clearContactMethodErrors(addSMSDomainIfPhoneNumber(pendingContactAction?.contactMethod ?? contactMethod), 'addedLogin');
}}
onClose={() => {
if (!isEmptyObject(loginData?.errorFields) && pendingContactAction?.contactMethod) {
if (pendingContactAction?.contactMethod) {
User.clearContactMethod(pendingContactAction?.contactMethod);
User.clearUnvalidatedNewContactMethodAction();
}
Expand Down
11 changes: 6 additions & 5 deletions src/pages/settings/Wallet/VerifyAccountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) {
const [isValidateCodeActionModalVisible, setIsValidateCodeActionModalVisible] = useState(true);

const navigateForwardTo = route.params?.forwardTo;
const backTo = route.params?.backTo;

useBeforeRemove(() => setIsValidateCodeActionModalVisible(false));

Expand All @@ -50,8 +51,8 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) {
const closeModal = useCallback(() => {
// Disable modal visibility so the navigation is animated
setIsValidateCodeActionModalVisible(false);
Navigation.goBack();
}, []);
Navigation.goBack(backTo);
}, [backTo]);

// Handle navigation once the user is validated
useEffect(() => {
Expand All @@ -64,9 +65,9 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) {
if (navigateForwardTo) {
Navigation.navigate(navigateForwardTo, CONST.NAVIGATION.TYPE.UP);
} else {
Navigation.goBack();
Navigation.goBack(backTo);
}
}, [isUserValidated, navigateForwardTo]);
}, [isUserValidated, navigateForwardTo, backTo]);

// Once user is validated or the modal is dismissed, we don't want to show empty content.
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
Expand All @@ -78,7 +79,7 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) {
>
<HeaderWithBackButton
title={translate('contacts.validateAccount')}
onBackButtonPress={() => Navigation.goBack()}
onBackButtonPress={() => Navigation.goBack(backTo)}
/>
<FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} />
</ScreenWrapper>
Expand Down
Loading