Configuration sync messages use proto2, so the value for a given field
may or may not exist. When we receive an incoming sync message, we
should only adopt any properties if they're already set. Otherwise we
risk interpreting an unset field as set NO.
Add nickname support. 1:1 threads are now named using the nickname of the contact if available. I expect there'll be design input about how to present this. For now I've gone with putting quotes around the nickname. Also, there's a lot of contact stuff so I'd appreciate checking that I did the correct thing here.
This bug fixes an issue where if the +[Theme sharedInstance] was first
initialized after AppReady and while in dark mode, we'd reenterantly
call +sharedInstance and crash on a dispatch_once assert.
This has been an existing issue that's only manifest recently due to
unrelated changes (will document below). To workaround this limitation,
we need to break the synchronous chain from +sharedInstance to
-themeDidChange. The most straightforward way to do that is to re-async.
This is a tiny bit of fallout from dc543ce. That commit did a bunch of
work to simplify OWSNavigationController's handling of its navigation
bar. Before, the navigation bar would be configured during
-[OWSNavigationController init]. It looks like UIKit lazily initializes
the navigation bar at first access, and the navigation bar would call
out to +[Theme sharedInstance].
Now, that work doesn't happen during -init. This means that the
sharesheet extension used to indirectly call +[Theme sharedInstance]
before AppReady, but now it doesn't. Now, its first call to +[Theme
sharedInstance] happens after AppReady.
Modifies ContactDiscoveryTask to filter out any duplicate e164s. Also
renames a bunch of things to make identifier formatting expectations
more clear.
A candidate for further improvement: IOS-757: Adopt PhoneNumbers in CDS
subsystem
Also, changes how ContactDiscoveryTask is used by callers. Now, callers
check the provided error's retry after to determine when to schedule the
next attempt.
(Except OWSMessageSender for now)