_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.
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
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.
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).
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.
- 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.
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))
}
}
```
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.
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)
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.
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.