Signal-iOS/SignalUI/ViewControllers/Recipient Picker
Max Radermacher 1311d3f665
Refactor contact access code
Split it based on whether the purpose is “editing” or “sharing”. If
we’re editing, it generally means we have full access to contacts, and
that we’ve checked which of the contacts are registered on Signal. If
we’re “sharing”, we don’t care whether or not they’re registered.

If we’re “sharing”, we check whether or not we’ve prompted for the
contacts permission yet. If not, we’ll show the prompt.

If we’re “editing”, we assume we’ve already prompted (which is already
the case today), so `.notDetermined` isn’t a possible state.

Other things to note:

- The `supportsContactEditing` was always true, so it’s been removed.

- The error when contacts access isn’t allowed is now shown more
  consistently. Previously, it was sometimes shown in response to
  initializing a view controller.

- Some RecipientPickerViewController code was moved from Obj-C to Swift.
  This is probably useful on its own, but it’ll also make it easier to
  build some new UI in subsequent commits.
2023-01-12 09:55:30 -08:00
..
RecipientPickerContainerViewController.swift Refactor OWSNavigationController 2022-11-03 16:40:47 -07:00
RecipientPickerDelegate.swift Clean up recipient picker contact/group cells 2022-11-07 13:02:45 -08:00
RecipientPickerViewController.h Refactor contact access code 2023-01-12 09:55:30 -08:00
RecipientPickerViewController.m Refactor contact access code 2023-01-12 09:55:30 -08:00
RecipientPickerViewController.swift Refactor contact access code 2023-01-12 09:55:30 -08:00