Commit Graph

28553 Commits

Author SHA1 Message Date
Igor Solomennikov
2fd17eda12 Animate controls on the crop screens in and out.
This change also fixes a bug when bottom buttons in the crop screen
were not visible. That happened because ImageEditorBottomBar by default
had its controls hidden (with the intent that they are animated in once
view controller's view is visible). That was a poor design choice on my
end and is fixed in this commit.
2022-07-07 08:37:34 -07:00
Nora Trapp
3e96e21ccb "Bump build to 5.46.0.1." (nightly-07-07-2022) 2022-07-07 04:00:21 -07:00
Igor Solomennikov
7f4a5f3f7b Merge branch igor/media-editor-updates. 2022-07-06 14:54:26 -07:00
george-signal
a202f6204e
Remove GRDB's memory management. (#4521)
This disgusting hack removes GRDB's notification
center observers, which prevents it from calling
`DatabasePool.releaseMemory()`.

`releaseMemory` is harmful because it places all
future reads behind a dispatch barrier. The effect
is that even very short reads block on any db
reads that precede the barrier. Some of those can
be very slow, such as orphan message handling.

The practical effect of this barrier is that the
main thread gets stuck on what should be a very
quick operation, such as loading your own avatar
data. iOS can kill the app with 8badf00d.

This change is a temporary workaround. A proper
solution has been added to a PR that I sent to
GRDB, which you can see here:

https://github.com/groue/GRDB.swift/pull/1253

Once that is accepted upstream we should update
GRDB and revert this commit.

This change should fix IOS-2474 and doubtless many
other issues.
2022-07-06 13:27:13 -07:00
Evan Hahn
cb387bc031 Explicitly require Xcode 13.2
Instead of it being a minimum version.
2022-07-06 14:59:33 -05:00
Evan Hahn
80369c8cdd Update to macOS 12 on CI
See [the documentation][0] for this macOS version.

[0]: https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
2022-07-06 14:59:33 -05:00
Max Radermacher
10469e29f5 Remove unused descriptionFor… methods
This are unused since things got refactored in ec66f3b21e. It
appears as though `contentDescription` is just called directly rather
than calling these wrappers.
2022-07-06 12:52:58 -07:00
Max Radermacher
09fd1a39d2
Send viewed receipts when redeeming gift badges 2022-07-06 12:39:41 -07:00
sashaweiss-signal
f714d2f11e "Bump build to 5.46.0.0." (nightly-07-06-2022) 2022-07-06 10:50:36 -07:00
sashaweiss-signal
2a0ae59ce8 Update translations 2022-07-06 10:49:35 -07:00
sashaweiss-signal
6761afdcd8 Update release notes 2022-07-06 10:43:29 -07:00
Max Radermacher
1cc8347dd0 Add contentTypeWithThumbnail
This avoids repeating the same code in two places.
2022-07-06 11:40:49 -05:00
Nora Trapp
55770c47f9 "Bump build to 5.45.0.3." (nightly-07-06-2022) 2022-07-06 04:00:31 -07:00
Max Radermacher
0f582e5171 Remove unused OWSQuotedMessageView method
This is unused. Remove it & all the resulting unused code.
2022-07-05 15:29:58 -07:00
Jim Gustafson
fd4d030d6e Explicitly drop calls filtered by Blocked Contact
This block is the system-level block for the contact. Extends the previous
work dropping calls for Do Not Disturb, where RingRTC is prevented from
sending a Hangup message, which allows other devices to continue ringing.
2022-07-05 15:12:58 -07:00
Evan Hahn
d7b42d9fcc Snooze donation megaphone when sending a gift badge
This snoozes the megaphone as soon as we *might* charge your card, even
if it ultimately fails. Even if that job fails, you probably already
know you can donate.
2022-07-05 13:24:32 -05:00
Evan Hahn
9123074442 Update Pods 2022-07-05 12:24:35 -05:00
Evan Hahn
10254f8486 Remove "intermediates" flag from SDS codegen scripts
A couple of codegen scripts had an `--intermediates` flag. While I was
playing around with this (fixing something else), I noticed that these
flags don't work and cause a crash.

Instead of fixing those bugs, I thought it'd be better to just delete
this flag because I don't think anybody uses it.

Tested this by running `make` in the `sds_codegen/` directory, with
success.
2022-07-05 11:52:00 -05:00
Evan Hahn
9932c16428 Update Pods 2022-07-05 10:46:44 -05:00
Jim Gustafson
6ed5529ad0 Update to RingRTC v2.20.11 2022-07-05 10:41:41 -05:00
Nora Trapp
221f07c55c "Bump build to 5.45.0.2." (nightly-07-02-2022) 2022-07-02 04:01:03 -07:00
Max Radermacher
4ad8230f3d Snooze subscription megaphone after redeeming gift 2022-07-01 17:10:59 -05:00
Evan Hahn
f5556d1857
Use durable job for sending badge gifts
Previously, sending a gift badge was not a durable operation, which
meant that crashes/failures could cause users to have their payment
methods charged without actually sending the badge.

Now, the flow is split up into two steps: non-durable parts before the
charge is attempted, and durable parts afterward.

The high-level flow is:

1. Prepare the payment, which involves a couple of repeatable network
   requests.
2. Enqueue a job with the prepared payment, that:
   1. Charges the payment method (idempotently)
   2. Requests a receipt credential (idempotently)
   3. Enqueues a gift message, and optionally a text message
3. When the job completes, open the conversation in the UI.
2022-07-01 17:10:31 -05:00
Max Radermacher
f7f66d6436
Add support for redeeming gift badges 2022-07-01 14:07:24 -07:00
Max Radermacher
043daeb734 Fix block & report spam toast position
The `bottomBar.height` value includes the layout margin at the bottom,
and the `presentToast` method will count this as well, resulting in the
view being placed too high on devices with a notch/home indicator.
2022-07-01 09:50:12 -07:00
Max Radermacher
5a0719c8cc Fix notification comment typo; avoid forced unwrap 2022-07-01 09:49:26 -07:00
Nora Trapp
2456dde560 "Bump build to 5.45.0.1." (nightly-07-01-2022) 2022-07-01 04:01:00 -07:00
Max Radermacher
4803bc2771 Move header file closer to its implementation file 2022-06-30 15:02:52 -07:00
Max Radermacher
cf2fa3739f Update copy on the first gifting flow screen 2022-06-30 14:18:42 -07:00
george-signal
ab14034d69
Better UX for broken videos. (#4500)
* Change the play button to a crossed out triangle
  if a video is not playable.
* Show a toast if you tap it anyway.
2022-06-30 10:59:34 -07:00
Max Radermacher
f6eee78975 Capitalize “One-time Donation” button text 2022-06-30 10:55:14 -07:00
Evan Hahn
62c8685e87 "Bump build to 5.45.0.0." (nightly-06-30-2022) 2022-06-30 12:28:12 -05:00
Evan Hahn
840ce72be5 Update translations 2022-06-30 12:26:21 -05:00
Max Radermacher
7bef47f356
Use serial queue for SDSTransactable.asyncWrite
The database writes are ultimately serial, so there’s little benefit to
scheduling each of these on its own queue. If another slow-ish write is
already happening, there’s a chance that we may see thread explosion,
with many threads waiting to write to the database.
2022-06-30 08:38:54 -07:00
Nora Trapp
7cd51722c5 "Bump build to 5.44.0.7." (nightly-06-30-2022) 2022-06-30 04:01:00 -07:00
Evan Hahn
6afa158bff Remove unused variable from gifting view controller
I added this in 35c8bb7c9c but it was
never used—I think it was a false start I never removed.
2022-06-29 16:39:59 -05:00
Evan Hahn
0007e9895d Update "one-time donation" bar on badge gift screen 2022-06-29 16:22:20 -05:00
Evan Hahn
18da3305c6 Add tests for SignalMe.isPossibleUrl
No source code changes here, just adding a test.
2022-06-29 15:02:12 -05:00
Max Radermacher
46cacb177e Ignore peek call errors in staging 2022-06-29 14:32:19 -05:00
Sasha Weiss (Signal)
86d9b8ea0a
Remove args always passed as nil that were later unused anyway 2022-06-29 09:19:02 -07:00
Nora Trapp
417884c77a "Bump build to 5.44.0.6." (nightly-06-29-2022) 2022-06-29 04:00:52 -07:00
Max Radermacher
807ea6e034
Simplify …BadgeIds.contains(_:)
There’s no need to use `allCases` -- we can accomplish the same thing
using the automatically-provided `init(rawValue:)` initializer.
2022-06-28 17:15:14 -07:00
Nora Trapp
b85638377e "Bump build to 5.44.0.5." (nightly-06-28-2022) 2022-06-28 04:00:49 -07:00
Max Radermacher
c9fcee9cc3 Clean up incoming reaction processing 2022-06-27 11:10:26 -07:00
Max Radermacher
4976462238 Add missing fields to sync message descriptions 2022-06-27 09:03:47 -07:00
Max Radermacher
11d08f101f
Fix crash when deleting messages from the future
The subtraction operation produces a negative value and causes a crash
in Swift. Allow deleting these messages to match Android’s behavior.
2022-06-27 09:02:04 -07:00
Nora Trapp
fe8459df51 "Bump build to 5.44.0.4." (nightly-06-26-2022) 2022-06-26 04:00:43 -07:00
Evan Hahn
54bcc455b6 Delay gift badge capability check until send time
Previously, we checked capabilities on the "choose gift recipient"
screen. If you had stale profile data, people might _seem_ incapable,
but a later profile refresh would render them capable. We could have
solved this in a few ways, but I matched Android: check the capability
right before sending.

The pseudocode used to be something like this:

```python
def allowed_candidates(all_recipients):
  for recipient in all_recipients:
    if recipient.is_locally_capable:
      yield recipient
```

The pseudocode is now something like this:

```python
def press_donate_button():
  if recipient.is_locally_capable:
    is_capable = True
  else:
    fetch_profile(recipient)
    is_capable = recipient.is_locally_capable

  if is_capable:
    authorize_apple_pay_and_send_badge()
```
2022-06-25 14:43:40 -05:00
Nora Trapp
addc2fa4d4 "Bump build to 5.44.0.3." (nightly-06-25-2022) 2022-06-25 04:00:39 -07:00
Max Radermacher
a8e25ac3b2 Ignore checkpointing errors on launch
These aren’t fatal, so they shouldn’t present the “failed to launch UI”
to the user. This restores the behavior from before 4e535fa7ef.
2022-06-24 22:27:01 -05:00