Commit Graph

28671 Commits

Author SHA1 Message Date
Max Radermacher
8cd4cb07e0 Temporarily disable gift receiving in beta 2022-07-21 13:54:34 -07:00
Max Radermacher
b7ed5ae6ae Update SignalCoreKit 2022-07-21 10:25:44 -07:00
Igor Solomennikov
2dcda75b8f
Add VoiceOver support to in-app camera.
* custom behavior for round capture button to match iOS Camera app.
* custom behavior for zoom control to match iOS Camera app.
* proper descriptions for other elements.
2022-07-21 09:59:53 -07:00
Igor Solomennikov
77d1f2b5ab
Fix regression caused OWSTableSheetViewController not use all available height.
OWSTableViewSheetViewController is inherited from InteractiveSheetViewController
and has additional size calculation logic that updates current sheet size based
on UITableView's contentSize. However, there's also a "max height" constraint
that also needs updating  - this commits adds that.
2022-07-21 09:43:30 -07:00
igor-signal
86e2c2c8e5
Add animations to controls in the in-app camera.
Also do some refactoring of controls to allow future changes.
2022-07-21 09:28:30 -07:00
Nora Trapp
32efe4cedc "Bump build to 5.47.0.6." (nightly-07-21-2022) 2022-07-21 04:00:43 -07:00
Max Radermacher
252a53f042 Show animation while badge is loading 2022-07-20 22:02:43 -07:00
Max Radermacher
754e7c59fe
Fix fr/nb App Store Connect language support
- Use “nb” instead of “no” for Norwegian
- Use “fr” for both “fr-FR” and “fr-CA”

Also: Remove redundant `tx pull` for App Store metadata. The next
request forces a fetch of all the supported languages, so the first
fetch isn’t necessary.
2022-07-20 22:02:15 -07:00
Max Radermacher
3e5a3ea501
Update SignalCoreKit in Podfile.lock
Also: Update DisplayableText tests for new Zalgo logic
2022-07-20 21:59:58 -07:00
George Nachman
1d93cb3f32 Update SignalCoreKit 2022-07-20 14:37:38 -07:00
Evan Hahn
d310bf3c83 Remove call for public translations 2022-07-20 10:54:32 -05:00
Max Radermacher
44a6cfb199 Localize "Gift Badge" in the conversation view 2022-07-20 09:25:14 -05:00
Evan Hahn
00c8a5dfc4
Remove unused group invite link remote config flag
_I recommend reviewing this with whitespace changes disabled._

`RemoteConfig.groupsV2InviteLinks` has been fully enabled for awhile
now. This removes it, and everything that depended on it. Even let us
remove a couple of strings!
2022-07-20 08:59:53 -05:00
Evan Hahn
028d97c2cb
Use remote config for gift badges
This removes `FeatureFlags.giftBadgeReceiving` and
`FeatureFlags.giftBadgeSending`, replacing them with
`RemoteConfig.canReceiveGiftBadges` and
`RemoteConfig.canSendGiftBadges`.
2022-07-20 08:50:58 -05:00
Evan Hahn
1e2422b6ba CI: make bigger check depend on lighter check
This will save Signal some money if lint fails (which is fairly common)
and add ~30 seconds if lint succeeds.
2022-07-20 08:47:35 -05:00
Nora Trapp
f6957b3901 "Bump build to 5.47.0.5." (nightly-07-20-2022) 2022-07-20 04:00:24 -07:00
igor-signal
3ad6c41a94
Fix "-0" could be displayed as current tilt (rotation) angle in Crop media view. (#4613) 2022-07-19 21:23:02 -07:00
Igor Solomennikov
75ef7d1482 Play haptic feedback when rotation control in Crop view crosses a mark. 2022-07-19 15:47:25 -07:00
Max Radermacher
a7ed8a2847 Cache gift badge endpoint for conversation view
If there are multiple requests, they’ll be merged into one. If a request
has already succeeded, it will be used until the app relaunches. If a
request fails, the next caller will kick off a new request.
2022-07-19 15:01:36 -07:00
Max Radermacher
6354976202 Rename CVComponentGiftBadge.TimeState → ViewState
It will be used to store more than just the time remaining.
2022-07-19 15:00:02 -07:00
Evan Hahn
c0c4a85d48 Fix InteractiveSheetViewController scrolling bug
Short story: we now properly decide whether the sheet is being resized
or scrolled, fixing the bug.

Long story:

Some users report that they can't scroll the forward message sheet
([example report 1][1], [example report 2][2]). This wasn't just a bug
with the forwarding sheet. It was a bug with all subclasses of
`InteractiveSheetViewController`.

When you gesture on the sheet, there are effectively two modes: "resize
the sheet mode", and "scroll the contents" mode. (See
`beginInteractiveTransitionIfNecessary` for a boolean that expresses
this.) The logic is effectively this:

    def getMode():
      if sheetHeight < maximumSheetHeight:
        # Note: there are some other ways to get this mode, e.g. by
        # grabbing the handle. But those aren't relevant for this bug.
        return "resize the sheet mode"
      else:
        return "scroll the contents mode"

Unfortunately, there was a bug in how we computed the max sheet height
if that height was larger than the height of the screen (e.g., in
landscape mode or on a shorter device). That bad height caused you to
get into "resize the sheet mode" incorrectly. This fixes that, and does
a few other cleanups.

[1]: https://github.com/signalapp/Signal-iOS/issues/5366
[2]: https://community.signalusers.org/t/beta-feedback-for-the-upcoming-ios-5-44-release/45401/3

Co-Authored-By: Igor Solomennikov <igor@signal.org>
2022-07-19 16:54:57 -05:00
Max Radermacher
23b7c38727 Report subscription errors for .unpaid & .pastDue 2022-07-19 14:54:15 -07:00
Evan Hahn
f3c5ad92b1 Remove unused isGroupInviteLink method 2022-07-19 16:48:45 -05:00
Evan Hahn
916e91e590 Remove some unused strings
All I did was run the `auto-genstrings` script. It looks like these were
removed in 486067130c but I forgot to run
it then.
2022-07-19 15:25:01 -05:00
Max Radermacher
18de6bf70a
Fix behavior when redeeming a second gift badge 2022-07-19 11:51:08 -07:00
Max Radermacher
e4e21cab8c Fix outage detector error when there’s no network
If DNS resolution fails, then it’s expected that there won’t be any
addresses. Fail gracefully in this case.

If DNS resolution succeeds and provides a non-nil but empty list of
addresses, report an error. This shouldn’t happen.
2022-07-19 11:48:58 -07:00
Max Radermacher
29507343ff Remove unused subscription & badge code 2022-07-19 09:45:01 -07:00
Max Radermacher
0fc1d064d8 Don’t fetch avatar when checking current badges 2022-07-19 09:44:46 -07:00
Max Radermacher
fc79e96432 Make MessageDetailVC.buildRenderItem() private
It’s not used externally, and the code is easier to reason about if you
only need to look at a single file.
2022-07-19 09:42:39 -07:00
Nora Trapp
abe8a1d9f6 "Bump build to 5.47.0.4." (nightly-07-19-2022) 2022-07-19 04:00:21 -07:00
Sasha Weiss
543d29a13b
Include banned members in comparing and rendering group memberships 2022-07-18 16:00:39 -07:00
Sasha Weiss
1687152665
Rename GroupManager+SignalMessaging to GroupManager+GroupInvites 2022-07-18 15:14:51 -07:00
Sasha Weiss
3f5a224916
Add fromViewController parameter to showActionSheet 2022-07-18 15:07:19 -07:00
Evan Hahn
829370bdff Add more logging when sending badge gifts
Here's a truncated sample of what it looks like:

    [BadgeGiftingChooseBadgeViewController.swift:67 loadData()]: [Gifting] Fetching badge data...
    [BadgeGiftingChooseBadgeViewController.swift:70 loadData()]: [Gifting] Populating badge assets...
    [BadgeGiftingConfirmationViewController.swift:128 showSafetyNumberConfirmationIfNecessary()]: [Gifting] Not showing safety number confirmation sheet; it was not needed
    [BadgeGiftingConfirmationViewController.swift:168 checkRecipientAndRequestApplePay()]: [Gifting] Requesting Apple Pay...
    [BadgeGiftingConfirmationViewController.swift:128 showSafetyNumberConfirmationIfNecessary()]: [Gifting] Not showing safety number confirmation sheet; it was not needed
    [SendGiftBadgeJobQueue.swift:87 addJob(_:transaction:)]: [Gifting] Adding a "send gift badge" job
    [SendGiftBadgeJobQueue.swift:226 run()]: [Gifting] Ensuring we can still message recipient...
    [SendGiftBadgeJobQueue.swift:232 run()]: [Gifting] Confirming payment intent...
    [SendGiftBadgeJobQueue.swift:236 run()]: [Gifting] Charge succeeded! Getting receipt credential...
    [SendGiftBadgeJobQueue.swift:239 run()]: [Gifting] Enqueueing messages...
    [SendGiftBadgeJobQueue.swift:251 didSucceed()]: [Gifting] Gift sent! Finishing up...

This may be useful for debugging.
2022-07-18 17:06:02 -05:00
Sasha Weiss
5c69126ce0
Allow outgoing changes with only ban actions 2022-07-18 15:03:33 -07:00
Sasha Weiss
8ad360e71d
DRY out GroupUpdateCopy construction 2022-07-18 15:03:21 -07:00
Evan Hahn
e58c2c2455 Use new-style KVO in video player
This fixes one violation of [SwiftLint's `block_based_kvo` rule][0] in
our video player view.

I also removed a method (`playbackTimeDidChange`) for consistency.

[0]: https://realm.github.io/SwiftLint/block_based_kvo.html
2022-07-18 16:11:56 -05:00
Sasha Weiss (Signal)
9f6f4f1b5c
Remove correct request-denied-because-banned error from behind a feature flag 2022-07-18 11:18:35 -07:00
Sasha Weiss (Signal)
42e9608c73
Remove user from local group on request-to-join denied 2022-07-18 11:17:58 -07:00
Nora Trapp
e6c74abe0f "Bump build to 5.47.0.3." (nightly-07-16-2022) 2022-07-16 04:00:13 -07:00
Max Radermacher
2911f64c3a Remove impossible code path from populateAssets
We can rely on the compiler to ensure we have a `BadgeAssets` value.
2022-07-15 18:39:07 -07:00
Max Radermacher
0d002ce02d Consider duration when comparing ProfileBadges 2022-07-15 18:38:57 -07:00
Max Radermacher
250b2c68d9 Remove orphaned reference to ZXingObjC 2022-07-15 16:26:42 -07:00
Evan Hahn
486067130c Remove unused AttachmentCaptionViewController
It looks like this was removed in
7f4a5f3f7b.

`git grep -w AttachmentCaptionDelegate` and `git grep -w
AttachmentCaptionViewController` both return no results after removing
this file.
2022-07-15 17:15:53 -05:00
Max Radermacher
ab2f77a9d9
Fix theme on PhotoCollectionPickerController
If a theme update was triggered after the view was created, the view
would lose its “always in dark mode” appearance.
2022-07-15 15:12:20 -07:00
Evan Hahn
9b547d18fa Show "thanks" sheet when gifting a badge 2022-07-15 17:11:15 -05:00
Evan Hahn
4cde41d64d Add internal-only button to check database integrity 2022-07-15 17:08:44 -05:00
Nora Trapp
f199b41b4e "Bump build to 5.47.0.2." (nightly-07-15-2022) 2022-07-15 15:05:43 -07:00
Nora Trapp
c2d9787cf7 PR Feedback 2022-07-15 15:05:03 -07:00
Nora Trapp
b67069e251 Add the editing of private stories 2022-07-15 15:05:03 -07:00