Commit Graph

232 Commits

Author SHA1 Message Date
Sasha Weiss
c7f4fcd860
Update verified status in safety number confirmation sheet 2023-04-06 12:11:52 -07:00
Max Radermacher
aaf1d0e0b6
Clean up SignalRecipient create & fetch APIs 2023-03-29 18:40:05 -07:00
Evan Hahn
227340ce92 Account data report: show loading spinner
I recommend reviewing this with whitespace changes disabled because a
lot of stuff was indented but not otherwise changed.
2023-03-29 15:53:18 -05:00
Sasha Weiss
d5583c059e
Skip offering blocked threads in the ConversationPicker 2023-03-28 12:50:39 -07:00
Igor Solomennikov
7a717b9c35
Fix an error and some warnings in Xcode 14.3
* Fix name collision.

`UIView.autoPinEdgesToSuperviewEdges(withInsets:)` declared in SignalUI
was doing the same thing as `-[UIView autoPinEdgesToSuperviewEdgesWithInsets:]`
in PureLayout. Xcode 14.3 has started treating this ObjC name collision as an error.

* Fix warnings that would be errors in Swift 6.
2023-03-27 16:36:43 -07:00
Igor Solomennikov
23bbc9e2c2 Improve animations for showing/hiding album strip in media viewer. 2023-03-27 15:24:56 -07:00
Evan Hahn
43320fdd44 Swiftify recipient picker "no contacts view" creation
This change should have no user impact and is just a manual translation
from Objective-C to Swift.
2023-03-27 09:32:27 -05:00
Evan Hahn
492284cab6
New registration: warn about remaining PIN attempts 2023-03-21 17:37:06 -05:00
Evan Hahn
eff8c4c2a3 Support attributed strings in action sheet messages
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.
2023-03-21 10:55:46 -05:00
Harry
a31fb00368
Change all e164 references in reg coordinator to E164 type 2023-03-16 11:32:13 -07:00
Igor Solomennikov
de8c24d345
Media viewer improvements.
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).
2023-03-15 11:55:04 -07:00
Pete Walters
3e3e0e5acf
Add manager to periodically validate usernames 2023-03-14 09:56:08 -05:00
Harry
a146e18aaf
Set up account state and exit registration
* 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
2023-03-09 21:54:51 -08:00
Max Radermacher
898fd2c4d5
Clean up queue names 2023-02-27 14:16:09 -08:00
Max Radermacher
b9a345bd36 Remove contactDiscoveryV2 feature flag
It’s enabled for all users, so we don’t need the flag.
2023-02-22 13:46:13 -08:00
Max Radermacher
7ac03076e6
Consolidate link preview fetching code 2023-02-21 12:49:25 -08:00
Harry
dc1ac4fc8b
Hook up RegistrationPhoneNumberViewController
* Hook up RegistrationPhoneNumberViewController

* Fix existing tests

* add some new tests; fix test scaffolding bug

* Show an error before going back to phone number entry if the session is invalidated
2023-02-21 07:46:56 -08:00
Evan Hahn
99cfa9e2df
Add new registration phone number entry screen (dormant) 2023-02-15 12:41:17 -08:00
Max Radermacher
37603f1906 Fix build error in username code 2023-02-14 18:07:05 -08:00
Sasha Weiss
44a6fa24ab
Add contacts' usernames to ContactRecord, if nothing better available 2023-02-14 13:42:53 -08:00
Evan Hahn
6049a8e8f7 Deprecate RegistrationPhoneNumber
This renames `RegistrationPhoneNumber` to
`Deprecated_RegistrationPhoneNumber`, which should have no user impact.
This will be useful for an upcoming change.
2023-02-14 06:19:26 -08:00
Evan Hahn
e8c7ba8138
Make RegistrationCountryState a struct
This change should have no user impact. I made sure I could go through
registration as normal after this change.

`RegistrationCountryState` was an `NSObject` and now it's a Swift-only
struct. (It still requires `Dependencies` for now, but I think this is
an improvement.)
2023-02-13 18:29:02 -08:00
Sasha Weiss
18d8a2cccf
Specific error for trying to search for invalid username 2023-02-10 09:44:54 -08:00
Sasha Weiss
e5f1af6c2e
Support lookup-by-username 2023-02-08 10:16:57 -08:00
Harry
003cc19e62
Update SignalCoreKit. Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params
* Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params

* Update SignalCoreKit
2023-02-07 16:14:39 -08:00
Sasha Weiss
e4bf99aee6
Dynamic updates when possible in username selection 2023-02-07 09:45:58 -08:00
Max Radermacher
015803297a
Add .notAllowed to editingAuthorization for iPad 2023-02-01 11:33:37 -08:00
Max Radermacher
0c3cec9146
Update SignalCoreKit
* Update filterForDisplay call sites
2023-01-31 12:34:07 -08:00
Sasha Weiss
b5807284e8
Add tappable "Learn More" link to username selection explanation text 2023-01-27 16:01:43 -08:00
Sasha Weiss
1126c98f19
"Select a username" UX 2023-01-26 11:38:21 -08:00
Evan Hahn
60ace0a8dc
Dismissing spinner shouldn't require callback
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()
2023-01-20 18:11:55 -06:00
Max Radermacher
e46d67c027
Fix bugs & consolidate “No Contacts” code
If all your contacts were blocked, we might not show the special “no
contacts” mode even though it should have been enabled.
2023-01-13 18:58:10 -08:00
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
Igor Solomennikov
f264b4b70d
Improvements for "Media Review" screen.
* 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.
2023-01-11 16:22:40 -08:00
Max Radermacher
a283045058 Improve collation methods in ContactsPicker 2023-01-10 14:43:09 -08:00
Max Radermacher
cbb7b07329 Make ContactCell conform to ReusableTableViewCell 2023-01-09 11:59:10 -08:00
Max Radermacher
103f9ed8b8 Fix typo: Convsersation → Conversation 2022-12-30 09:18:49 -06:00
Max Radermacher
46596ef33c Remove nonSignalContacts property 2022-12-21 14:24:38 -08:00
Max Radermacher
823c3d11a7 Fix Screen Lock error when no passcode is set
In abf556fb7a, we passed all presented
view controllers to the app’s main UI. However, screen lock errors don’t
immediately dismiss the screen lock UI, so they weren’t ever shown.

In 6ca4bfeff9, we adopted the new limited
photo picker APIs, and manually presenting the photo picker allows us to
specify the view controller from which it should be presented. That
eliminates the root cause that necessitated the workaround.
2022-12-20 13:52:15 -08:00
Igor Solomennikov
6ac2646306
Clean up and consolidate logic for setting textContainerInset in MentionTextView.
Also fix logic for calculation of top and bottom text container insets for
smaller fonts.
2022-12-16 15:48:28 -08:00
Harry
33e686319c
Use iOS 13+ UINavigationBarAppearance for navbar styling
* 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
2022-12-13 16:17:41 -08:00
Max Radermacher
6763747349
Attach link previews present in the message text 2022-12-07 16:13:49 -08:00
Evan Hahn
935dbd8274 Finish Swiftifying StickerPackInfo
Notable changes:

- `asKey` became a computed property instead of a function.
- Had to jump through some hoops for `MTLModel`.
2022-12-07 09:37:07 -06:00
Igor Solomennikov
41b1469f7a
Convert OWSAudioPlayer to swift and lose 'OWS' prefix.
Also rename OWSAudioSession to AudioSession for consistency with everything else.
2022-12-06 16:00:58 -08:00
Igor Solomennikov
8dfe095571
Animate input box height changes in the media flow. 2022-12-06 15:44:36 -08:00
Max Radermacher
f111a7f162
Swiftify DomainFrontingCountryViewController
Also:
* Remove OWSTableViewController2.useNewStyle
* Remove useThemeBackgroundColors
* Remove unused table view bg/cell colors
2022-12-06 12:53:45 -08:00
Evan Hahn
90268d567e
Remove unused status bar touch code
This change should have no user impact.

We post a notification when the user touches the status bar. This was
added in 4f80100234 but stopped being used
in dc543ce24f, so we can remove it.
2022-12-06 09:39:23 -08:00
sashaweiss-signal
dc3e588f64 Users must confirm PayPal donation before donating
Co-authored-by: Evan Hahn <evanhahn@signal.org>
2022-12-02 15:27:03 -06:00
Igor Solomennikov
8dcd75b0e0
Convert OWSBezierPathView to Swift. 2022-11-30 16:16:36 -08:00
Igor Solomennikov
dbb0824303
Improve animations in conversation input bar
* 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.
2022-11-21 11:37:21 -08:00