Commit Graph

65 Commits

Author SHA1 Message Date
Max Radermacher
9e5e0d69a2
Remove empty method overrides 2023-10-26 15:14:16 -05:00
Harry
aa0e250cb7
[Death to TSAccountManager, long live TSAccountManager][9] Migrate usages of old TSAccountManager to new 2023-10-05 08:56:08 -07:00
Marissa Le Coz
7d96b7e553
[Recipient Hiding] Ensure Note to Self cannot be hidden 2023-08-16 17:12:26 -04:00
Marissa Le Coz
ad0b8f44cc
[Recipient Hiding] Show confirmation action sheet and toast 2023-08-10 15:58:18 -04:00
Harry
921c288894
Use modern db tx types in RecipientHidingManager and remove @objc 2023-07-31 18:02:28 -07:00
Sasha Weiss
1398e335a0
Implement username links 2023-07-31 14:58:07 -07:00
Marissa Le Coz
d692eef5a7
Enable recipient hiding via context menu 2023-07-28 20:43:46 -04:00
Marissa Le Coz
52bf8a41fc
React to remote changes of hidden recipient state 2023-07-19 19:25:54 -04:00
Pete Walters
c839720999
Fix contact picker margins on iPad 2023-07-12 12:47:45 -05:00
Sasha Weiss
239b9ef061
Fix potential infinite recursion in OWSTableItem 2023-07-06 13:14:58 -07:00
Igor Solomennikov
0e9d511d1d
SignalUI cleanup.
• convert ObjC code from UIView+SignalUI to Swift.
• separate code from UIView+SignalUI to smaller files by functionality.
2023-06-23 14:36:21 -07:00
Igor Solomennikov
52f0015dfe
New set of icons. 2023-06-22 17:38:01 -07:00
Igor Solomennikov
af84a116c2 Fix checkmarks not appearing in contact list when creating group. 2023-06-21 14:18:34 -07:00
Harry
f728457039
Update build target to iOS 13.0 2023-06-08 16:21:20 -07:00
Igor Solomennikov
db9e73634c Fix inversed condition caused no contact sectioning in New Chat picker. 2023-06-07 13:13:26 -07:00
Igor Solomennikov
b3578dde47
Remove NSObject inheritance and exposure to ObjC for OWSTable* classes. 2023-06-05 10:12:51 -07:00
Igor Solomennikov
c58de3bb5e
Convert RecipientPickerVC to Swift. 2023-06-05 09:59:34 -07:00
Igor Solomennikov
c0b01db156
Convert Environment from SignalMessaging to Swift as SMEnvironment. 2023-06-02 20:53:07 -07:00
Igor Solomennikov
0ed81d560a
Convert OWSPreferences in SignalMessaging to Swift as Preferences. 2023-06-01 11:29:08 -07:00
Sasha Weiss
931ff85eb0
Basic support for username links 2023-05-17 13:19:30 -07:00
Igor Solomennikov
f22ae21b54
Convert SignalApp to Swift. 2023-05-16 16:48:06 -07:00
Sasha Weiss
97167eed7a
Use ServiceId in username lookup 2023-05-16 10:02:36 -07:00
Marissa Le Coz
4be334c5ad
Migrate SignalAccount to use SDSCodableModel 2023-05-11 17:34:15 -04:00
Igor Solomennikov
2b43b1fef9
Convert OWSTableViewController and related classes to Swift.
Also convert OWSTableContents, OWSTableSection and OWSTableItem to Swift.

The only subclass of OWSTableViewController was DebugUITableViewController which has to be converted to Swift as well.

I also changed OWSTableViewController to be a subclass of OWSViewController (more modern and all in Swift) instead of OWSViewControllerObjc.
2023-05-08 19:33:03 -07:00
Evan Hahn
14237a873f
NSLocalizedString -> OWSLocalizedString 2023-04-25 13:28:46 -05:00
Max Radermacher
7d0d59f451
Support contact merges for yourself 2023-04-20 14:11:51 -07:00
Igor Solomennikov
6dd3d9a6f2
Convert all convenience methods in UIFont+OWS to Swift. 2023-04-18 17:14:51 -07:00
Evan Hahn
b10a697498
Update warning reminder designs 2023-04-18 15:11:37 -05:00
Max Radermacher
a8511014cb
Use LocalIdentifiers in Storage Service 2023-04-14 10:20:58 -07:00
Evan Hahn
58e276d0f0
Remove UIUtil.h 2023-04-12 14:59:59 -05:00
Max Radermacher
aaf1d0e0b6
Clean up SignalRecipient create & fetch APIs 2023-03-29 18:40:05 -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
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
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
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
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
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
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
Max Radermacher
46596ef33c Remove nonSignalContacts property 2022-12-21 14:24:38 -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
50e0405276
Add ContactDiscoveryManager
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.
2022-11-15 13:37:28 -08:00
Max Radermacher
9439cc5191
Clean up recipient picker contact/group cells
- 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.
2022-11-07 13:02:45 -08:00
Max Radermacher
49d7896f8e
Update “Find by Number/Username” to latest designs
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.
2022-11-04 13:40:13 -07:00
Harry
520faa95df
Refactor OWSNavigationController
* 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
2022-11-03 16:40:47 -07:00