Commit Graph

28412 Commits

Author SHA1 Message Date
Evan Hahn
03dc820b24 Update release notes 2022-06-08 14:37:58 -05:00
Evan Hahn
068a5cc7f2 Run auto-genstrings (because I forgot)
I added this string in 35c8bb7c9c, but
didn't run `auto-genstrings` properly.
2022-06-08 15:30:52 +00:00
Nora Trapp
a83c91ab60 "Bump build to 5.41.0.9." (nightly-06-08-2022) 2022-06-08 04:00:44 -07:00
Evan Hahn
e679707038 Fix SwiftLint shorthand_operator violations
The gist is:

```diff
-foo = foo + 1
+foo += 1
```

Most of the violations were in generated files, so I changed and re-ran the generator.

A few of these violations required implementing some new methods, which I added tests for.

See [the docs for this rule][0].

[0]: https://realm.github.io/SwiftLint/shorthand_operator.html
2022-06-07 14:51:57 +00:00
Evan Hahn
35c8bb7c9c Skeleton UI for sending gift badges
Co-authored-by: Max Radermacher <max@signal.org>
Co-authored-by: igor-signal <98181527+igor-signal@users.noreply.github.com>

The goal of this commit is to build a "skeleton" UI for sending gift
badges.

It's totally possible that I haven't anticipated future changes
correctly, but my goal was to have each future change be a separate,
unrelated commit. For example, we need some logic to determine whether a
recipient has the "giftBadges" capability. That can be done separately
from the commit to send the badge message.

I also added "TODO (GB)" in these spots.

As with many other badge gifting tasks, this is behind a disabled
feature flag, so it should have no user impact.
2022-06-07 14:51:47 +00:00
Nora Trapp
0d0f1ed5df "Bump build to 5.41.0.8." (nightly-06-07-2022) 2022-06-07 04:00:40 -07:00
Evan Hahn
41c4be6b71 Remove useless override
This override stopped being relevant in
c4f967ef46, as far as I can tell.
2022-06-06 14:45:54 +00:00
igor-signal
333f4d18b0
Delete unused play icons
They're not used anywhere.
2022-06-06 14:07:24 +00: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
Evan Hahn
5dbc030359 Fix violations of SwiftLint's closure_parameter_position rule
This commit should just change whitespace.

See [the docs for this rule][0].

[0]: https://realm.github.io/SwiftLint/closure_parameter_position.html
2022-06-06 13:58:23 +00:00
Nora Trapp
81ff2ab419 "Bump build to 5.41.0.7." (nightly-06-04-2022) 2022-06-04 04:00:30 -07:00
Jordan Rose
a97560ac38 Allow OWSOutgoingResendRequest/Response on the Note to Self thread
Otherwise, local threads with linked devices can never be reset via
DecryptionErrorMessages as other threads are.
2022-06-03 16:34:49 -07:00
Jordan Rose
98bf0aafb9 Allow quotes with attachments to be missing thumbnails
And fix the presented content type and filename for the attachments in
a quote (it should be the type and filename of the original
attachment, not the thumbnail).
2022-06-03 16:34:25 -07:00
Evan Hahn
e40f162a1e Fix compiler_protocol_init lint rule violation
This fixes our one violation of [SwiftLint's `compiler_protocol_init` rule][0].

[0]: https://realm.github.io/SwiftLint/compiler_protocol_init.html
2022-06-03 19:09:45 +00:00
Evan Hahn
c41867ab7a Fix doc comment in Emoji
The `Emoji` enum had an [orphaned doc comment][0], which SwiftLint reported.

This updates that file's generator to fix the error. (SwiftLint is disabled for most of the file, though—a bit unfortunate, but probably correct for generated files.)

[0]: https://realm.github.io/SwiftLint/orphaned_doc_comment.html
2022-06-03 18:30:36 +00:00
Evan Hahn
621736897d Fix minor issues with colon spacing
[SwiftLint's `colon` rule][0] says the following:

> Colons should be next to the identifier when specifying a type and next to the key in dictionary literals.

This fixes a few violations of that rule.

[0]: https://realm.github.io/SwiftLint/colon.html
2022-06-03 18:23:13 +00:00
Evan Hahn
24ca5abf9c Remove unneeded breaks
This fixes our violations of [the SwiftLint `unneeded_break_in_switch`
rule][0].

[0]: https://realm.github.io/SwiftLint/unneeded_break_in_switch.html
2022-06-03 17:52:28 +00:00
Evan Hahn
df9d1af923 Fix file header with duplicate license and import 2022-06-03 17:49:28 +00:00
Jordan Rose
1c82df3bc9 Protos: Remove unused fields from DataMessage.Quote
These were never added to other clients, so we shouldn't be using
them.
2022-06-03 10:34:21 -07:00
Nora Trapp
02dcf6282e "Bump build to 5.41.0.6." (nightly-06-03-2022) 2022-06-03 04:00:36 -07:00
Jim Gustafson
12a4b687a2 Update to RingRTC v2.20.8 2022-06-02 20:40:46 -07:00
Jordan Rose
91f4615d5d Avoid multiple ThemeDidChange notifications
We get notified of the system theme changing through OWSWindow, but
there's more than one window in the app.
2022-06-02 14:01:42 -07:00
Nora Trapp
b29dc8b65c "Bump build to 5.41.0.5." (nightly-06-01-2022) 2022-06-01 04:00:21 -07:00
Jordan Rose
4e05dfde5c Don't generate a new PushChallenge for every failed operation
We sometimes attempt to do N operations at once where up to N of them
end up getting caught by the rate limiter. This should *not* turn into
N push challenges, or else we'll get rate limited for that too.
2022-05-31 18:05:22 -07:00
Max Radermacher
c15df6b507
Persist Gift Badges on incoming messages 2022-05-31 11:46:33 -07:00
Jordan Rose
ce9da716e6
MediaGallery: Correctly respond to external deletion
This removes DatabaseChanges.deletedAttachmentIds and replaces it with
a notification that carries more information: the attachment's thread
and original message received-at timestamp in addition to the unique
ID. With this information, we can correctly refresh the parts of
MediaGallery that may be affected by the deletion. (The previous
implementation was correct for the original version of MediaGallery,
but not the rewritten version I implemented last year. My apologies to
all users seeing crashes here!)

In the new model, deletions from outside of MediaGallery's control 
result in reloads of the sections containing the items in question.
This may result in refetching other media that was previously loaded,
but avoids the issue in the previous implementation where existing
loaded items would now be at the wrong offsets.
2022-05-31 10:55:31 -07:00
Nora Trapp
015770187a "Bump build to 5.41.0.4." (nightly-05-28-2022) 2022-05-28 04:01:19 -07:00
Jordan Rose
f7444d960e PhotoCapture: stop the AVCaptureSession on its dedicated queue
AVCaptureSession isn't thread-safe to reconfigure, and that includes
stopping a current session. Everything else we did with the session
was on a dedicated queue, but the call to stop it was on the main
queue. Fix that by exposing the existing promise-based stop method to
the CaptureOutput helper.
2022-05-27 16:56:28 -07:00
Max Radermacher
0577775f2f
Parse GiftBadges on incoming messages
(They are still dropped, regardless of whether or not they’re valid.)
2022-05-27 15:22:19 -07:00
Evan Hahn
0cee2789b9 Update "pending changes action sheet" localization metadata
_I recommend reviewing this with whitespace changes disabled._

This is a minor change; it have no direct user impact.

We have a "pending changes action sheet" which shows up to warn users
that their changes may not be saved. The localization key and comment
indicated that its strings were only for groups, but that's not
true—it's used for lots of things, such as editing your profile or
updating a group's metadata.
2022-05-27 21:54:42 +00:00
Evan Hahn
fa099f6e96 Fix retain cycles with ApplePayButton usage
I introduced retain cycles in 1a253bbf86.
This fixes them!
2022-05-27 21:41:14 +00:00
Max Radermacher
fa99be971d
Add GiftBadge to SignalService.proto 2022-05-27 13:32:09 -07:00
Max Radermacher
724ea55aa7 Add giftBadge property to messages
Also run `Scripts/sds_codegen/sds_codegen.sh`
2022-05-27 12:31:24 -07:00
Evan Hahn
1a253bbf86 Create ApplePayButton view
The app has two Apple Pay buttons that look identical, and we're about
to add a third. This creates `ApplePayButton`, a reusable view, to
reduce some code duplication.

Tested:

- Subscribing in staging
- Boosting in staging
- Switching between light and dark modes
2022-05-27 16:32:30 +00:00
Jim Gustafson
d78c4ad553 Update to RingRTC v2.20.7 2022-05-27 09:39:24 -05:00
Nora Trapp
36f9d2c119 "Bump build to 5.41.0.3." (nightly-05-27-2022) 2022-05-27 04:01:05 -07:00
Ehren Kret
d53c58aebf logTag needs to be explicitly called in this context 2022-05-27 00:13:17 -05:00
Ehren Kret
2c32710c6d Remove unnecessary try 2022-05-27 00:13:17 -05:00
Ehren Kret
6a2631cd3d debugDescription on Optional doesn't return Optional 2022-05-27 00:13:17 -05:00
Ehren Kret
9b6526545e Remove unused variables 2022-05-27 00:13:17 -05:00
Max Radermacher
011d44f91c
Fix typo in pendingWasTransferredClearKey 2022-05-26 21:06:56 -07:00
Max Radermacher
e86b7064f6 Commit initial migrations in a single transaction
Each GRDB migration runs in a separate transaction, so it’s possible
only some will be completed. In normal cases, this is fine. However, the
initial migration creates the latest version of the schema. As a result,
we must ensure all incremental migrations are atomically marked as
complete so that we don’t try to run them again after an app crash.
2022-05-26 20:19:13 -07:00
Max Radermacher
da08463ade Add duration column to model_ProfileBadgeTable 2022-05-26 16:14:40 -07:00
Jordan Rose
534035fa80 Check whether we actually get ping responses from our websockets
In at least one instance (iOS 14.6), we've seen pings go out that
never get responses and never report timeouts. Check for that
explicitly to make sure we cycle the socket if we're not getting ping
responses.
2022-05-26 16:01:43 -07:00
Max Radermacher
d77e001b0d
Fix a few minor issues with atomics
* Remove `@escaping` from Atomic `map()` methods

* Acquire the lock when encoding an `AtomicValue`
2022-05-26 15:34:51 -07:00
Sasha Weiss (Signal)
0a089cb63c
Make "Keep Muted Chats Archived" option available publicly 2022-05-26 10:44:43 -04:00
Nora Trapp
e0e1cae03a "Bump build to 5.41.0.2." (nightly-05-26-2022) 2022-05-26 04:01:02 -07:00
Nora Trapp
8a5d965d57 "Bump build to 5.41.0.1." (Internal) 2022-05-26 00:01:49 -07:00
Nora Trapp
8995476473 Fix group story reply breakage 2022-05-26 00:01:38 -07:00
Jordan Rose
d80b4c61f2 "Bump build to 5.41.0.0." (Internal) 2022-05-25 16:49:37 -07:00