There are a lot of events that get dispatched onto the main queue
(often /from/ the main queue), and processing them during the setup
for the subsequent test can cause problems. In particular, the
notification for setting up a local number in -[OWSMessageManagerTest
test_GroupUpdate] was occasionally being processed in the subsequent
-test_GroupUpdateWithAvatar, depending on how long GRDB took to set up
in the second test.
...never the photo picker. This removes the notion of "attach a photo
as a file", which the previous commits have made equivalent to
attaching a photo any other way.
This makes for a more uniform experience and optimizes for bandwidth
when attaching a JPEG that's under our threshold but still pretty big.
Previously we'd send that along after stripping metadata, but now
we'll recompress it regardless.
Sticker-like images are opted out because they usually contain content
that's better represented in a compressed lossless format due to the
use of solid colors...and also we don't want to lose transparency if
we don't need to.
Note that isBorderless is sometimes equivalent to the "sticker-like"
check, but we don't want to rely on that here. isBorderless is a
presentation option.
Uses the nigh-undocumented CGImageDestinationCopyImageSource instead
of CGImageDestinationAddImageFromSource to avoid having ImageIO
re-encode the image contents.* If that fails, falls back to the
standard resize-as-JPEG logic in all cases rather than just reporting
a failure to strip metadata.
* https://developer.apple.com/library/archive/qa/qa1895/_index.html
Fixes a collection view batched update crash on iOS 12
Adds a bottom layout margin to the banner for home button devices
Banner now listens for external changes to active card set
Clear banner on successful PIN restoration