Fix a couple small bugs in the typing indicators.

This commit is contained in:
Matthew Chen 2018-11-06 17:21:24 -05:00
parent 3f135e9f73
commit cdfd2779a3
2 changed files with 8 additions and 4 deletions

View File

@ -125,11 +125,11 @@ public class TypingIndicatorCell: ConversationViewCell {
let bubbleSize = CGSizeAdd(insetsSize, typingIndicatorSize)
if shouldShowAvatar() {
let avatarSize = CGSize(width: kAvatarSize, height: kAvatarSize)
return CGSizeCeil(CGSize(width: avatarSize.width + kAvatarHSpacing + bubbleSize.width,
height: max(avatarSize.height, bubbleSize.height)))
return CGSizeCeil(CGSize(width: kAvatarSize + kAvatarHSpacing + bubbleSize.width,
height: max(kAvatarSize, bubbleSize.height)))
} else {
return bubbleSize
return CGSizeCeil(CGSize(width: bubbleSize.width,
height: max(kAvatarSize, bubbleSize.height)))
}
}

View File

@ -663,6 +663,10 @@ NS_ASSUME_NONNULL_BEGIN
OWSFailDebug(@"Missing typingMessage.");
return;
}
if (typingMessage.timestamp != envelope.timestamp) {
OWSFailDebug(@"typingMessage has invalid timestamp.");
return;
}
TSThread *_Nullable thread;
if (typingMessage.hasGroupID) {