|
|
@ -988,7 +988,10 @@ const UIDataDetectorTypes kOWSAllowedDataDetectorTypes
|
|
|
|
OWSAssertDebug(self.conversationStyle);
|
|
|
|
OWSAssertDebug(self.conversationStyle);
|
|
|
|
OWSAssertDebug(self.conversationStyle.maxMessageWidth > 0);
|
|
|
|
OWSAssertDebug(self.conversationStyle.maxMessageWidth > 0);
|
|
|
|
|
|
|
|
|
|
|
|
CGFloat maxMessageWidth = self.conversationStyle.maxMessageWidth;
|
|
|
|
// 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) {
|
|
|
|
if (!self.hasFullWidthMediaView) {
|
|
|
|
CGFloat hMargins = self.conversationStyle.textInsetHorizontal * 2;
|
|
|
|
CGFloat hMargins = self.conversationStyle.textInsetHorizontal * 2;
|
|
|
|
maxMessageWidth -= hMargins;
|
|
|
|
maxMessageWidth -= hMargins;
|
|
|
|