TODO
-[x] respect order of queue
-[x] replacements
-[x] those w/o completion handler
-[x] basic send+log operation persists
-[x] send+ui completion
-[x] share extension
-[x] update state jobs
-[x] App Lifecyle
-[x] settable
-[x] Mark as ready on startup
-[x] Fail appropriate jobs on startup
NICE TO HAVE
-[x] concurrent per senders
-[ ] longer retry (e.g. 24hrs)
-[ ] App Lifecyle
-[x] retry failed jobs on startup?
-[ ] reachability
DONE
-[x] basic passing test
-[x] datamodel
-[x] queue/classes
block manager synchronizes on self for coherent read/writes to blocking state
across threads, but we want to be able to have performant reads on the main
thread.
-[ ] UI
-[ ] Conversation Settings
-[x] Show switch for group
-[ ] localize
-[ ] migrate existing localizations? (nice to have)
-[ ] can view conversation settings (but not edit them) in left group
-[ ] special block copy for groups
-[ ] special unblock copy for groups
-[ ] ConversationViewHelper
-[x] Track blocked groups
-[ ] HomeView
-[ ] ConversationView
-[ ] Any others?
-[ ] Rename? Extract BlockList cache?
-[ ] Block List
-[ ] Group Section
-[ ] Unblock group
-[ ] Interstitial interacting with blocked threads (e.g. thread picker)
-[ ] BlockListUIUtils w/ thread
-[x] Block
-[x] Unblock
-[ ] Replace usages where possible
-[x] block manager
-[ ] Sync
-[x] tentative protos
-[ ] confirm protos w/ team
-[x] send new protos
-[ ] Message Processing
-[ ] Drop messages from blocked groups
There are multiple places in the codebase we present a conversation.
We used to have some very conservative machinery around how this was done, for
fear of failing to present the call view controller, which would have left a
hidden call in the background. We've since addressed that concern more
thoroughly via the separate calling UIWindow.
As such, the remaining presentation machinery is overly complex and inflexible
for what we need.
Sometimes we want to animate-push the conversation. (tap on home, tap on "send message" in contact card/group members)
Sometimes we want to dismiss a modal, to reveal the conversation behind it (contact picker, group creation)
Sometimes we want to present the conversation with no animation (becoming active from a notification)
We also want to ensure that we're never pushing more than one conversation view
controller, which was previously a problem since we were "pushing" a newly
constructed VC in response to these myriad actions. It turned out there were
certain code paths that caused multiple actions to be fired in rapid succession
which pushed multiple ConversationVC's.
The built-in method: `setViewControllers:animated` easily ensures we only have
one ConversationVC on the stack, while being composable enough to faciliate the
various more efficient animations we desire.
The only thing lost with the complex methods is that the naive
`presentViewController:` can fail, e.g. if another view is already presented.
E.g. if an alert appears *just* before the user taps compose, the contact
picker will fail to present.
Since we no longer depend on this for presenting the CallViewController, this
isn't catostrophic, and in fact, arguable preferable, since we want the user to
read and dismiss any alert explicitly.
// FREEBIE