Commit Graph

28804 Commits

Author SHA1 Message Date
Nora Trapp
3a1741cedf Add sheet to see who has viewed and replied to your outgoing group stories 2022-08-10 20:17:44 -07:00
Nora Trapp
6dceaa615f Add ability to view private story views 2022-08-10 20:17:44 -07:00
Nora Trapp
f52accd3c5 Split group reply sheet into two components 2022-08-10 20:17:44 -07:00
Sasha Weiss
43943ca621
Organize GroupV2UpdatesImpl.swift 2022-08-10 16:50:23 -07:00
harry-signal
2a23f61a3f
Video Story muting/unmuting
* Start muted, unmute when pressing volume buttons

* move ringer switch observation into its own class

* observe ringer switch in stories

* add foreground time to AppContext; use to drive mute foregrounding behavior

* dont double observe

* mix story volume with others, show volume controls
2022-08-10 16:25:49 -07:00
harry-signal
9a65f52ae8
prevent pulling down the notification tray from messing up story viewer dismissal 2022-08-10 14:45:11 -07:00
Jordan Rose
678f8cb332 Re-apply "Rotate call button icons when the phone is in landscape"
Now with fixes for iPad, where the view supports rotation normally.
2022-08-10 10:28:19 -07:00
Jordan Rose
856ced4062 Use supportedInterfaceOrientations to force calls to portrait
Previously this used UIDevice.ows_setOrientation, an undocumented hack
to basically lie to the device about which way is up. This sounds
sketchy, but it's the result of a lot of testing various solutions for
something that could reliably force the app into portrait orientation.

However, every UIWindow has its own "supported orientations", provided
by the root view controller. And calls are implemented in their own
UIWindow (so that they don't disrupt whatever you were doing). So for
*calls specifically*, we can use supportedInterfaceOrientations to
force the app into portrait mode.

All other callers of UIDevice.ows_setOrientation work in the shared
main window, so they'll be left alone. This only changes things for
the call window.
2022-08-10 10:28:19 -07:00
harry-signal
37fad63c7a
Stop video stories after they aren't on screen
* stop video stories after they arent on screen

* use page controller transition methods instead of context view controller's lifecycle
2022-08-10 09:11:11 -07:00
Nora Trapp
82f21f92d1 "Bump build to 5.50.0.9." (nightly-08-10-2022) 2022-08-10 04:00:55 -07:00
Sasha Weiss
fd2dc55ff6
Add a call to UIApplication:setMinimumBackgroundFetchInterval during app launch 2022-08-09 16:57:46 -07:00
harry-signal
2d149b8525
allow playback of audio messages from the message detail view
* allow playback of audio messages from the message detail view

* Update UI when an audio message pauses because another one started playing

* pr feedback
2022-08-09 15:02:23 -07:00
Igor Solomennikov
17c3dba264
Allow to change font of text overlays in media editor.
Possible options match the ones used in text story viewer and currently are:
regular, bold, serif, script, condensed.
2022-08-09 14:21:18 -07:00
harry-signal
5c5de78a52
Add audio playback rate button UI
* Add audio playback rate button UI

* update animation values and remove feature flags since its now ready to go to prod

* address PR feedback

* PR nits
2022-08-09 14:03:59 -07:00
harry-signal
3a767cc31f
fix crash from using non designated initializer on UISegmentedControl 2022-08-09 13:02:05 -07:00
harry-signal
4561f0afb8
make threadassociateddata audioPlaybackRate column non-null 2022-08-09 09:55:38 -07:00
Nora Trapp
96de1622c3 "Bump build to 5.50.0.8." (nightly-08-09-2022) 2022-08-09 04:01:18 -07:00
Nora Trapp
eeab405752 "Bump build to 5.50.0.7." (Internal) 2022-08-08 16:07:47 -07:00
Nora Trapp
edc5c7beae Fix schema.sql for 2022-08-08 14:34:51 -07:00
Jordan Rose
e4bb6b6a5d Add a unit test to ensure the zkgroup server params are up to date 2022-08-08 12:08:01 -07:00
harry-signal
dce5402f9e
Fix VoiceOver when locking an audio message recording
While here, issue an accessibility layout notification as well, so that VoiceOver targets the send button once you lock the message.
2022-08-08 14:07:03 -05:00
george-signal
98acf9687a
Fix a crash in stories tableview. (#4692)
Commit 04737ff044
attempted to fix an assertion in
StoriesViewController due to UITableView
complaining about inconsistent state. The issue
continues to happen. This diff fixes it once and
for all (I hope!).

The scenario that caused a crash prior to
04737ff044 was:

  Initially:
  models = [a,b,c]

  Database changes to [a,b]

  reloadStories (loading queue)
      newModels = [a,b]
      schedule block to run on main queue

  Database changes to [x, b]

  updateStories (loading queue)
      captures self.models, value is [a,b,c] // cue ominous music
      load from database
      newModels = [x,b]
      schedule block to run on main queue; will delete c and change a to x

  reloadStories.block runs on main queue
      self.models=newModels, value is [a,b]
      tableView.reloadData()  // UITableView thinks c is deleted

  updateStories.block runs on main queue
      self.models=newModels, value is [x,b]
      tableView.beginUpdates()
      tableView.delete(index: 2)  // crashes because c was already deleted

Post-04737ff the following scenario causes a
crash:

  Initially:
  models = [a,b,c]

  Database changes to [a,b]

  updateStories (loading queue)
      load from database
      models.set([a,b])
      schedule block to run on main queue which will delete c

  iOS gets a wild hair and decides to call some
  UITableViewDataSource methods.

  tableView(_, numberOfRowsInSection:)
      return [a,b].count  // Now UIKit thinks c is gone

  updateStories.block runs on main queue
      tableView.beginUpdates()
      tableView.delete(index: 2)  // crashes because 2 is out of bounds vs number of rows

This commit fixes the problem by ensuring the
read-modify-write that happens in updateStories
never reads older data than what UITableView
has been told about and also that updates to the
model are properly synchronized with
beginUpdates()...endUpdates().

Here's how to think about it: the database goes
through a series of changes. Call them v1, v2,
..., vN.

The loading queue will see each in turn. For each,
it will enqueue a corresponding block on the main
queue to update `model` and tell UITableView about
it.

From the POV of the main queue, each update occurs
in the scope of a UITableView update.

From the POV of the loading queue, each update
reads from exactly the preceding version (from
`trueModels`) and writes to exactly the next
version of `trueModels`.

Therefore, there are no data races.
2022-08-08 10:34:39 -07:00
Evan Hahn
cfb88bfc8e "Bump build to 5.50.0.6." (nightly-08-08-2022) 2022-08-08 11:36:03 -05:00
Evan Hahn
e670730637 Update server params for LibSignalClient upgrade
We updated LibSignalClient in 9a5ffcb821.
We also needed to update these server public params.
2022-08-08 11:23:29 -05:00
Nora Trapp
26fea8a053 "Bump build to 5.50.0.5." (nightly-08-08-2022) 2022-08-08 04:00:47 -07:00
Nora Trapp
eddba94f51 Allow 4k video playback 2022-08-07 09:19:45 -07:00
Evan Hahn
266a4663e9 Add basic test for outgoing reaction message
This change should have no direct user impact.

`OWSOutgoingReactionMessage` was untested. This adds a basic test for
its `shouldBeSaved` method.

I think this is a useful change on its own, but may make future changes
easier, too.
2022-08-07 08:57:54 -05:00
Meher Kasam
22260f96c1 Improve VoiceOver support for the settings button
Co-Authored-By: Harry Sanabria <harry@signal.org>

See <https://github.com/signalapp/Signal-iOS/pull/5412>.
2022-08-07 08:23:15 -05:00
Nora Trapp
3d4eef5e04 "Bump build to 5.50.0.4." (nightly-08-07-2022) 2022-08-07 04:00:43 -07:00
Phil Larson
0c27a837bf
Fix path to SignalServiceKit-prefix.pch (#4717) 2022-08-06 13:41:58 -07:00
Nora Trapp
b44de0cc2c "Bump build to 5.50.0.3." (nightly-08-06-2022) 2022-08-06 04:01:00 -07:00
Nora Trapp
9a5ffcb821 Update to LibSignalClient 0.19.3 2022-08-05 15:01:21 -07:00
Evan Hahn
f5e098476f Update pods 2022-08-05 16:50:36 -05:00
Evan Hahn
6305cdc0e6
SignalServiceKit: no longer a separate pod
SignalServiceKit is currently a separate pod. This makes merges tedious
and error-prone. Ultimately, it slows us down. It might've made sense as
a standalone library before, but it's so tightly integrated now that it
isn't useful to have it be separate.

This changes that, and makes SignalServiceKit a "normal" target.

IMO, most of this change isn't that exciting—just a bunch of changes to
scaffolding. There's one slightly spicier change: our generated
`Acknowledgements.plist` is now a little more clever.

Co-authored-by: Max Radermacher <max@signal.org>
2022-08-05 16:14:15 -05: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
Igor Solomennikov
9f7850d4cd
Add camera + text controls to in-app camera 2022-08-05 08:07:44 -05:00
Evan Hahn
f8afc58b42 Prefer clang-format for sorting #import/#include
This should have no direct user impact.

We currently have two ways of sorting `#import` and `#include`
statements:

1. With our precommit script
2. With `clang-format` (via `git-clang-format`)

It *looks* like we aren't using `clang-format` (because of the
`SortIncludes: false` option in `.clang-format`) but we are,
which you can see by running `clang-format --dump-config`. As a separate
issue, it seems like we're not picking up the `clang-format`
configuration file (`clang-format --style=file:.clang-format
--dump-config` gives different results).

I've run into situations where the two of them "fight", so I think the
best thing to do is pick one. After some discussion, we decided to pick
`clang-format`.
2022-08-05 08:01:03 -05:00
Nora Trapp
0f232ce25b "Bump build to 5.50.0.2." (nightly-08-05-2022) 2022-08-05 04:00:39 -07:00
harry-signal
202c137ced
Propagate ThreadAssociatedData audioPlaybackRate down to CVComponentAudioAttachment
* Propagate ThreadAssociatedData audioPlaybackRate down to CVComponentAudioAttachment

* remove audioplaybackrate from component state; keep only on view state
2022-08-04 15:53:11 -07: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
Sasha Weiss
2cc4502fbf
Revert "Rotate call button icons when the phone is in landscape"
This reverts commit 54701df408.
2022-08-04 14:21:21 -07:00
Sasha Weiss
d1a455b1a2
Collapse join/cancel request events in the chat 2022-08-04 13:07:27 -07:00
Igor Solomennikov
26cfaf610c Fix last minute regression in ee2f39d3d1.
`setMode(animated:)` was calling `mode` setter which was calling `setMode(animated:)`
with `animated` being `false`.
2022-08-04 11:44:22 -07:00
Evan Hahn
adfda71472
Add remaining disappearing message time in detail view
This commit adds something new to the message detail view: the remaining
disappearing message time, if relevant.

For example, "Disappears: 6d 23h 58m 6s" (or something similar) will be
shown.

Builds off of 70eca7b99b and
846e802784.
2022-08-04 11:58:39 -05:00
Max Radermacher
df5437fb77
Remove "Linked Devices" item on linked devices
These aren't currently capable of modifying linked devices.
2022-08-04 08:39:59 -05:00
Nora Trapp
e844e0754a "Bump build to 5.50.0.1." (nightly-08-04-2022) 2022-08-04 04:00:45 -07:00
Igor Solomennikov
ee2f39d3d1
Fix an issue where buttons in text overlay toolbar could be too small.
The cause of this issue was that ImageEditorViewController's view was created
with zero dimensions. Those dimensions were then used to pre-calculate size
of the toolbar which ended up being incorrect.

The fix is to let UIKit create the root view and move everything we did in `loadView`
to `viewDidLoad`.
2022-08-03 17:59:53 -07:00
Igor Solomennikov
2a738fb459
Animate change in visibility of buttons at the top of in-app camera view.
When user starts video recording some buttons in the top part of the screen disappear and recording duration indicator appears. This commit adds simple fade-in/fade-out animation to those changes.
2022-08-03 16:50:56 -07:00
sashaweiss-signal
952df6ab44 "Bump build to 5.50.0.0." (nightly-08-03-2022) 2022-08-03 16:15:19 -07:00