Creates a special data source enum for ConversationAvatarView data
providers. Before, ContactCell and ConversationAvatarView used the data
source, neither applying to each perfectly
- Updates to the message send flow
- Presents basic captcha UI when needed
- Auto-resend when captcha is complete
What's left:
- Bits of UI to communicate the sending state to the user
- Some cleanup of how we talk to the server
- Localizations
The tile view will only reload the sections that changed. The page
view will reload its current item. This is necessary to keep the
MediaGallery model in sync with the database, but as a side benefit it
also means the All Media view gets live updates as new messages come
in.
And rewrite and simplify the rest of deletion logic appropriately.
(Thanks to Nora for the strategy.)
There is one tough case here: database updates have happened
/externally/ (say, from a disappearing message expiring), in which
case the database will be updated but the MediaGallery model will not.
In this case we've broken the invariant that we have the correct count
for each month-section, and need to put a hold on database access
until the model has been updated. The only effect of this is in the
page-based media VC, where we'll exit out of the browser rather than
advancing to the next item if the item we were looking at was deleted
/and/ the next item hasn't been loaded yet. (This can happen if you're
at the start of a message with many items and the whole message gets
deleted.)
Instead of the delegate showing the share sheet for a tapped-on
attachment, let the CVComponentGenericAttachment do it itself. This
keeps the delegate from dealing with any specific component views
within the conversation.