diff --git a/Monal/Classes/ZoomableContainer.swift b/Monal/Classes/ZoomableContainer.swift index 64d9e40e2..455941423 100644 --- a/Monal/Classes/ZoomableContainer.swift +++ b/Monal/Classes/ZoomableContainer.swift @@ -87,11 +87,12 @@ struct ZoomableContainer: View { uiView.setZoomScale(currentScale, animated: true) } else if tapLocation != .zero { // Scale in to a specific point uiView.zoom(to: zoomRect(for: uiView, scale: uiView.maximumZoomScale, center: tapLocation), animated: true) - // Reset the location to prevent scaling to it in case of a negative scale (manual pinch) - // Use the main thread to prevent unexpected behavior - DispatchQueue.main.async { tapLocation = .zero } } + // Reset the location to prevent scaling to it in case of a negative scale (manual pinch) + // Use the main thread to prevent unexpected behavior + DispatchQueue.main.async { tapLocation = .zero } + assert(context.coordinator.hostingController.view.superview == uiView) }