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

fix(getDeviceName): un-memoize device name so it updates #1332

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

schie
Copy link
Contributor

@schie schie commented Oct 25, 2021

  • fix(index): removing memoization of getDeviceName
  • test(__tests__s/getters): changing tests for getDeviceName

Description

Fixes #1272

all real credit goes to @chrisdrackett for noticing this issue and the initial PR.

Compatibility

OS Implemented
iOS
Android
Windows ✅❌

Checklist

  • I have tested this on a device/simulator for each compatible OS
  • I added the documentation in README.md
  • I updated the typings files (privateTypes.ts, types.ts)
  • I added a sample use of the API (example/App.js)

removes memoization of device name because the device's name can be changed

resolves #1272

Co-authored-by: @chrisdrackett
moves function from `memoizedStringGetters` to `nonMemoizedStringGetters`
@mikehardy mikehardy changed the title removing device name memo fix(getDeviceName): un-memoize device name so it updates Oct 25, 2021
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for fixing this. Should be a squash-merge since the test is in a separate commit from the fix, otherwise master won't be git bisectable as it'll fail testing on the first commit without the second

Please feel free to merge as soon as CI looks reasonable - in fact it's just iOS Android on-device stuff now and the jest already passed so this is good to go IMHO

@mikehardy mikehardy added hacktoberfest-accepted Let's plant some trees pending-merge looks good, waiting on CI or similar labels Oct 25, 2021
@schie schie merged commit 7026844 into master Oct 26, 2021
@schie schie deleted the removing-device-name-memo branch October 26, 2021 13:58
rndi-bot pushed a commit that referenced this pull request Oct 26, 2021
## [8.4.3](v8.4.2...v8.4.3) (2021-10-26)

### Bug Fixes

* **getDeviceName:** un-memoize device name so it updates ([#1332](#1332)) ([7026844](7026844)), closes [#1272](#1272)
@rndi-bot
Copy link
Collaborator

🎉 This PR is included in version 8.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mikehardy mikehardy removed the pending-merge looks good, waiting on CI or similar label Jun 4, 2022
WictorWilnd added a commit to WictorWilnd/react-native-device-info that referenced this pull request Feb 27, 2023
wdavis122 added a commit to wdavis122/react-native-device-info that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deviceName not updating when user updates device name on device
3 participants