Commit Graph

28726 Commits

Author SHA1 Message Date
Evan Hahn
088c3e5d85 Remove unused relay field from envelope proto 2022-07-29 11:35:55 -05:00
Max Radermacher
8d0f4c3535
Clean up old project settings
* Remove NEW_CV_ARCHITECTURE
* Remove unused search paths
2022-07-29 09:33:24 -07:00
Max Radermacher
f0f52ec0b0 Ignore packKey in isDefaultStickerPack
Sticker packs are uniquely identified by packId.
2022-07-29 08:37:55 -05:00
Nora Trapp
ae669976d5 "Bump build to 5.49.0.1." (nightly-07-29-2022) 2022-07-29 04:00:15 -07:00
Max Radermacher
03944b813d Remove tableViewStyle 2022-07-28 16:28:33 -07:00
Max Radermacher
6aee89fab1 Fix indentation in DefaultStickers 2022-07-28 13:29:03 -07:00
Evan Hahn
c988fdfee6 Convert OWSAnalyticsTests to Swift
This is a test-only change that shouldn't affect users.
2022-07-28 13:03:09 -05:00
Max Radermacher
2bec0dcc6f Fix Spanish App Store Connect language support
Use `es` for both `es-ES` and `es-MX`.
2022-07-28 09:43:50 -07:00
Evan Hahn
ecf53802fb "Bump build to 5.49.0.0." (nightly-07-28-2022) 2022-07-28 09:59:28 -05:00
Evan Hahn
bdf335720b Update translations 2022-07-28 08:17:20 -05:00
Max Radermacher
72d4736265 Remove iOS 11 disappearing contact workaround
We don’t support iOS 11, so this code is dead.
2022-07-28 08:05:50 -05:00
Nora Trapp
d9ff7bd6d9 "Bump build to 5.48.0.5." (nightly-07-28-2022) 2022-07-28 04:00:16 -07:00
Igor Solomennikov
cf003035a9
Animate transition from rounded image corners in Review to square in Draw tool. 2022-07-27 16:19:51 -07:00
Max Radermacher
a787b5596b Enable support for receiving gift badges 2022-07-27 15:32:10 -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
Evan Hahn
9bcb16162f Update release notes 2022-07-27 17:09:32 -05:00
Evan Hahn
7480e5c015 Change default for "notify when contact joined Signal"
Also reorders imports, per the precommit script.
2022-07-27 16:58:06 -05:00
Max Radermacher
e709fa7629
Sort/rename some gift badge files
* Sort src/UserInterface/.../Donations in Xcode
* Rename to BadgeGiftingThanksSheet
2022-07-27 14:50:11 -07:00
Max Radermacher
14cd7bd051
Handle already-redeemed gift badges 2022-07-27 14:04:42 -07:00
Evan Hahn
864cc2cfb0 Debug logs: remove GitHub button 2022-07-27 15:29:20 -05:00
Evan Hahn
28f65b5b1c Debug logs: hide email button if you can't send emails
_I recommend reviewing this with whitespace changes disabled._

If your device can't send emails (e.g., because you uninstalled
Mail.app), we shouldn't show the "Email Support" option, as it will show
an error.
2022-07-27 15:25:32 -05:00
Max Radermacher
def8129ac8
Handle expired gift badges
- Show an error when trying to redeem them
- Show an error if your last remaining gift badge expires
2022-07-27 13:15:58 -07:00
Evan Hahn
bac5b0555b Revert "CI: make bigger check depend on lighter check"
This reverts commit 1e2422b6ba, because it
caused CI to be *entirely* skipped in some cases.
2022-07-27 15:04:23 -05:00
Evan Hahn
460f1d38c5 Log extended result code when db corruption happens
If we detect database corruption, we should log the [SQLite extended
result code][0], as it may offer insights.

This change also funnels the error handling through a single code path.

[0]: https://www.sqlite.org/rescode.html#extended_result_code_list
2022-07-27 13:44:11 -05:00
Evan Hahn
9d8e6b78ea Remove generic from flagDatabaseCorruptionIfNecessary
It is unnecessary, as far as I can tell.
2022-07-27 13:44:11 -05:00
Evan Hahn
5db672b039 Move checkSomeDiskSpaceAvailable to Swift
This change should have no user impact.
2022-07-27 12:17:00 -05:00
Evan Hahn
8a13595143 Prompt for diagnostics if db corruption happens
Previously, users who experienced database corruption would be asked to
submit debug logs. (Special builds had additional options which were not
generally available, so some of this code was already written.)

Now, if they choose to submit debug logs, they will also be asked to
submit a "database diagnostic" before the logs are submitted. This runs
and logs the results of `PRAGMA cipher_provider`, `PRAGMA
cipher_integrity_check`, and whether `PRAGMA quick_check` succeeds. If
they choose to skip the diagnostic, we still submit debug logs.

Other launch failures, such as "out of disk space", do not run these
diagnostics, as they're irrelevant.
2022-07-27 11:57:16 -05:00
Nora Trapp
896a12e891 "Bump build to 5.48.0.4." (nightly-07-27-2022) 2022-07-27 04:00:13 -07:00
Max Radermacher
9105b0655d Fix precommit.py output for keyword matches
We were passing `bytes` to `print(...)`, which outputs an escaped
representation. We should pass a string, as we do elsewhere.
2022-07-27 05:31:51 -05:00
Max Radermacher
38627d24a6
Tweak gift wrap animation
- Add haptic feedback
- Rotate the bow
- Rotate the bubble
- Use a more natural animation curve
2022-07-26 17:20:41 -07:00
Max Radermacher
2bd247b0d9
Fix measureLabel… for attributed strings
The comment indicated that the existing fonts for particular subranges
should not be overwritten. However, the existing font was being
overwritten, which resulted in the measured size being too small.

The fix is to apply the default font only to ranges which don’t already
specify their own font (the intended behavior according to the comment).
2022-07-26 17:19:20 -07:00
sashaweiss-signal
bf8e58c316 Disable the multiple_closures_with_trailing_closure rule 2022-07-26 19:15:52 -05:00
Max Radermacher
114a163048 "Bump build to 5.48.0.3." (Internal) 2022-07-26 14:17:38 -07:00
Igor Solomennikov
6548e374e2
Improved crop tool in media editor.
Re-do all crop view controller with pure Auto Layout which allowed to animate layout changes and transitions between UI states.

Image rotation using two fingers was removed to match native Photos app: tilt control UI at the bottom allows much more precise rotation and two finger gesture is now purely for zooming and panning.
2022-07-26 14:11:03 -07:00
Evan Hahn
4f553cad15 Update pods 2022-07-26 13:19:16 -05:00
Max Radermacher
cc0cd24f88 Improve validation for incoming gift messages
- Drop gift messages sent to groups.
- Drop gift messages if the receipt credential presentation isn’t valid.

- Allow any level in a gift message, for future compatibility.
2022-07-26 09:28:48 -07:00
Max Radermacher
bde3f174f3
Fix crash when disabling PIN
This broke in 7bef47f356.

The old code cared that is was running on a **specific** background
queue, whereas the intent of the code appears to be “this is slow—don’t
run it on the main thread”.

I believe this new approach is also better for certain pathological edge
cases (though those edge cases would almost certainly never happen with
the global concurrent queues). In the following example, the first check
(old logic) passes, but the second check (new logic) fails.

```
DispatchQueue.main.async {
    DispatchQueue.global().sync {
        dispatchPrecondition(condition: .onQueue(DispatchQueue.global()))
        dispatchPrecondition(condition: .notOnQueue(DispatchQueue.main))
    }
}
```
2022-07-26 09:16:19 -07:00
Evan Hahn
4bf9ee4ace
Fix check for sticker pack URL
This commit:

- Adds unit tests
- Checks for auth and port in the URL
2022-07-26 10:38:34 -05:00
Max Radermacher
4412833edf
Add checkmark for already-redeemed gifts 2022-07-26 09:18:52 -05:00
Nora Trapp
607ad4c3cd "Bump build to 5.48.0.2." (nightly-07-26-2022) 2022-07-26 04:00:25 -07:00
harry-signal
e60bd4b614
Allow emoji search to match text anywhere in emoji names 2022-07-25 19:01:14 -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
Evan Hahn
4aa0c967a2
Rewrite launch failure action sheet in Swift
This should have no user impact.

This splits off part of `showUIForLaunchFailure` and rewrites in Swift.
Specifically, it moves the code that creates and shows the action sheet.

I think this is a useful change on its own, but may make future planned
changes easier.

Some minor notes:

- It may be more useful to compare the two files, rather than looking at
  the diff
- I had to move the `LaunchFailure` enum and `NSStringForLaunchFailure`
  around, too
- A few strings have no localization comments, which I maintained
  (rather than adding comments as part of this work)
2022-07-25 17:02:04 -05:00
Max Radermacher
67a96cfc55
Fix a few issues with badge expiration body text
The Boost case used `String(format:...)` even though there aren’t any
string replacements in the body text. We should avoid formatting strings
that don’t have format specifiers.

There was also a typo in the localized string key.

This also separates the monthly donation call to action string so that
it can be reused for gift badges.
2022-07-25 08:55:32 -07:00
Max Radermacher
455adf2119
Move gift badge conversation logic to its own file 2022-07-25 08:54:32 -07:00
Evan Hahn
9bf84b4f83
Update to RingRTC v2.20.12
Co-authored-by: Jim Gustafson <jim@signal.org>
2022-07-25 10:32:29 -05:00
Max Radermacher
778952792e Show an error when failing to redeem a gift 2022-07-25 08:31:32 -07:00
Max Radermacher
a054b44f4e Handle large font sizes for gift badge bubbles 2022-07-25 09:05:24 -05:00
Evan Hahn
30315a9c63
Check if strings are up to date in CI
A few of us (myself included) have forgotten to run `auto-genstrings`
and they've gotten out of date on the main branch.

This adds a simple CI job to catch these.
2022-07-25 08:17:41 -05:00
Nora Trapp
cc6d107a0d "Bump build to 5.48.0.1." (nightly-07-23-2022) 2022-07-23 04:00:33 -07:00