Skip to content

Instantly share code, notes, and snippets.

@aaronpearce
Created July 4, 2011 20:30
Show Gist options
  • Save aaronpearce/1063889 to your computer and use it in GitHub Desktop.
Save aaronpearce/1063889 to your computer and use it in GitHub Desktop.
As messages are received, update room's last message value to that timestamp. Then call the DB if this timestamp is higher than the current timestamp in that view.
Or...
Use notification center or a instance var to set timestamp of the newest message for the current view if it is a chat view.
Then the chat will compare this to it's last message and load the messages in if needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment