0

I am developing SNS Application. I tried to use ParseRelation. I created ParseUser and call the getRelation() function. I put posts and call currentUser.saveInBackground();

I checked the saved relation posts in Parse.com Cloud. But when I call currentUser.saveInBackground(), my ParseQueryAdapter is called loadObjects(). I want to perform 'like' function like 'like'Button at FaceBook App.

And after performing all functions that are saveInBackground() and loadObjects(), My 'like' Buttons are not updated. What should I do? I tried various methods, but I can't solve this problem.

Manuel
  • 14,274
  • 6
  • 57
  • 130
  • Your data is not changed before the save completes. If you enable local datastore and call saveeventually instead it should work I believe – cYrixmorten Mar 17 '15 at 13:46
  • I followed your comment. I checked saving the post I pick but My ParseQueryAdapter is not updated this button state. why?...... – Jun Seok Kim Mar 18 '15 at 07:03
  • In my adapter(ParseQueryAdapter), I perform relation query at constructor, and I circle the objects of the relatrion query ( repeat method 'for') and saving to ArrayList and I compare each object of posts with these ArrayList items. And my toggle button (List View Item, and LIKE BUTTON) is set by this comparison. – Jun Seok Kim Mar 18 '15 at 07:11
  • I think you should make the state change inside `getItemView()`. Here you receive the parseobject for each list item (getItemView is called for each entry) and depending on the state of the parseobject, set your buttons etc. – cYrixmorten Mar 18 '15 at 09:07
  • I used getItemView(). This queryAdapter is used to load posted posts. Consequently, my question is a solution of two querys in one queryAdapter. The first query is loading posts and the second query is getRelation() query. help me plz... – Jun Seok Kim Mar 20 '15 at 05:21

0 Answers0