-
Notifications
You must be signed in to change notification settings - Fork 54
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
add getAllKeys and removeItem #5
Conversation
🎈 this would be excellent! The built in AsyncStorage has significant limitations as you know. Is there anything I can do to help? |
@rt2zz I'm not really a java developer, been about 5 years since i have looked at it. so i was just winging it on this one. might be an issue with the callbacks being required so maybe i need to add some overloaded methods with only one input and no callbacks. not too sure. its pretty close to working but not sure where to go from here. Is all that is required to implement the four methods setItem, getItem, removeItem, and getAllKeys and then pass them in? or would i need to add support in redux-persist too? |
public void removeItem(String key, Callback successCallback) { | ||
SharedHandler.init(getReactApplicationContext()); | ||
SharedDataProvider.deleteSharedValue(key); | ||
successCallback.invoke(key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need callback for the removeItem? It will always give success right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sriraman good point i can remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the change myself in the master branch.
added these methods in an attempt to integrate with redux-persist. still working on integrating but these appear to be working as intended for now.