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

Favorites System #4

Open
PatheticMustan opened this issue Jan 28, 2020 · 5 comments
Open

Favorites System #4

PatheticMustan opened this issue Jan 28, 2020 · 5 comments

Comments

@PatheticMustan
Copy link
Member

As I said in #2, we need to have a system for favorites that save locally to the device.
It seems like the best solution would be AsyncStorage.

We can use this to store string key-value pairs.

Right now I'm thinking we can have a list of integer IDs for each item/tool, and just join them in a string later.
[1, 2, 3] would be 1_2_3, and we can just use String#split or String#join to parse/stringify them I guess

@KryptoCrash
Copy link
Member

Rather than do that, keep all items in Async storage by stringifying the json object for each item. Then unstringifying it later when in use.

@PatheticMustan
Copy link
Member Author

No, it'd be better to save it as an ID, because if we later change the description, the stringified JSON object would have the old description.
Using an ID, it would update with the new data from the server.

@PatheticMustan
Copy link
Member Author

I need your thoughts, ideas, feedbackkkk

@KryptoCrash
Copy link
Member

We need a way to store an array of objects

@KryptoCrash
Copy link
Member

ids*

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

No branches or pull requests

2 participants