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

votedOnDictionary not syncing #6

Closed
auto234875 opened this issue Feb 15, 2014 · 2 comments
Closed

votedOnDictionary not syncing #6

auto234875 opened this issue Feb 15, 2014 · 2 comments

Comments

@auto234875
Copy link

I was wondering if you're having issues with this.
When I vote on a post, add it to the HNManager votedOnDictionary and reload my data, everything works correctly. The post is shown as voted on

But if I restart my app, it's showing as not voted on.

@auto234875
Copy link
Author

I rolled my own solution using an nsmutablearray, and it seems to be having the same problem.
I also used my own nsmutablearray and syncing up with NSUserDefault for the list of read post and it seems to be working perfectly.

At first, I thought that the view disappearing improperly (app reset) might be causing this problem, but it seems to not be the case. I'm saving it to nsuserdefault immediately after voting.

@auto234875
Copy link
Author

Figured out the problem. I had to retrieve my array from NSUserDefault immediately at viewDidLoad before the tableView is loaded.

Still, it doesn't make sense since I'm assuming that libHN is already doing this in the AppDelegate at [HNManager shareManager] startSession]

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

1 participant