From 279b2dada875cd9f651158131ff19086576e88b8 Mon Sep 17 00:00:00 2001 From: Nora Trapp Date: Wed, 4 Aug 2021 11:52:10 -0700 Subject: [PATCH] Limit the share extension to level one quality --- .../AttachmentApproval/AttachmentApprovalViewController.swift | 2 +- SignalServiceKit/src/Util/ImageQuality.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentApprovalViewController.swift b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentApprovalViewController.swift index 2f088b290c..4dd5cafd8d 100644 --- a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentApprovalViewController.swift +++ b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentApprovalViewController.swift @@ -76,7 +76,7 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC options.insert(.canToggleViewOnce) } - if ImageQualityLevel.max != .standard && attachmentApprovalItemCollection.attachmentApprovalItems.filter({ $0.attachment.isValidImage }).count > 0 { + if ImageQualityLevel.max == .high && attachmentApprovalItemCollection.attachmentApprovalItems.filter({ $0.attachment.isValidImage }).count > 0 { options.insert(.canChangeQualityLevel) } diff --git a/SignalServiceKit/src/Util/ImageQuality.swift b/SignalServiceKit/src/Util/ImageQuality.swift index 87b83badcf..cdde929254 100644 --- a/SignalServiceKit/src/Util/ImageQuality.swift +++ b/SignalServiceKit/src/Util/ImageQuality.swift @@ -47,7 +47,7 @@ public enum ImageQualityLevel: UInt { // Outside of the main app (like in the share extension) // we have very tight memory restrictions, and cannot // allow sending high quality media. - return .standard + return .one } }