Compare commits

..

No commits in common. "b4693252bed55e5c6fab0aaf4daad6915f9c5f68" and "d96ec2a73297378268777305fa120db2f0dd8cf8" have entirely different histories.

3 changed files with 11 additions and 15 deletions

View File

@ -293,7 +293,7 @@ class GalleryItemViewController: UIViewController {
setNeedsUpdateOfHomeIndicatorAutoHidden() setNeedsUpdateOfHomeIndicatorAutoHidden()
} }
func updateZoomScale(resetZoom: Bool) { private func updateZoomScale(resetZoom: Bool) {
guard scrollAndZoomEnabled else { guard scrollAndZoomEnabled else {
scrollView.maximumZoomScale = 1 scrollView.maximumZoomScale = 1
scrollView.minimumZoomScale = 1 scrollView.minimumZoomScale = 1

View File

@ -38,12 +38,7 @@ class GalleryPresentationAnimationController: NSObject, UIViewControllerAnimated
} }
let container = transitionContext.containerView let container = transitionContext.containerView
to.view.frame = container.bounds itemViewController.view.layoutIfNeeded()
container.addSubview(to.view)
container.layoutIfNeeded()
// Make sure the zoom scale is updated before getting the content view frame, since it needs to take into account the correct transform.
itemViewController.updateZoomScale(resetZoom: true)
let sourceFrameInContainer = container.convert(sourceView.bounds, from: sourceView) let sourceFrameInContainer = container.convert(sourceView.bounds, from: sourceView)
let destFrameInContainer = container.convert(itemViewController.content.view.bounds, from: itemViewController.content.view) let destFrameInContainer = container.convert(itemViewController.content.view.bounds, from: itemViewController.content.view)
@ -72,8 +67,9 @@ class GalleryPresentationAnimationController: NSObject, UIViewControllerAnimated
dimmingView.frame = container.bounds dimmingView.frame = container.bounds
dimmingView.layer.opacity = 0 dimmingView.layer.opacity = 0
container.insertSubview(content.view, belowSubview: to.view) container.addSubview(dimmingView)
container.insertSubview(dimmingView, belowSubview: content.view) container.addSubview(content.view)
container.addSubview(to.view)
to.view.backgroundColor = nil to.view.backgroundColor = nil
to.view.layer.opacity = 0 to.view.layer.opacity = 0

View File

@ -123,14 +123,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
event.context?.removeValue(forKey: "culture") event.context?.removeValue(forKey: "culture")
return Preferences.shared.reportErrorsAutomatically ? event : nil return Preferences.shared.reportErrorsAutomatically ? event : nil
} }
}
if let clazz = NSClassFromString("SentryInstallation"), if let clazz = NSClassFromString("SentryInstallation"),
let objClazz = clazz as AnyObject as? NSObject, let objClazz = clazz as AnyObject as? NSObject,
let id = objClazz.perform(Selector(("idWithCacheDirectoryPath:")), with: options.cacheDirectoryPath).takeUnretainedValue() as? String { let id = objClazz.value(forKey: "id") as? String {
logger.info("Initialized Sentry with installation/user ID: \(id, privacy: .public)") logger.info("Initialized Sentry with installation/user ID: \(id, privacy: .public)")
} }
} }
}
#endif #endif
override func buildMenu(with builder: UIMenuBuilder) { override func buildMenu(with builder: UIMenuBuilder) {