Skip to content

Commit a14985a

Browse files
committed
Revert Onyx changes
1 parent db10c65 commit a14985a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/libs/ReportUtils.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,15 +1015,15 @@ getEnvironment().then((env) => {
10151015
const parsedReportActionMessageCache: Record<string, string> = {};
10161016

10171017
let conciergeReportIDOnyxConnect: OnyxEntry<string>;
1018-
Onyx.connectWithoutView({
1018+
Onyx.connect({
10191019
key: ONYXKEYS.CONCIERGE_REPORT_ID,
10201020
callback: (value) => {
10211021
conciergeReportIDOnyxConnect = value;
10221022
},
10231023
});
10241024

10251025
const 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({
10411041
let allPersonalDetails: OnyxEntry<PersonalDetailsList>;
10421042
let allPersonalDetailLogins: string[];
10431043
let 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

10551055
let 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

10621062
let allPolicies: OnyxCollection<Policy>;
1063-
Onyx.connectWithoutView({
1063+
Onyx.connect({
10641064
key: ONYXKEYS.COLLECTION.POLICY,
10651065
waitForCollectionCallback: true,
10661066
callback: (value) => (allPolicies = value),
10671067
});
10681068

10691069
let 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

10761076
let allReports: OnyxCollection<Report>;
10771077
let 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

11131113
let allBetas: OnyxEntry<Beta[]>;
1114-
Onyx.connectWithoutView({
1114+
Onyx.connect({
11151115
key: ONYXKEYS.BETAS,
11161116
callback: (value) => (allBetas = value),
11171117
});
11181118

11191119
let betaConfiguration: OnyxEntry<BetaConfiguration> = {};
1120-
Onyx.connectWithoutView({
1120+
Onyx.connect({
11211121
key: ONYXKEYS.BETA_CONFIGURATION,
11221122
callback: (value) => (betaConfiguration = value ?? {}),
11231123
});
11241124

11251125
let allTransactions: OnyxCollection<Transaction> = {};
11261126
let 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

11521152
let 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

11641164
let allReportMetadata: OnyxCollection<ReportMetadata>;
11651165
const 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

11861186
let 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

11981198
let 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

12101210
let onboarding: OnyxEntry<Onboarding>;
1211-
Onyx.connectWithoutView({
1211+
Onyx.connect({
12121212
key: ONYXKEYS.NVP_ONBOARDING,
12131213
callback: (value) => (onboarding = value),
12141214
});
12151215

12161216
let delegateEmail = '';
1217-
Onyx.connectWithoutView({
1217+
Onyx.connect({
12181218
key: ONYXKEYS.ACCOUNT,
12191219
callback: (value) => {
12201220
delegateEmail = value?.delegatedAccess?.delegate ?? '';
12211221
},
12221222
});
12231223

12241224
let 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

12321232
let cachedSelfDMReportID: OnyxEntry<string>;
1233-
Onyx.connectWithoutView({
1233+
Onyx.connect({
12341234
key: ONYXKEYS.SELF_DM_REPORT_ID,
12351235
callback: (value) => (cachedSelfDMReportID = value),
12361236
});
12371237

12381238
let hiddenTranslation = '';
12391239
let 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
*/
22712271
function 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

Comments
 (0)