Chat: Bug Fix event timestamp is not aligned when username is hidden.

This commit is contained in:
giomfo
2016-01-21 17:57:02 +01:00
parent 660912c170
commit 3cc5487655
23 changed files with 659 additions and 85 deletions
@@ -28,26 +28,4 @@
self.userNameLabel.textColor = VECTOR_TEXT_BLACK_COLOR;
}
- (void)render:(MXKCellData *)cellData
{
[super render:cellData];
if (self.userNameLabel.isHidden)
{
// Adjust the top constraint of the message text view (This constraint is restored at the end of cell use see [didEndDisplay]).
self.msgTextViewTopConstraint.constant -= self.userNameLabel.frame.size.height;
}
}
- (void)didEndDisplay
{
// Restore the top constraint of the message text view if it has been modified during rendering
if (self.userNameLabel.isHidden)
{
self.msgTextViewTopConstraint.constant += self.userNameLabel.frame.size.height;
}
[super didEndDisplay];
}
@end