Commit Graph

28820 Commits

Author SHA1 Message Date
george-signal
bb33925499
Persist quoted replies
When you compose reply to a message but do not
send it, we would persist the text you entered but
would lose the quoted message to which you were
replying.

This commit adds support for persisting that
information.

ThreadReplyInfo is a new class that uses the
key-value store to associate a single optional
reference to a message with each thread.

The following behaviors are nw:
* When you enter the CVC the input toolbar is
  updated to have the quoted message.
* When you exit the CVC the quoted message is
  saved.
* When a thread is deleted, the quoted message is
  deleted.
2022-08-11 13:44:50 -07:00
Nora Trapp
0448e9e06a Fix sender-key retry behavior for stories 2022-08-11 13:21:38 -07:00
Nora Trapp
9872111cf6 PR Feedback 2022-08-11 13:11:17 -07:00
Nora Trapp
02cd514370 Cleanup page view controller's access to multiple contexts 2022-08-11 13:08:50 -07:00
Nora Trapp
d12af96dde Dismiss the story viewer after viewing all unviewed contexts 2022-08-11 13:08:50 -07:00
Nora Trapp
bfa08e001e Automatically download subsequent stories when in the story viewer 2022-08-11 13:08:50 -07:00
Nora Trapp
97f1483c03 Implement auto-download logic for stories 2022-08-11 13:08:50 -07:00
Nora Trapp
0d310bc13b Update attachment download design 2022-08-11 13:08:50 -07:00
Nora Trapp
794630f678 Update to Lottie 3.4.1 2022-08-11 13:08:50 -07:00
Nora Trapp
2e002be110 Don't render download state on story thumbnails 2022-08-11 13:08:50 -07:00
harry-signal
93342479d9
Only observe volume buttons while stories are muted
* only observe volume buttons while stories are muted

* make easier to read
2022-08-11 12:36:59 -07:00
harry-signal
b5d9f61a96
fix story edge pan for notched devices 2022-08-11 09:58:41 -07:00
Nora Trapp
046ba79d1b "Bump build to 5.50.0.10." (nightly-08-11-2022) 2022-08-11 04:00:57 -07:00
Nora Trapp
12d725ea63 Combine reloadStoryMessage and updateViewers methods 2022-08-10 20:17:44 -07:00
Nora Trapp
66f23384c7 Show icons next to views and replies buttons 2022-08-10 20:17:44 -07:00
Nora Trapp
20e8b69723 Render views count on replies & views button where appropriate 2022-08-10 20:17:44 -07:00
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