Commit Graph

111 Commits

Author SHA1 Message Date
Evan Hahn
4d55d95869 Autofix SwiftLint whitespace issues
I recommend reviewing this with whitespace changes disabled.
2022-09-15 16:37:44 +00:00
Nora Trapp
ae6b55b1bf Hide some extraneous back button labels 2022-09-12 15:35:02 -07:00
Nora Trapp
ad34089ffe Sync group stories with storage service 2022-09-12 12:00:14 -07:00
Nora Trapp
da9f52c67d Update conversation split view styling 2022-09-12 10:48:28 -07:00
Nora Trapp
6dc57c6eb0 Don't allow sending stories to groups you are no longer a member of 2022-09-12 10:38:47 -07:00
Nora Trapp
86be80dbd7 Add story info sheet 2022-09-12 10:36:15 -07:00
Nora Trapp
9bd91f66b6 Allow turning off stories 2022-09-12 10:14:09 -07:00
Nora Trapp
95ddec00b5 Redesigned story privacy settings 2022-09-12 10:14:09 -07:00
Nora Trapp
de0ef9444b Fix some usage of NSLocalizedString 2022-09-11 10:36:23 -07:00
Nora Trapp
66c25a4afd Batch update identity keys and present safety number sheet on camera first and sharing flows 2022-09-08 09:42:43 -07:00
Nora Trapp
92d5207158 Batch lookup safety number changes when selecting conversations from conversation picker 2022-09-08 09:42:43 -07:00
Jordan Rose
3d312796e6
The in-app calling PiP should dodge the keyboard
- Dismissing the keyboard resets the PiP window to its original
  location, unless it's been moved since

- Tested against all of iPad's various keyboard modes (undocked /
  floating keyboards are ignored)
2022-09-07 15:41:23 -07:00
Evan Hahn
1fb1bb297a
Swiftify showUIForLaunchFailure
A pretty mechanical conversion.

There were a few weirder things that I called out in comments.
2022-09-07 14:42:01 -05:00
Nora Trapp
09598d2e7a Add remote flag for stories 2022-08-31 13:34:24 -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
Nora Trapp
b420ad1f95 Cleanup AttachmentMultisend 2022-08-19 14:23:59 -07: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
Jordan Rose
0f694d318c Allow ToastController to present from the top as well 2022-08-17 17:59:19 -07:00
Igor Solomennikov
915f3bd4f9
Redo media quality picker sheet in media editor.
• provide visual feedback when user selects media quality.
• add VoiceOver support.
• fix retain cycle caused leak of ActionSheetController objects.
• correct bottom margin on non-notch devices.
2022-08-05 11:03:35 -07:00
Jordan Rose
07067fd03d Be more deliberate about starting/ending orientation notifications
- PhotoCapture's logic was correct, but hard to prove such.
- ScanQRCodeViewController left notifications on for the rest of the
  process lifetime.
- CallService was working around a WebRTC issue that appears to no
  longer be present (per inspection of the WebRTC code).
2022-08-05 08:11:38 -05:00
harry-signal
f305b4a2aa
Allow changing playback rate on OWSAudioPlayer
* Allow changing playback rate on OWSAudioPlayer

* nits and remove audio playback rater getter

* add explicit thread and attachment ID types to CVAudioPlayback cache
2022-08-04 14:55:53 -07:00
Jordan Rose
094c8290ce Remove unnecessary NotificationCenter.removeObserver calls
As of iOS 9, selector-based observers in NotificationCenter do not
need to be explicitly unregistered.
2022-08-02 17:43:52 -07:00
Jordan Rose
4f06a6d8a5 Fix incorrect uses of NotificationCenter block-based API
The block-based API returns a token that needs to be explicitly
unregistered, *and* the block should not capture 'self' strongly.
The fixes in this PR come in three flavors:

1. Switch to the selector-based API, sometimes taking advantage of
   the fact that extra arguments to an Objective-C method can be
   safely discarded (because they are passed at +0).

2. Save the observer token and unregister in deinit.

3. Comment why it's safe to leave the observer registered forever
   in this particular case.
2022-08-02 17:43:52 -07:00
Max Radermacher
03944b813d Remove tableViewStyle 2022-07-28 16:28:33 -07:00
Max Radermacher
c6e0df5607
Fix initial height of table view sheets
When computing the height constraints, the table view wasn’t always
sized properly, which resulted in the wrong initial height.
2022-07-27 15:31:23 -07:00
Igor Solomennikov
32fffd4308 Media Editor: fix an issue when Pen and Crop button might not be visible.
Repro steps:
* have an album of three media: the first two are static, the last one is a video.
* go to the video and tap into message text input to pop the keyboard.
* dismiss keyboard and swipe to the static image.

Expected:
Static image tools buttons to be visible.

Result:
Static image tools buttons not visible.

Issue is a very weird one and likely is caused by some obscure bug with UIKit / UIStackView.
2022-07-25 17:00:56 -07:00
Igor Solomennikov
77d1f2b5ab
Fix regression caused OWSTableSheetViewController not use all available height.
OWSTableViewSheetViewController is inherited from InteractiveSheetViewController
and has additional size calculation logic that updates current sheet size based
on UITableView's contentSize. However, there's also a "max height" constraint
that also needs updating  - this commits adds that.
2022-07-21 09:43:30 -07:00
Evan Hahn
c0c4a85d48 Fix InteractiveSheetViewController scrolling bug
Short story: we now properly decide whether the sheet is being resized
or scrolled, fixing the bug.

Long story:

Some users report that they can't scroll the forward message sheet
([example report 1][1], [example report 2][2]). This wasn't just a bug
with the forwarding sheet. It was a bug with all subclasses of
`InteractiveSheetViewController`.

When you gesture on the sheet, there are effectively two modes: "resize
the sheet mode", and "scroll the contents" mode. (See
`beginInteractiveTransitionIfNecessary` for a boolean that expresses
this.) The logic is effectively this:

    def getMode():
      if sheetHeight < maximumSheetHeight:
        # Note: there are some other ways to get this mode, e.g. by
        # grabbing the handle. But those aren't relevant for this bug.
        return "resize the sheet mode"
      else:
        return "scroll the contents mode"

Unfortunately, there was a bug in how we computed the max sheet height
if that height was larger than the height of the screen (e.g., in
landscape mode or on a shorter device). That bad height caused you to
get into "resize the sheet mode" incorrectly. This fixes that, and does
a few other cleanups.

[1]: https://github.com/signalapp/Signal-iOS/issues/5366
[2]: https://community.signalusers.org/t/beta-feedback-for-the-upcoming-ios-5-44-release/45401/3

Co-Authored-By: Igor Solomennikov <igor@signal.org>
2022-07-19 16:54:57 -05:00
Evan Hahn
486067130c Remove unused AttachmentCaptionViewController
It looks like this was removed in
7f4a5f3f7b.

`git grep -w AttachmentCaptionDelegate` and `git grep -w
AttachmentCaptionViewController` both return no results after removing
this file.
2022-07-15 17:15:53 -05:00
Nora Trapp
c2d9787cf7 PR Feedback 2022-07-15 15:05:03 -07:00
Nora Trapp
b67069e251 Add the editing of private stories 2022-07-15 15:05:03 -07:00
Nora Trapp
192c612bab Allow creation of private stories 2022-07-15 15:05:03 -07:00
Nora Trapp
d9c0a92ed4 Move dependencies needed for private story creation to SignalUI 2022-07-15 15:05:03 -07:00
Nora Trapp
b82cd6c654 Add ability to send to group stories 2022-07-15 15:05:03 -07:00
Nora Trapp
0dae510d07 Add '+ New Story' button to conversation picker 2022-07-15 15:05:03 -07:00
Igor Solomennikov
a71c59b9ad Fix issue making it impossible to activate popup menu in media editor's review screen.
Placeholder text view (the one that displays "Add Message") was stealing
focus and the fix is to disable user interaction for it.
2022-07-14 12:35:29 -07:00
Igor Solomennikov
cb4a9bb9e5 Minor UI fix for the review screen in media editor.
Long recipient name in the top right corner would not be faded at the
end upon initial presentation.
This was happening because subviews did not have their final frames at
the end of `layoutSubviews`.
The fix is to call method that updates fading on next run loop run.
2022-07-14 12:09:35 -07:00
igor-signal
a02c18c972
Animate UI changes in the bottom toolbar in media review screen.
Animate UI changes in the bottom toolbar in media review screen.
2022-07-13 12:12:48 -07:00
igor-signal
8b5ef88a88
Use "translucent dark" style for action sheets in media flow. (#4559) 2022-07-12 19:11:12 -07:00
igor-signal
0c02bf9f29
[Media Editor] Fixes for text field in review screen.
• improvement: correct amount of padding between text field and keyboard.
• fix: text field isn't tall enough when there's a message draft and
  keyboard isn't up.
• fix: onscreen keyboard briefly changes style to 'light' upon dismissal.
2022-07-12 16:13:06 -07:00
igor-signal
c64320e75b
Improve crop view presentation.
Keep image center intact when transitioning to/from crop view to
eliminate unpleasant "jump".
2022-07-12 12:03:55 -07:00
Igor Solomennikov
70f4ab3fab [Media Editor] Do not wrap image editing tool VCs in a nav controller.
Two VCs: photo editor and crop view don't need a UINavigationController
and are fine presented as is.

Also remove unused `completion` parameter.
2022-07-07 15:38:25 -07:00
igor-signal
bf2ce630d9
Fix layout of mention picker in media editor's Review screen. 2022-07-07 11:42:05 -07:00
Igor Solomennikov
7f4a5f3f7b Merge branch igor/media-editor-updates. 2022-07-06 14:54:26 -07:00
Evan Hahn
d0c7de494a Computed accessors shold always be in the same order
`get`, then `set`. This fixes violations of [SwiftLint's
`computed_accessors_order` rule][0].

A very mechanical change.

[0]: https://realm.github.io/SwiftLint/computed_accessors_order.html
2022-06-24 09:35:07 -07:00
Evan Hahn
576d854c6f Remove unnecessary break statements
This fixes all of our violations of [SwiftLint's
`unneeded_break_in_switch` rule][0].

[0]: https://realm.github.io/SwiftLint/unneeded_break_in_switch.html
2022-06-24 09:32:34 -07:00
Sasha Weiss (Signal)
2f4ded9d03
Fix reentrant DB read on mentions processing 2022-06-20 13:21:22 -07:00
Nora Trapp
7bd167f815
Initial story sending support
* Little fix for context menu

* Add 'My Stories' section to stories tab

* Add new story thread types

* Show stories in conversation picker

* Support for sending stories

* Update story list when sending stories

* Add basic 'My Stories' view controller

* Initial stories settings screens

* Consolidate TSPrivateStoryThread and TSMyStoryThread into one class

* Require an explicit read transaction to initialize an outgoing message

* Fix linting

* Allow enabling group story from internal settings

* Fix tests

* PR Feedback
2022-06-10 22:28:03 -04:00
Max Radermacher
66a2638edd Don’t attach canceled link previews 2022-06-09 15:10:50 -07:00
Evan Hahn
c2e7f0ca93 Prefer implicit getters
_I recommend reviewing this with whitespace changes disabled._

This fixes violations of [SwiftLint's `implicit_getter` rule][0] by
removing explicit getters when an implicit one would do.

[0]: https://realm.github.io/SwiftLint/implicit_getter.html
2022-06-06 14:00:15 +00:00