rrbrambley / MessageBeast-ObjC

A library for building Message-based apps on App.net
MIT License
6 stars 0 forks source link

Message Manager should be smarter about whether to keep messages in memory #39

Closed rrbrambley closed 10 years ago

rrbrambley commented 10 years ago

Currently, upon fetching new messages from the server, the message manager (pretty much) always assumes it is safe to keep the messages in the channel's message map and incorporate their ids and dates into the MinMaxPair for that channel. However, because an app could create a new message with an old display date (e.g. ohai display date annotation), it is not safe to incorporate all new messages' dates/ids into the MinMaxPair – doing so means that subsequent calls to load persisted messages will use the min max pair and potentially leave gaps of messages out. This is bad.