* Remove "@objc" attribution in places related to ConversationInputToolbar where that is no longer necessary.
* Swiftify LinkPreviewState protocol.
* Convert ConversationScrollButton to Swift.
- 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.
This change:
- Ensures that the tab bar stays hidden when disabling stories from
within the stories tab
- Updates the keyboard constraint when orientation changes
- Updates the stories search bar constraint to never resize the safe
area layout guide
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
* Un-index deleted private story threads. Omit disabled private story threads from search results
* Fix bad debug assert on empty picker search results
* remove extra didRemove FTS check
This change may improve performance slightly but should have no other
user impact.
`myString.isEmpty` is faster than `myString.count == 0` or equivalent,
because computing `count` may require iterating over the string.
I tried to fix all occurrences of this.
Tested this by sending a message in a group and doing a full
re-registration, just in case I broke something there.
(Also, don’t call out recipients that don’t support New Groups.)
We try to populate this picker with users we believe are registered. Now
that GV2 is fully rolled out, all the recipients we believe are
registered should have a UUID. (If any don’t, we’ll resolve that on
launch via UUIDBackfillTask.) Since these proactive fetches *shouldn’t*
run, prevent them from running by removing them entirely.
If we hit a rare race condition where a recipient is missing a UUID,
we’ll still perform a lookup when trying to select that recipient.
In these rare edge cases where a recipient doesn’t have a UUID (which,
again, shouldn’t happen), the subtitle indicating that they don’t
support New Groups will be out of date. By removing proactive fetches,
it’ll remain out of date until the user taps the row. To avoid
confusion, defer showing an error until the user taps on the recipient.
* Shuffle code around, adding UnsentTextAttachment
* Replace usages of TextAttachment with UnsentTextAttachment where applicable, creating an actual TextAttachment (and associated OWSlinkPreview image TSAttachment, if applicable) only per-recipient
* Only upload one text story link preview image attachment and propagate it to the individual TSAttachments created for each destination
* update comments so I don't lose my mind the next time I read this code
* Dedupe text stories sent to the same person via multiple private threads
* fix non-compiling tests
* pr feedback
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.
There were some redundant checks as a result of the duplication between
the validation and lookup methods. Shift more of the logic into the
shared method to avoid repeating the same thing multiple times.
Also, return a single item rather than an `Array`. We only expect a
single result, so there’s no need to pass around an `Array.`
* apply theme to cells when conversation picker theme changes
* Retain selection UI when reloading conversation picker cells
* Prioritize newly created story threads for conversation picker sort ordering
* Index private story threads for searching
* Add story search results to conversation picker and fix issues with reloading with stuff pre-selected
* PR feedback 1: efficient thread migration
* PR feedback 2: don't allow expansion of story search results
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
* Support scale aspect fill in MediaMessageView
* show image/video previews on conversation picker when in stories only send flow
* show text story previews in conversation picker
* fix media preview border color
* update rotation for RTL
* PR feedback
* Hide story video duration tooltip when changing selection
* update story row swipe action title font
* Update tab bar icons
* Fix ghost safe area shown when cancelling an interactive dismiss of a chat view
* Use forced dark theme background color for cell selection in story info sheet
* Exclude hidden story contexts from conversation picker
* remove unused asset
* pr feedback
* Disable view once media in stories send flow
* Remove stories from picker if sending a view once media
* dont show view once button if sending to stories from sharesheet
Quiets this warning:
> genstrings: warning: Key "STORY_SETTINGS_WHO_CAN_VIEW_THIS_FOOTER"
> used with multiple comments "Section footer for the 'viewers' section
> on the 'story settings' view" & "Section footer for the 'viewers'
> section on the 'story settings' view."
Also changes another string for consistency (removes the trailing
period).
This fixes our remaining SwiftLint violations, which were small.
It also updates the precommit script to fail if any violations are
found, even warnings. This will cause CI to fail if you include a file
that isn't SwiftLint-compatible.