From 89c5f93aaddf58d4e1c994a5d2a6f196bd7aa567 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 27 Apr 2017 08:57:16 -0400 Subject: [PATCH] Tweak appearance of "export with Signal" UI. // FREEBIE --- Signal/src/ViewControllers/SendExternalFileViewController.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Signal/src/ViewControllers/SendExternalFileViewController.m b/Signal/src/ViewControllers/SendExternalFileViewController.m index 501f83ace..d075d89cf 100644 --- a/Signal/src/ViewControllers/SendExternalFileViewController.m +++ b/Signal/src/ViewControllers/SendExternalFileViewController.m @@ -119,10 +119,14 @@ NS_ASSUME_NONNULL_BEGIN - (NSString *)formattedFileName { + // AppDelegate already verifies that this attachment has a valid filename. + // + // TODO: If we reuse this VC, for example to offer a "forward attachment to other thread", + // feature, this assumption would no longer apply. OWSAssert(self.attachment) NSString *filename = [self.attachment.filename stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; OWSAssert(filename.length > 0); - const NSUInteger kMaxFilenameLength = 50; + const NSUInteger kMaxFilenameLength = 20; if (filename.length > kMaxFilenameLength) { // Truncate the filename if necessary. //