Commit Graph

398 Commits

Author SHA1 Message Date
Marissa Le Coz
1a822358e4
Update ConversationPickerVC immediately when recipient is removed 2023-08-09 15:50:14 -04:00
Sasha Weiss
a78e218283
Support processing an "uploaded" username link QR code 2023-08-01 10:55:13 -07: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
dcf3654c16
Exclude hidden recipients from relevant sections in ConversationPicker 2023-07-27 16:47:41 -04:00
Elaine
80b11735eb
Group stories on share sheets 2023-07-27 09:35:19 -06:00
Jordan Rose
dd260bc990 Ensure that the video mute button in calls has the right initial state
Previously, if you answered a call on the lockscreen but hadn't given
Signal permission to use the camera, opening the app would show video
as unmuted but with no actual video being sent. By explicitly enabling
or disabling video when the call starts (and allowing the camera to be
considered "enabled" when the app is in the background, even though no
video will be sent until it returns to the foreground), the button is
always in the right state.
2023-07-25 10:59:07 -07:00
Marissa Le Coz
52bf8a41fc
React to remote changes of hidden recipient state 2023-07-19 19:25:54 -04:00
Harry
93ea189a13
Safety number screen follow ups 2023-07-19 15:17:10 -07:00
Elaine
e7deeb3032
Fix fingerprint layout 2023-07-18 12:58:10 -06:00
Harry
8b58124ded
Fix miscolored placeholder text in media send flow and group story reply input. 2023-07-13 14:18:26 -07:00
Sasha Weiss
efeec3ac89
Show a tooltip for username links after setting a username 2023-07-13 10:01:07 -07:00
Pete Walters
c839720999
Fix contact picker margins on iPad 2023-07-12 12:47:45 -05:00
Sasha Weiss
88e8227fd0
Implement dual-mode present and scan username link controller 2023-07-07 15:04:32 -07:00
Sasha Weiss
da6810e198
Implement username link sharing 2023-07-07 14:54:26 -07:00
Harry
ef1dfc1316
Add messageBody as a type of DisplayableText 2023-07-07 13:41:24 -07:00
Sasha Weiss
239b9ef061
Fix potential infinite recursion in OWSTableItem 2023-07-06 13:14:58 -07:00
Harry
9ca04ec155
Remove old fingerprint vc; multifingerprint is now fingerprintvc 2023-07-06 10:01:53 -07:00
Harry
d595ac349b
Add multi-fingerprint view controller 2023-07-05 16:29:12 -07:00
Sasha Weiss
849fb9a4d6
More OWSTableItem cleanup 2023-07-05 13:44:08 -07:00
Harry
f952d53c2b
Add support for aci based OWSFingerprint 2023-06-27 10:57:13 -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
Harry
10985644b3
Add text formatting send support. 2023-06-23 10:26:46 -07:00
Harry
2f621c27b9
Translate OWSFingerprint to swift 2023-06-23 09:52:53 -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
9aecfe3af5
[TextFormatting Send] UIMenu for formatting selected text 2023-06-15 15:45:36 -07:00
Sasha Weiss
639008d985
Present largely inert username link QR code view 2023-06-15 14:28:41 -07:00
Sasha Weiss
f983a18940
Add a hook to OWSViewController for contentSizeCategoryDidChange 2023-06-15 13:26:55 -07:00
Sasha Weiss
8fd42528f0
Present username context menu via OWSTableItem tap handler 2023-06-14 10:34:51 -07:00
Igor Solomennikov
0686b39547 Add necessary imports to Swift files.
Those would be required for future PRs.
2023-06-13 14:46:12 -07:00
Igor Solomennikov
15e18896ae
Convert ViewControllerUtils to Swift as TextFieldFormatting. 2023-06-12 12:08:21 -07:00
Sasha Weiss
1848e4f9a1
Clean up OWSTableItem 2023-06-12 09:57:59 -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
c457cefc94
Convert UIViewController+Permissions to Swift. 2023-06-07 11:36:46 -07:00
Harry
cd4ac4e588
Emoji picker improvements 2023-06-07 11:05:13 -07:00
Igor Solomennikov
22f16c9a10
Re-worked bottom control panel in the media viewer. 2023-06-05 16:56:55 -07:00
Igor Solomennikov
498d173a68 Remove now unused OWSViewControllerObjc. 2023-06-05 16:18:17 -07:00
Igor Solomennikov
76c7b2db28
Convert ChatListVC to Swift. 2023-06-05 16:13:41 -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
Max Radermacher
ca3b018734
Add & use DisappearingMessagesConfigurationStore 2023-06-05 11:00:38 -05:00
Igor Solomennikov
c0b01db156
Convert Environment from SignalMessaging to Swift as SMEnvironment. 2023-06-02 20:53:07 -07:00
Igor Solomennikov
fad6d63b81
Convert two "fingerprint" VCs to Swift. 2023-06-01 13:28:35 -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
dbecd3053e
Convert "Blocked" view controller to Swift. 2023-05-16 16:54:47 -07:00
Igor Solomennikov
f22ae21b54
Convert SignalApp to Swift. 2023-05-16 16:48:06 -07:00
Igor Solomennikov
c054f3de91
Remove unnecessary "@objc" in SignalUI. 2023-05-16 16:39:19 -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
Igor Solomennikov
bb2b665f6f
Convert Theme to Swift. 2023-05-02 12:49:36 -07:00
Igor Solomennikov
e9eefda2d9
Convert screen lock related classes to Swift.
Co-authored-by: Max Radermacher <max@signal.org>
2023-05-02 12:06:40 -07:00
Harry
b3700d07ce
Refactor mention/style/search result attribute application 2023-05-01 13:57:07 -07:00
Evan Hahn
14237a873f
NSLocalizedString -> OWSLocalizedString 2023-04-25 13:28:46 -05:00
Harry
7daed0ae2f
typo fix
Co-authored-by: Utsav Dave <utsavdave1997@gmail.com>
2023-04-24 10:30:09 -07: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
Max Radermacher
a4c8f8bd7a
Fix assorted layout issues with PIN setup views 2023-04-12 20:10:58 -07:00
Evan Hahn
58e276d0f0
Remove UIUtil.h 2023-04-12 14:59:59 -05:00
Igor Solomennikov
d24a1c1c3e
Fix (>) send button squished in media composer on iPhone 5.
Make margins around buttons smaller on narrow screen devices.
2023-04-11 12:36:52 -07:00
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
Harry
f76dc500a7
Fix onboarding & gif picker on iOS 12
* Fix crash in OnboardingNavigationController on iOS 12
* Fix Gif picker on iOS 12
* Update comment & avoid explicit invocations

Co-authored-by: Max Radermacher <max@signal.org>
2022-11-21 11:16:41 -08:00
Max Radermacher
49fa221d3f Fix OWSNavigationController initializer on iOS 12 2022-11-17 16:11:18 -08:00
Igor Solomennikov
d57e0d35b8
Update "Send" button icon to up arrow in all places. 2022-11-16 16:32:34 -08:00
Harry
f7124e84e2
Update sharesheet error sheet copy when failing to send only to stories 2022-11-16 13:09:32 -08:00
Harry
5824871af9
Share sheet: allow sharing to story before processing completes 2022-11-16 10:28:06 -06: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
Harry
1be2c1489b
Require explicitly setting my story privacy settings before sending to my story
* Update checkmark icons (for selection rows only)

* Use selected/unselected checkmarks on my story privacy settings

* Initially show no setting on my stories privacy. Require setting to select My Story in recipient picker

* Clear my story privacy settings from debug ui

* design request: keep the all connections view button if unselected

* Same size for story privacy rows with and without detail text
2022-11-11 13:28:14 -08:00
Harry
df420416dd
Story crashes - tentative fixes
* Dont incrementally reload the collectionview before blowing it all away with a reloadData

* Use proper api to set PureLayout priorities
2022-11-11 08:34:26 -08:00
Harry
190c56b68b
Fix broken navigation when interactive back swiping on root nav controller 2022-11-09 11:59:38 -08:00
Harry Sanabria
fe96c75920 Apply rotation+keyboard updates properly in OWSViewController 2022-11-09 08:51:39 -06:00
Harry
ca64272c56
Fix janky animation caused by uneccessary navbar hidden state changes
* Fix janky animation caused by uneccessary navbar hidden state changes

* Temporary fix for layout crash issues that re-introduces navbar sizing issue
2022-11-08 16:56:03 -08:00
Igor Solomennikov
6a7d6c0fae
Switify some code related to ConversationInputToolbar.
* Remove "@objc" attribution in places related to ConversationInputToolbar where that is no longer necessary.
* Swiftify LinkPreviewState protocol.
* Convert ConversationScrollButton to Swift.
2022-11-07 16:32:59 -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
Harry
5a42e0e608
A few stories fixes
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
2022-11-07 14:31:37 -06:00
Harry
b415f4f70e
Fix some issues with OWSNavigationController.swift
* this is the dumbest bug fix I have ever experienced

* Fix uneccesary setNavigationBarHidden messing with scroll gestures

* update comment
2022-11-04 16:21:13 -07: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
Harry
d06babf59f
Translate OWSNavigationController to swift
* Translate OWSNavigationController to swift

* pr feedback
2022-11-03 15:33:02 -07:00
Harry
c745f9a6ae
Refactor OWSViewController
* 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
2022-11-03 13:12:13 -07:00
Harry
2b6d1da564
Un-index deleted private story threads. Omit disabled private story threads from search results
* 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
2022-11-02 11:18:55 -07:00
Evan Hahn
a941c82c14
Prefer isEmpty with strings
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.
2022-11-01 17:53:46 -05:00
Evan Hahn
b72449490c Use contains instead of filter(...).count > 0
This small change should speed up the attachment approval process.
2022-10-31 17:15:31 -07:00
Evan Hahn
f07735f706 Precommit script should fail if lint fails
This change should have no user impact.

I thought I did this in 1b00741b6d7dbfbe48e5b1c46f856902d0e6d02a...this
*actually* does it.
2022-10-28 15:51:02 -07:00
Harry
5865a0a478
Translate OWSViewController to swift 2022-10-28 10:24:55 -07:00
Max Radermacher
f7b18c5ea9 Remove unused BaseMemberViewController code 2022-10-25 00:41:24 -07:00
Max Radermacher
ef1bd4064f Don’t fetch UUIDs when opening BaseMemberVC
(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.
2022-10-25 00:41:24 -07:00
Max Radermacher
ab55cf3929 Import SignalMessaging where it’s needed
The next commit removes a file that, through assorted Swift/Obj-C bridge
magic, resulted in SignalMessaging being available to all these files.
2022-10-24 10:19:06 -07:00
Max Radermacher
09e3c7e3d4 Only show non-empty “Contacts” search results
If the only result is blocked, we’ll show an empty “Contacts” section.
2022-10-24 09:18:28 -05:00
Harry
87db4ab0aa
Better multisend of text stories
* 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
2022-10-20 11:04:25 -07:00
Max Radermacher
1ea74d9266 Fix recipient picker nav bar when theme changes
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.
2022-10-19 13:20:00 -07:00
Max Radermacher
3b11c52177
Move all ContactDiscoveryTask callers to Swift
* Move `intersectContacts:…` to Swift
* Move RecipientPickerVC contact discovery to Swift
* Remove ObjC support from ContactDiscoveryTask
2022-10-19 08:34:50 -07:00
Max Radermacher
721d0d662f
Consolidate “Find by Phone Number” validation
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.`
2022-10-19 08:33:48 -07:00
Harry Sanabria
1e227641c9 Once reply sheet is focused and maximized, keep it maximized 2022-10-18 22:38:36 -07:00
Harry
df51a9f837
Story-related conversation picker fixes
* 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
2022-10-18 16:14:16 -07:00