Add upper bound on body media size.

pull/1/head
Matthew Chen 6 years ago
parent 4827de5d88
commit 6a132a065e

@ -988,6 +988,8 @@ const UIDataDetectorTypes kOWSAllowedDataDetectorTypes
OWSAssertDebug(self.conversationStyle);
OWSAssertDebug(self.conversationStyle.maxMessageWidth > 0);
// This upper bound should have no effect in portrait orientation.
// It limits body media size in landscape.
const CGFloat kMaxBodyMediaSize = 350;
CGFloat maxMessageWidth = MIN(kMaxBodyMediaSize, self.conversationStyle.maxMessageWidth);
if (!self.hasFullWidthMediaView) {

Loading…
Cancel
Save