Skip to content

Commit

Permalink
Merge pull request #54163 from callstack-internal/feature/onyx-skippa…
Browse files Browse the repository at this point in the history
…ble-collection-member-ids

Bump Onyx to 2.0.91 / Enable skippable collection member IDs in Onyx
  • Loading branch information
neil-marcellini authored Jan 29, 2025
2 parents 242b4c9 + 9f10794 commit 9e9f42b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 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
Expand Up @@ -163,7 +163,7 @@
"react-native-launch-arguments": "^4.0.2",
"react-native-localize": "^2.2.6",
"react-native-modal": "^13.0.0",
"react-native-onyx": "2.0.89",
"react-native-onyx": "2.0.91",
"react-native-pager-view": "6.5.1",
"react-native-pdf": "6.7.3",
"react-native-performance": "^5.1.0",
Expand Down
5 changes: 4 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import type PlaidBankAccount from './types/onyx/PlaidBankAccount';
const EMPTY_ARRAY = Object.freeze([]);
const EMPTY_OBJECT = Object.freeze({});

const DEFAULT_NUMBER_ID = 0;

const CLOUDFRONT_DOMAIN = 'cloudfront.net';
const CLOUDFRONT_URL = `https://d2k5nsl2zxldvw.${CLOUDFRONT_DOMAIN}`;
const ACTIVE_EXPENSIFY_URL = addTrailingForwardSlash(Config?.NEW_EXPENSIFY_URL ?? 'https://new.expensify.com');
Expand Down Expand Up @@ -912,7 +914,7 @@ const CONST = {
CLOUDFRONT_URL,
EMPTY_ARRAY,
EMPTY_OBJECT,
DEFAULT_NUMBER_ID: 0,
DEFAULT_NUMBER_ID,
USE_EXPENSIFY_URL,
EXPENSIFY_URL,
GOOGLE_MEET_URL_ANDROID: 'https://meet.google.com',
Expand Down Expand Up @@ -6560,6 +6562,7 @@ const CONST = {
ERROR_PERMISSION_DENIED: 'permissionDenied',
},
},
SKIPPABLE_COLLECTION_MEMBER_IDS: [String(DEFAULT_NUMBER_ID), '-1', 'undefined', 'null', 'NaN'] as string[],
} as const;

type Country = keyof typeof CONST.ALL_COUNTRIES;
Expand Down
5 changes: 3 additions & 2 deletions src/setup/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {I18nManager} from 'react-native';
import Onyx from 'react-native-onyx';
import intlPolyfill from '@libs/IntlPolyfill';
import * as Device from '@userActions/Device';
import {setDeviceID} from '@userActions/Device';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import addUtilsToWindow from './addUtilsToWindow';
Expand Down Expand Up @@ -42,9 +42,10 @@ export default function () {
// Always open the home route on app startup for native platforms by clearing the lastVisitedPath
[ONYXKEYS.LAST_VISITED_PATH]: initializeLastVisitedPath(),
},
skippableCollectionMemberIDs: CONST.SKIPPABLE_COLLECTION_MEMBER_IDS,
});

Device.setDeviceID();
setDeviceID();

// Force app layout to work left to right because our design does not currently support devices using this mode
I18nManager.allowRTL(false);
Expand Down

0 comments on commit 9e9f42b

Please sign in to comment.