0

If I pin a parseobject to the local data store, is there a way to find the last pin's pinned at timestamp? Or is there a way to find when the object set with the tag supplied to the pin last updated at?

Edit 1: I am trying to pass the query result to a RecyclerView. After fetching it initially, I am pinning the last retrieved object list to the local data store. I don't want my recycler view to query again within a time difference of five minutes. So I want to check, the timestamp of the last pinned object set before I will query again if needed.

55597
  • 2,033
  • 1
  • 21
  • 40
  • Not sure if it is directly available, but it is not difficult to add your own timestamp which you can use. I assume that you refer to newly created objects so that no createdAt or updatedAt is yet added? – cYrixmorten May 30 '15 at 12:56
  • @cYrixmorten Thanks for the comment. I have updated my question with my use case. – 55597 May 30 '15 at 13:04
  • 1
    With that use case I would simply store a timestamp in shared preferences. Would be simple and works even on app restarts. – cYrixmorten May 30 '15 at 13:15
  • @cYrixmorten Thank you, That should work! Being a noob, i missed it completely. – 55597 May 30 '15 at 13:18
  • No problem :-) happy coding – cYrixmorten May 30 '15 at 13:25
  • Oh an by the way.. Do you use ParseQueryAdapter together with the RecycleView? Cause then I would love to see how they are properly tailored together, if you have a reference or a code snippet. – cYrixmorten May 30 '15 at 13:29
  • I am using a custom adapter class, as ParseQueryAdapter is not extending RecyclerView.Adapter. Hence, I am running into a lot of issues when trying to get the RecyclerView to work. I am not able to solve this one - http://stackoverflow.com/questions/30338314/recyclerview-onbindviewholder-onclicklistener-behavior . Kindly look into the other question and see if you can help. Thanks. – 55597 May 30 '15 at 17:50
  • Exactly the kind of problems I could imagine running into, which made me hesitate making the jump to RecycleView. I'll have a look at the link now. – cYrixmorten May 30 '15 at 18:40

0 Answers0