Skip to content
Merged
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/libs/actions/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

let currentUserAccountID = -1;
let currentEmail = '';
Onyx.connect({

Check warning on line 66 in src/libs/actions/User.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.SESSION,
callback: (value) => {
currentUserAccountID = value?.accountID ?? CONST.DEFAULT_NUMBER_ID;
Expand All @@ -72,7 +72,7 @@
});

let myPersonalDetails: OnyxEntry<OnyxPersonalDetails>;
Onyx.connect({

Check warning on line 75 in src/libs/actions/User.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (value) => {
if (!value || currentUserAccountID === -1) {
Expand All @@ -84,7 +84,7 @@
});

let allPolicies: OnyxCollection<Policy>;
Onyx.connect({

Check warning on line 87 in src/libs/actions/User.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.POLICY,
waitForCollectionCallback: true,
callback: (value) => (allPolicies = value),
Expand Down Expand Up @@ -354,7 +354,7 @@
* So we add the temporary contact method to Onyx to use it later, after user verified magic code.
*/
function addPendingContactMethod(contactMethod: string) {
Onyx.merge(ONYXKEYS.PENDING_CONTACT_ACTION, {
Onyx.set(ONYXKEYS.PENDING_CONTACT_ACTION, {
contactMethod,
});
}
Expand Down Expand Up @@ -662,7 +662,7 @@

function triggerNotifications(onyxUpdates: OnyxServerUpdate[]) {
for (const update of onyxUpdates) {
if (!update.shouldNotify && !update.shouldShowPushNotification) {

Check warning on line 665 in src/libs/actions/User.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
continue;
}

Expand Down
Loading