@@ -1015,15 +1015,15 @@ getEnvironment().then((env) => {
10151015const parsedReportActionMessageCache: Record<string, string> = {};
10161016
10171017let conciergeReportIDOnyxConnect: OnyxEntry<string>;
1018- Onyx.connectWithoutView ({
1018+ Onyx.connect ({
10191019 key: ONYXKEYS.CONCIERGE_REPORT_ID,
10201020 callback: (value) => {
10211021 conciergeReportIDOnyxConnect = value;
10221022 },
10231023});
10241024
10251025const defaultAvatarBuildingIconTestID = 'SvgDefaultAvatarBuilding Icon';
1026- Onyx.connectWithoutView ({
1026+ Onyx.connect ({
10271027 key: ONYXKEYS.SESSION,
10281028 callback: (value) => {
10291029 // When signed out, val is undefined
@@ -1041,7 +1041,7 @@ Onyx.connectWithoutView({
10411041let allPersonalDetails: OnyxEntry<PersonalDetailsList>;
10421042let allPersonalDetailLogins: string[];
10431043let currentUserPersonalDetails: OnyxEntry<PersonalDetails>;
1044- Onyx.connectWithoutView ({
1044+ Onyx.connect ({
10451045 key: ONYXKEYS.PERSONAL_DETAILS_LIST,
10461046 callback: (value) => {
10471047 if (currentUserAccountID) {
@@ -1053,29 +1053,29 @@ Onyx.connectWithoutView({
10531053});
10541054
10551055let allReportsDraft: OnyxCollection<Report>;
1056- Onyx.connectWithoutView ({
1056+ Onyx.connect ({
10571057 key: ONYXKEYS.COLLECTION.REPORT_DRAFT,
10581058 waitForCollectionCallback: true,
10591059 callback: (value) => (allReportsDraft = value),
10601060});
10611061
10621062let allPolicies: OnyxCollection<Policy>;
1063- Onyx.connectWithoutView ({
1063+ Onyx.connect ({
10641064 key: ONYXKEYS.COLLECTION.POLICY,
10651065 waitForCollectionCallback: true,
10661066 callback: (value) => (allPolicies = value),
10671067});
10681068
10691069let allPolicyDrafts: OnyxCollection<Policy>;
1070- Onyx.connectWithoutView ({
1070+ Onyx.connect ({
10711071 key: ONYXKEYS.COLLECTION.POLICY_DRAFTS,
10721072 waitForCollectionCallback: true,
10731073 callback: (value) => (allPolicyDrafts = value),
10741074});
10751075
10761076let allReports: OnyxCollection<Report>;
10771077let reportsByPolicyID: ReportByPolicyMap;
1078- Onyx.connectWithoutView ({
1078+ Onyx.connect ({
10791079 key: ONYXKEYS.COLLECTION.REPORT,
10801080 waitForCollectionCallback: true,
10811081 callback: (value) => {
@@ -1111,20 +1111,20 @@ Onyx.connectWithoutView({
11111111});
11121112
11131113let allBetas: OnyxEntry<Beta[]>;
1114- Onyx.connectWithoutView ({
1114+ Onyx.connect ({
11151115 key: ONYXKEYS.BETAS,
11161116 callback: (value) => (allBetas = value),
11171117});
11181118
11191119let betaConfiguration: OnyxEntry<BetaConfiguration> = {};
1120- Onyx.connectWithoutView ({
1120+ Onyx.connect ({
11211121 key: ONYXKEYS.BETA_CONFIGURATION,
11221122 callback: (value) => (betaConfiguration = value ?? {}),
11231123});
11241124
11251125let allTransactions: OnyxCollection<Transaction> = {};
11261126let reportsTransactions: Record<string, Transaction[]> = {};
1127- Onyx.connectWithoutView ({
1127+ Onyx.connect ({
11281128 key: ONYXKEYS.COLLECTION.TRANSACTION,
11291129 waitForCollectionCallback: true,
11301130 callback: (value) => {
@@ -1150,7 +1150,7 @@ Onyx.connectWithoutView({
11501150});
11511151
11521152let allReportActions: OnyxCollection<ReportActions>;
1153- Onyx.connectWithoutView ({
1153+ Onyx.connect ({
11541154 key: ONYXKEYS.COLLECTION.REPORT_ACTIONS,
11551155 waitForCollectionCallback: true,
11561156 callback: (actions) => {
@@ -1163,7 +1163,7 @@ Onyx.connectWithoutView({
11631163
11641164let allReportMetadata: OnyxCollection<ReportMetadata>;
11651165const allReportMetadataKeyValue: Record<string, ReportMetadata> = {};
1166- Onyx.connectWithoutView ({
1166+ Onyx.connect ({
11671167 key: ONYXKEYS.COLLECTION.REPORT_METADATA,
11681168 waitForCollectionCallback: true,
11691169 callback: (value) => {
@@ -1184,7 +1184,7 @@ Onyx.connectWithoutView({
11841184});
11851185
11861186let allReportNameValuePair: OnyxCollection<ReportNameValuePairs>;
1187- Onyx.connectWithoutView ({
1187+ Onyx.connect ({
11881188 key: ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS,
11891189 waitForCollectionCallback: true,
11901190 callback: (value) => {
@@ -1196,7 +1196,7 @@ Onyx.connectWithoutView({
11961196});
11971197
11981198let allReportsViolations: OnyxCollection<ReportViolations>;
1199- Onyx.connectWithoutView ({
1199+ Onyx.connect ({
12001200 key: ONYXKEYS.COLLECTION.REPORT_VIOLATIONS,
12011201 waitForCollectionCallback: true,
12021202 callback: (value) => {
@@ -1208,37 +1208,37 @@ Onyx.connectWithoutView({
12081208});
12091209
12101210let onboarding: OnyxEntry<Onboarding>;
1211- Onyx.connectWithoutView ({
1211+ Onyx.connect ({
12121212 key: ONYXKEYS.NVP_ONBOARDING,
12131213 callback: (value) => (onboarding = value),
12141214});
12151215
12161216let delegateEmail = '';
1217- Onyx.connectWithoutView ({
1217+ Onyx.connect ({
12181218 key: ONYXKEYS.ACCOUNT,
12191219 callback: (value) => {
12201220 delegateEmail = value?.delegatedAccess?.delegate ?? '';
12211221 },
12221222});
12231223
12241224let reportAttributesDerivedValue: ReportAttributesDerivedValue['reports'];
1225- Onyx.connectWithoutView ({
1225+ Onyx.connect ({
12261226 key: ONYXKEYS.DERIVED.REPORT_ATTRIBUTES,
12271227 callback: (value) => {
12281228 reportAttributesDerivedValue = value?.reports ?? {};
12291229 },
12301230});
12311231
12321232let cachedSelfDMReportID: OnyxEntry<string>;
1233- Onyx.connectWithoutView ({
1233+ Onyx.connect ({
12341234 key: ONYXKEYS.SELF_DM_REPORT_ID,
12351235 callback: (value) => (cachedSelfDMReportID = value),
12361236});
12371237
12381238let hiddenTranslation = '';
12391239let unavailableTranslation = '';
12401240
1241- Onyx.connectWithoutView ({
1241+ Onyx.connect ({
12421242 key: ONYXKEYS.ARE_TRANSLATIONS_LOADING,
12431243 initWithStoredValues: false,
12441244 callback: (value) => {
@@ -2266,7 +2266,7 @@ function getMostRecentlyVisitedReport(reports: Array<OnyxEntry<Report>>, reportM
22662266
22672267/**
22682268 * This function is used to find the last accessed report and we don't need to subscribe the data in the UI.
2269- * So please use `Onyx.connectWithoutView ()` to get the necessary data when we remove the `Onyx.connect()`
2269+ * So please use `Onyx.connect ()` to get the necessary data when we remove the `Onyx.connect()`
22702270 */
22712271function findLastAccessedReport(ignoreDomainRooms: boolean, openOnAdminRoom = false, policyID?: string, excludeReportID?: string): OnyxEntry<Report> {
22722272 // If it's the user's first time using New Expensify, then they could either have:
0 commit comments