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

[FEATURE REQUEST] call onSharedPreferenceChanged with a list of preference keys #61

Open
teqtic opened this issue Oct 12, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@teqtic
Copy link

teqtic commented Oct 12, 2024

Sometimes I commit multiple preference keys at once. On the receiving listener end in another process, I sometimes need to receive the changes for all of these keys before acting on them. It would be really helpful if the sharedPreferenceChangeListeners would fire with a list of preference keys that were changed, if there were multiple, instead of one at a time.

P.S. Thank you for this library. If this is not a good place to request new features, please let me know!

@pablobaxter
Copy link
Owner

This is a feasible feature with the given the current SharedPreference implementation. It's just a matter of creating a new implementation of the OnSharedPreferenceChangeListener, and letting Harmony handle that class type appropriately. I've actually done something similar in this commit (3da2fdb). I am already planning on doing some updates to this library, and will add this to the list of things I'd like to modify.

@pablobaxter pablobaxter added the enhancement New feature or request label Oct 14, 2024
@pablobaxter pablobaxter self-assigned this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants