Compare commits

...

2 Commits

3 changed files with 15 additions and 11 deletions

View File

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

View File

@ -38,7 +38,12 @@ class GalleryPresentationAnimationController: NSObject, UIViewControllerAnimated
}
let container = transitionContext.containerView
itemViewController.view.layoutIfNeeded()
to.view.frame = container.bounds
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 destFrameInContainer = container.convert(itemViewController.content.view.bounds, from: itemViewController.content.view)
@ -67,9 +72,8 @@ class GalleryPresentationAnimationController: NSObject, UIViewControllerAnimated
dimmingView.frame = container.bounds
dimmingView.layer.opacity = 0
container.addSubview(dimmingView)
container.addSubview(content.view)
container.addSubview(to.view)
container.insertSubview(content.view, belowSubview: to.view)
container.insertSubview(dimmingView, belowSubview: content.view)
to.view.backgroundColor = nil
to.view.layer.opacity = 0

View File

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