diff --git a/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift b/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift index bd0a52d0e..046cc89f1 100644 --- a/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift +++ b/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift @@ -1,5 +1,5 @@ // -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. +// Copyright (c) 2019 Open Whisper Systems. All rights reserved. // import Foundation @@ -68,7 +68,8 @@ class SignalAttachmentItem: Hashable { // Try and make a ImageEditorModel. // This will only apply for valid images. - if let dataUrl: URL = attachment.dataUrl, + if ImageEditorModel.isFeatureEnabled, + let dataUrl: URL = attachment.dataUrl, dataUrl.isFileURL { let path = dataUrl.path do { diff --git a/SignalMessaging/Views/ImageEditor/ImageEditorModel.swift b/SignalMessaging/Views/ImageEditor/ImageEditorModel.swift index 94c20d3dc..ba5b6b280 100644 --- a/SignalMessaging/Views/ImageEditor/ImageEditorModel.swift +++ b/SignalMessaging/Views/ImageEditor/ImageEditorModel.swift @@ -1,5 +1,5 @@ // -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. +// Copyright (c) 2019 Open Whisper Systems. All rights reserved. // import UIKit @@ -354,6 +354,12 @@ public protocol ImageEditorModelDelegate: class { @objc public class ImageEditorModel: NSObject { + + @objc + public static var isFeatureEnabled: Bool { + return _isDebugAssertConfiguration() + } + @objc public weak var delegate: ImageEditorModelDelegate?