mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 07:27:42 +02:00
Chat screen: Display date at the beginning of each pagination.
This commit is contained in:
@@ -57,9 +57,16 @@
|
||||
{
|
||||
showBubbleDateTimeFlag = self.bubbleData.showBubbleDateTime;
|
||||
|
||||
// TODO handle here pagination display per day
|
||||
|
||||
// TODO handle here timestamp display
|
||||
// Check whether a new pagination start at this bubble
|
||||
if (self.bubbleData.isPaginationFirstBubble)
|
||||
{
|
||||
self.paginationTitleViewHeightConstraint.constant = 20;
|
||||
self.paginationLabel.text = [self.bubbleData.eventFormatter dateStringFromDate:self.bubbleData.date withTime:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.paginationTitleViewHeightConstraint.constant = 0;
|
||||
}
|
||||
|
||||
// TODO handle here unsent
|
||||
|
||||
@@ -91,4 +98,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth
|
||||
{
|
||||
CGFloat rowHeight = [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
|
||||
MXKRoomBubbleCellData *bubbleData = (MXKRoomBubbleCellData*)cellData;
|
||||
|
||||
// Check whether a new pagination start at this bubble
|
||||
// The pagination label is displayed with the first bubble of the pagination
|
||||
if (bubbleData.isPaginationFirstBubble)
|
||||
{
|
||||
rowHeight += 20;
|
||||
}
|
||||
|
||||
return rowHeight;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user