Skip to content

Commit

Permalink
Merge 03bff91 into fff4a70
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin authored Aug 16, 2024
2 parents fff4a70 + 03bff91 commit f34f2d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Proper redact SR during animation (#4289)

## 8.34.0

### Features
Expand Down
6 changes: 3 additions & 3 deletions Sources/Swift/Tools/UIRedactBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class UIRedactBuilder {
var redactingRegions = [RedactRegion]()

self.mapRedactRegion(fromView: view,
to: view,
to: view.layer.presentation() ?? view.layer,
redacting: &redactingRegions,
area: view.frame,
redactText: options?.redactAllText ?? true,
Expand Down Expand Up @@ -141,8 +141,8 @@ class UIRedactBuilder {
return image.imageAsset?.value(forKey: "_containingBundle") == nil
}

private func mapRedactRegion(fromView view: UIView, to: UIView, redacting: inout [RedactRegion], area: CGRect, redactText: Bool, redactImage: Bool) {
let rectInWindow = view.convert(view.bounds, to: to)
private func mapRedactRegion(fromView view: UIView, to: CALayer, redacting: inout [RedactRegion], area: CGRect, redactText: Bool, redactImage: Bool) {
let rectInWindow = (view.layer.presentation() ?? view.layer).convert(view.bounds, to: to)
guard (redactImage || redactText) && area.intersects(rectInWindow) && !view.isHidden && view.alpha != 0 else { return }

let ignore = shouldIgnore(view: view)
Expand Down

0 comments on commit f34f2d3

Please sign in to comment.