From 997665a902adf24b956f61fbd693facd5ff68710 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 26 Oct 2017 14:40:29 -0400 Subject: [PATCH] Hide MIME types in production builds. // FREEBIE --- .../ViewControllers/MessageDetailViewController.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Signal/src/ViewControllers/MessageDetailViewController.swift b/Signal/src/ViewControllers/MessageDetailViewController.swift index c4b69eac5..440621428 100644 --- a/Signal/src/ViewControllers/MessageDetailViewController.swift +++ b/Signal/src/ViewControllers/MessageDetailViewController.swift @@ -428,10 +428,13 @@ class MessageDetailViewController: OWSViewController, UIScrollViewDelegate { var rows = [UIView]() if let attachment = self.attachment { - let contentType = attachment.contentType - rows.append(valueRow(name: NSLocalizedString("MESSAGE_METADATA_VIEW_ATTACHMENT_MIME_TYPE", - comment: "Label for the MIME type of attachments in the 'message metadata' view."), - value: contentType)) + // Only show MIME types in DEBUG builds. + if _isDebugAssertConfiguration() { + let contentType = attachment.contentType + rows.append(valueRow(name: NSLocalizedString("MESSAGE_METADATA_VIEW_ATTACHMENT_MIME_TYPE", + comment: "Label for the MIME type of attachments in the 'message metadata' view."), + value: contentType)) + } if let sourceFilename = attachment.sourceFilename { rows.append(valueRow(name: NSLocalizedString("MESSAGE_METADATA_VIEW_SOURCE_FILENAME",