This change should have no user impact, but makes a future change
easier.
`ActionSheetController` supports string messages, but now it also
supports `NSAttributedString` messages. That lets us include styling
(like bold) and links.
This change should have no user impact.
This makes a few changes to `OWSActionSheets`:
- `OWSActionSheets` is now an enum (with an Objective-C bridge)
- Some unnecessary methods were removed
- Fixed some long lines
It also removes the payment-specific
`OWSActionSheets.showPaymentsOutdatedClientSheetIfNeeded` extension. It
didn't add much and required passing a global object, so I removed it.
Change appearance of controls in media viewer:
• use dark chrome background for top and bottom panels.
• move "Delete" into (•••) submenu at the top.
Appearance tweaks for media album strip at the bottom of media viewer.
• update design to latest spec.
• make media strip view configurable (border color and width, size, corner rounding).
* 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
* payment lock
* add 30 day timeout to showing the payment lock suggestion
* fix linting
* update comment
* Payment Lock: Fix project file & submodules (#4878)
* revert ringrtc changes
* revert pods changes
* fix project file
* PR Comment suggestions and fixes
* PR suggestions
* revert screen lock to previous implementation
* rename OWSPaymentLock to OWSPaymentsLock (missing plural s), remove
super-class dependency. Make OWSPaymentsLock more "swifty".
* revert changes to call-site for OWSScreenLock
* update call-sites for OWSPaymentsLock
* forgot to add PaymentOnboarding class and localization comment improvements
* change function call-site
* Remove OWSLocalAuthentication from project
* remove OWSLocalAuth from project file
* make edge-case default more secure if storage not ready
* fix project file
* lint fix
* fix linting errors
* Revert compact format style for OWSLocalizedString
* fix localization call-sites to use literals, update localization file after autogen
* Add new Payments Lock Prompt view to be shown after activating payments. Factor out the BiometryType "current biometry" into its own class with helpers to easily getting the devices current setup.
* fix linting issues, sort project file, and autogen localizations
* require payments lock to look at the recovery phrase
* fix linting issue
* fix missing localizations (caused by dynamic creation in previous commit)
* use Pods commit from signal/main
* re-run linter on latest commits
* new header comments for new branch files
* update submodule commits
* Use existing secondsInDay constant kDayInterval, use weak self guard statement instead of optional self in escaping closure.
* Revert submodule changes
* Remove duplicate copyright headers
* Revert copyright header changes
* Restore some missing translations
* Add localization for unknown LocalAuthentication error/state.
* remove Pods changes
* linting
* use submodule commits from main
* subclass the old Objc OWSViewController super-class, should fix CICD
* change capitalized Passcode to lower-case in non-title situation.
* remove early exit guard from biometryType computed function. Reason being that the type can be gathered from a policy that evaluates to false. In a case where the user has a FaceID phone but its disabled, the messaging would be incorrect. removing the early exit evaluates the biometryType which apple provides even if the policy returns false.
* inline snooze date
* inject write transaction to some convenience methods to reduce database overhead when multiple calls need to happen at the same time.
* make combined set and snooze function, update combined call-site
* rename long function
* use false instead of sender.on to avoid sneaky view issues
* add tryToUnlockPromise function to clean up call sites
* change superclass, fix Promise statement
* call super class function
* remove objc
* add unlock failed action sheet helper class and put at all relevant call-sites, still need to test though.
* add unlock failed action sheet helper class and put at all relevant call-sites, still need to test though. linting
* project file changes for new file
* re-render payments lock toggle after failure to change setting.
re-render payments lock toggle after failure to change setting.
* move around action sheet call-site to account for an action sheet already being presented. remove unecc. return
* fix merge conflicts, linting
* re-gen strings file
---------
Co-authored-by: Max Radermacher <max@signal.org>
CVTextLabel incorrectly attempts to set default .font
and .foregroundColor on the label text, removing any
existing font & color attributes. This results
in unreadable text when displaying search results.
Instead, add helper method to set default attributes on
attributed strings, but only on ranges that don't have the
attribute already defined.
This is a minor change that should have no user impact.
We had a bunch of calls like this:
modalActivityIndicator.dismiss {}
This makes the parameter optional, so you can do this:
modalActivityIndicator.dismiss()
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.
* Enable zooming for photos and videos.
* Shrink media when keyboard is up.
* Fix minor animation issues on iPad.
* Fix "Add Message" placeholder not fading out properly.
* 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
* Make text input field's background translucent.
* Add animations to link preview panel in conversation input toolbar.
* Remove unused LinkPreviewViewDraftDelegate method.
* Add comment explaining layout logic.
* Improvements to "suggested stickers" panel in conversation input bar.
• ensure the panel doesn't show behind the text input area when sliding down.
• create panel lazily when it's needed for the first time.
* Do not disable user interaction on animated views in conversation input bar.
This change fixes an issue where Send button wasn't responsive for a few hundreds
of milliseconds after becoming visible.
Prior to 6a7d6c0fae, this comparison used
`isEqual:`. However, none of the `LinkPreviewState` concrete
implementations provided `isEqual:` implementations, so it was
equivalent to pointer equality. After that commit, these types no longer
subclassed `NSObject`, so the equality check always failed.
Previously, one-time donations were on one screen and monthly donations
were on another. Now, they're on a single screen with a picker.
Most of the interesting changes are in `DonateViewController`.
Other things of note:
- There are some new TODOs here for existing bugs I didn't fix. For
example, one-time donations don't do so well if there are any problems
at all.
- Even though we only support Apple Pay, there's code that alludes to
additional payment methods. For example,
`DonateChoosePaymentMethodSheet`. We'll expand on this in the future.
- Users should only be able to select currencies that the server
supports. For example, you shouldn't be able to select EUR if the
server doesn't support euros. This wasn't working correctly before,
but is fixed here.
We already fixed one part, where users could change to an unsupported
currency (see dab02f30ae). However, if
your _default_ currency is unsupported and you didn't change it,
that's no good. This is unlikely for most users but could happen.
I fixed this by changing it from (effectively)
`Locale.current.currencyCode ?? "USD"`, which might not be supported,
to a preference list, choosing the first one the server likes.
- I skip animations if the Reduce Motion setting is enabled.
- On the donation screen, the logic for the preview badge has changed
slightly. If you already have a badge, we'll always use that.
• same layout of text styling toolbar (Done button is new in the UI).
• default text color to white.
• now only allow to change text styling (color, font etc) while editing text;
previously one could also update style after simply selecting a text overlay.
• clean up keyboard handling in photo editor's text overlay tool.
* 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.
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.