Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Set the user preferences correctly on Onyx #3717

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

parasharrajat
Copy link
Member

Details

Fixed Issues

Fixes #3569

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

image

Web

Mobile Web

Desktop

iOS

Android

@parasharrajat parasharrajat requested a review from a team as a code owner June 22, 2021 06:51
@MelvinBot MelvinBot requested review from thienlnam and removed request for a team June 22, 2021 06:51
@@ -69,7 +69,7 @@ function getUserDetails() {
// Update the User onyx key
const loginList = _.where(response.loginList, {partnerName: 'expensify.com'});
const expensifyNewsStatus = lodashGet(response, 'account.subscribed', true);
Onyx.merge(ONYXKEYS.USER, {loginList, expensifyNewsStatus});
Onyx.merge(ONYXKEYS.USER, {loginList, expensifyNewsStatus: !!expensifyNewsStatus});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why we're using evaluating to a truthy value here, what is the expected value of expensifyNewsStatus? A number?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Api returns Int 1, 0 and we want to save Boolean

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, thanks!

@thienlnam thienlnam merged commit cf7018e into Expensify:main Jun 22, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging in version: 1.0.73-4🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production in version: 1.0.74-0🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@parasharrajat parasharrajat deleted the preference branch November 4, 2022 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

user.expensifyNewsStatus is overwritten on page reload
3 participants