From 6fb5990faa0d8662eaeb61392d63c04114213696 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 12 Dec 2017 13:03:53 -0500 Subject: [PATCH] Don't zoom for audio/generic attachments // FREEBIE --- .../attachments/AttachmentApprovalViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SignalMessaging/attachments/AttachmentApprovalViewController.swift b/SignalMessaging/attachments/AttachmentApprovalViewController.swift index dcdf58e0b..7b68cc40c 100644 --- a/SignalMessaging/attachments/AttachmentApprovalViewController.swift +++ b/SignalMessaging/attachments/AttachmentApprovalViewController.swift @@ -236,7 +236,12 @@ public class AttachmentApprovalViewController: OWSViewController { extension AttachmentApprovalViewController: UIScrollViewDelegate { public func viewForZooming(in scrollView: UIScrollView) -> UIView? { - return mediaMessageView + if attachment.isImage || attachment.isVideo { + return mediaMessageView + } else { + // don't zoom for audio or generic attachments. + return nil + } } fileprivate func updateMinZoomScaleForSize(_ size: CGSize) {