Commit Graph

30 Commits

Author SHA1 Message Date
Max Radermacher
03288e8be0
Introduce DisplayName for rendering names 2024-02-27 18:21:30 -06:00
Elaine
f0f357fcec
Add wireframe for calls tab UI 2023-12-22 10:27:24 -07:00
Max Radermacher
9c564f3c67
Clean up verification state changes & ignore PNIs 2023-10-11 10:52:38 -05:00
Marissa Le Coz
5688a7451c
[Recipient hiding] Prevent erroneous showing of unblock sheet 2023-08-23 11:16:43 -07:00
Harry
921c288894
Use modern db tx types in RecipientHidingManager and remove @objc 2023-07-31 18:02:28 -07:00
Marissa Le Coz
52bf8a41fc
React to remote changes of hidden recipient state 2023-07-19 19:25:54 -04:00
Igor Solomennikov
52f0015dfe
New set of icons. 2023-06-22 17:38:01 -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
c58de3bb5e
Convert RecipientPickerVC to Swift. 2023-06-05 09:59:34 -07:00
Igor Solomennikov
c054f3de91
Remove unnecessary "@objc" in SignalUI. 2023-05-16 16:39:19 -07:00
Igor Solomennikov
6dd3d9a6f2
Convert all convenience methods in UIFont+OWS to Swift. 2023-04-18 17:14:51 -07: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
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
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
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
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
Evan Hahn
370ff654e7
Change license to AGPL
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
2022-10-13 08:25:37 -05:00
Max Radermacher
ef91c13909 Remove unused RecipientPickerDelegate method
It appears unused since 8e4fd443cc.
2022-10-11 10:13:56 -07:00
Max Radermacher
db2677b0a7 Fix typo in shouldUseAsyncSelection 2022-10-11 10:13:56 -07:00
Max Radermacher
61fd33fa07 Remove redundant property assignments 2022-10-06 17:10:46 -07:00
Nora Trapp
8f8ec0c249 Show red X when picking contacts to exclude 2022-10-03 21:35:32 -07:00
Nora Trapp
6930ffe2fa Remove old group capabilities 2022-09-29 09:35:00 -07:00
Evan Hahn
02494b048a
Hide left groups from various pickers
If you've left a group, we shouldn't show it in any pickers except the
blocking manager (`AddToBlockListViewController`). Before this commit,
we were showing it in a few places. That might let you sorta-send a
message to a group you'd left.

I enumerated all the places where we have pickers, and what their
behavior should be.

| Description                                                           | Code                                        | Show groups?             | Show left groups?        |
| --------------------------------------------------------------------- | ------------------------------------------- | ------------------------ | ------------------------ |
| Various group member pickers (adding members, group story recipients) | `BaseMemberViewController`                  | No                       | N/A                      |
| Send payment screen                                                   | `PaymentsSendRecipientViewController`       | No                       | N/A                      |
| Gift badging “choose recipient” screen                                | `BadgeGiftingChooseRecipientViewController` | No                       | N/A                      |
| Composer                                                              | `ComposeViewController`                     | Yes, only when searching | No                       |
| Add to block list (in Settings → Privacy)                             | `AddToBlockListViewController`              | Yes, only when searching | Yes, only when searching |
| Share sheet                                                           | `SharingThreadPickerViewController`         | Yes                      | No                       |
| Message forwarding                                                    | `ForwardMessageViewController`              | Yes                      | No                       |
| In-app camera                                                         | `CameraFirstCaptureSendFlow`                | Yes                      | No                       |
| Share group link via Signal                                           | `GroupLinkViewController`                   | Yes                      | No                       |
| Share sticker pack, from in a chat                                    | `StickerPackViewController`                 | Yes                      | No                       |
| Share sticker pack, from sticker management screen                    | `ManageStickersViewController`              | Yes                      | No                       |
| “New Group Story” screen                                              | `NewGroupStoryViewController`               | Yes (exclusively)        | No                       |

This doesn't intend to change the behavior of *deleted* groups. Those
will show up when searching if groups are shown at all. For example, a
deleted group will show in the composer if you search for it just like
any other group. A deleted group will *not* show in the "send payment"
screen because groups are never shown there. Again, the behavior around
deleted groups should remain unchanged.

Co-authored-by: Max Radermacher <max@signal.org>
2022-09-20 14:36:36 +00:00
Nora Trapp
de0ef9444b Fix some usage of NSLocalizedString 2022-09-11 10:36:23 -07:00
Evan Hahn
c77a8022ed Hide blocked contacts from recipient pickers
Because we don't show blocked contacts in the recipient picker, we can
also remove some code that checks for blocked contacts.
2022-08-30 22:36:59 +00:00
Evan Hahn
48c3c08c10 Fix vertical_parameter_alignment SwiftLint violations
This fixes violations of [SwiftLint's `vertical_parameter_alignment`
rule][0]. This should have no user impact.

[0]: https://realm.github.io/SwiftLint/vertical_parameter_alignment.html
2022-08-18 10:37:09 -05:00
Nora Trapp
d9c0a92ed4 Move dependencies needed for private story creation to SignalUI 2022-07-15 15:05:03 -07:00