* Go to chat list view after registration
* sync system contacts during registration
* Use explicit local credentials for storage service operations during registration
* fix tests
* Quick hack to get through double pin confirmation
* Finishing touches
* lint
* fix build
* reload phone number discoverability after storage service sync
* fix tests again
* Take chat auth on account and contact record initializers
* Change around branches for clarity in OWSUserProfile
* pr comments
* Split ChatServiceAuth into the same and AuthedAccount
* fix tests
* merge woes
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.
* Use iOS 13+ UINavigationBarAppearance for navbar styling
* various individual view controller navbar style tweaks and fixes
* Remove unused navigation bar styles
* rename 'default' style blur
* Apply blur style to the UIVisualEffectView generated by UINavigationBarAppearance
* Use iOS 12 navbar blur method on iOS 13 since its bugged
* Fix on iOS 15, use old method on iOS 14
* PR comment nits
* explicitly invalidate KVO observers
RATE LIMITS & IS CRITICAL PRIORITY
Before this change, there was a notion of “critical” discovery tasks
that had their own rate limit, and that rate limit was used for
UUIDBackfillTask. In this change, that logic has been generalized to
consider a separate rate limit for additional request types.
QUEUE PRIORITIES
All of the discovery operations were updated to use `.userInitiated` as
their priority. Before this change, the `UUIDBackfillTask` and message
sending flow used lower priorities. However, both of those should use
higher priorities -- the former blocks receiving messages and the latter
blocks outgoing messages. This change allows the code to be simplified.
TESTS
This removes most of the existing `UUIDBackfillTaskTest` test cases
(they were commented out) and all of the `ContactDiscoveryTaskTest` test
cases (which were for the rate limiter, which has been moved elsewhere).
It introduces a few new tests. These aren’t meant to be exhausive;
instead, they’re meant to hit most of the code in the new classes and a
few specific edge cases that aren’t likely to be hit in normal use.
- Move recipient picker code to the correct file.
- Add a helper to fetch typed reusable table view cells.
- Only set shouldUseAsyncSelection in the one place that uses it.
- Remove some code that was duplicated between sync/async selection.
- Fix some strong references in the async preparation flow.
- Allow network errors when preparing recipients -- these may do network
fetches, and those can fail for non-interesting reasons.
- Move FindByPhoneNumberDelegate to Swift & make some code private.
Some changes:
- Convert most of the code to Swift.
- Update the search result section headers to “Find by Number”/“Find by
Username” instead of “Phone number search”/“Username search”.
- Remove “New message to:” from the rows & update the icons.
- Don’t look up phone numbers until the user taps the row. As a result,
there’s no “No user found. Invite via SMS?” row.
- Restore the invite via SMS feature if the user can’t be found. If a
number appears unregistered, we’ll offer to send an SMS.
- Start showing search results after 3 digits (approximately).
- Show potentially-invalid phone numbers to avoid results that disappear
if you happen to type a digit incorrectly.
* make shouldCancelNavigationBack a var
* rename OWSNavigationView->OWSNavigationChildController
* forward delegate calls to OWSNavigationController
* apply theme and style to OWSNavigationBar consistently
fix themeing on gif picker controller
* Use topPinned navbar position. Size the blur effect view using the background view
* Use fade animation when hiding the navigation bar
* fix issues with reduced transparency setting
* pr feedback
* Remove the useless shouldUseTheme
* Remove the useless shouldBottomViewReserveSpaceForKeyboard
* Add ViewControllerLifecycle
* Use more sensible constraints for keyboard layouts
* Consistent theme updates. themeDidChange is what you subclass, applyTheme is each class' internal application of theme changes, if needed
* Add app lifecycle hooks
* pr feedback
* pass through touches on the keyboard layout view(s)
* fix lint
On iOS 16, the nav bar itself is transparent, so the container view
controller’s background is visible. The color of that view wasn’t being
updated, which resulted in the nav bar appearing the wrong color.
A few view controllers worked around this by manually updating just the
background color to the same value used by the table view. It seems
cleaner to re-apply the overall styling when the theme changes.
Change license to AGPL
This commit:
- Updates the `LICENSE` file
- Start every file with something like:
// Copyright YEAR_FIRST_PUBLISHED Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
---
First, I removed existing license headers with this Ruby 3.1.2 script:
require 'set'
EXTENSIONS_TO_CHECK = Set['.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift']
same = 0
different = 0
all_files = `git ls-files`.lines.map { |line| line.strip }
all_files.each do |relative_path|
if relative_path == 'Pods'
next
end
unless EXTENSIONS_TO_CHECK.include? File.extname(relative_path)
next
end
path = File.expand_path(relative_path)
contents = File.read(path)
new_contents = contents.sub(/\/\/\n\/\/ Copyright .*\n\/\/\n\n/, '')
if contents == new_contents
same += 1
else
different += 1
end
File.write(path, new_contents)
end
puts "updated #{different} file(s), left #{same} untouched"
I'm sure this script could be improved, but it worked well enough.
Then, I created `Scripts/lint/lint-license-headers` and ran it to auto-
fix a lot of files. This changed the mode of some files, but I think
that's actually desirable. For example,
`SignalServiceKit/src/Util/AppContext.m` previously had a mode of
`0755/-rwxr-xr-x`, and it's now `0644/-rw-r--r--`.
Then I fixed some stragglers and updated the precommit script.
See [a similar change in the Desktop app][0].
[0]: 8bfaf598af
If you've left a group, we shouldn't show it in any pickers except the
blocking manager (`AddToBlockListViewController`). Before this commit,
we were showing it in a few places. That might let you sorta-send a
message to a group you'd left.
I enumerated all the places where we have pickers, and what their
behavior should be.
| Description | Code | Show groups? | Show left groups? |
| --------------------------------------------------------------------- | ------------------------------------------- | ------------------------ | ------------------------ |
| Various group member pickers (adding members, group story recipients) | `BaseMemberViewController` | No | N/A |
| Send payment screen | `PaymentsSendRecipientViewController` | No | N/A |
| Gift badging “choose recipient” screen | `BadgeGiftingChooseRecipientViewController` | No | N/A |
| Composer | `ComposeViewController` | Yes, only when searching | No |
| Add to block list (in Settings → Privacy) | `AddToBlockListViewController` | Yes, only when searching | Yes, only when searching |
| Share sheet | `SharingThreadPickerViewController` | Yes | No |
| Message forwarding | `ForwardMessageViewController` | Yes | No |
| In-app camera | `CameraFirstCaptureSendFlow` | Yes | No |
| Share group link via Signal | `GroupLinkViewController` | Yes | No |
| Share sticker pack, from in a chat | `StickerPackViewController` | Yes | No |
| Share sticker pack, from sticker management screen | `ManageStickersViewController` | Yes | No |
| “New Group Story” screen | `NewGroupStoryViewController` | Yes (exclusively) | No |
This doesn't intend to change the behavior of *deleted* groups. Those
will show up when searching if groups are shown at all. For example, a
deleted group will show in the composer if you search for it just like
any other group. A deleted group will *not* show in the "send payment"
screen because groups are never shown there. Again, the behavior around
deleted groups should remain unchanged.
Co-authored-by: Max Radermacher <max@signal.org>