Chat screen: Timestamp and message edition display.

We unify here the design across iOS and Android:
- The messages is over the full width.
- The time stamp is at the user name level.
- If several messages are sent in a row, clicking on a message (not the first one) will make it move slightly down to display the timestamp just above.
- On the right side of the timestamp we would have an "Edit" icon.
This commit is contained in:
giomfo
2016-03-09 18:29:39 +01:00
parent d75f564a6f
commit 507abb294d
25 changed files with 387 additions and 490 deletions
+7 -43
View File
@@ -623,36 +623,11 @@
else if (tappedEvent)
{
// Highlight this event in displayed message
// Update display of the visible table cell view
NSArray* cellArray = self.bubblesTableView.visibleCells;
// Blur all table cells, except the tapped one
for (MXKRoomBubbleTableViewCell *tableViewCell in cellArray)
{
tableViewCell.blurred = YES;
}
MXKRoomBubbleTableViewCell *roomBubbleTableViewCell = (MXKRoomBubbleTableViewCell *)cell;
roomBubbleTableViewCell.blurred = NO;
// Compute the component index if tapped event is provided
for (NSUInteger componentIndex = 0; componentIndex < roomBubbleTableViewCell.bubbleData.bubbleComponents.count; componentIndex++)
{
MXKRoomBubbleComponent *component = roomBubbleTableViewCell.bubbleData.bubbleComponents[componentIndex];
if ([component.event.eventId isEqualToString:tappedEvent.eventId])
{
// Report the selected event id in data source to keep this event selected in case of table reload.
if (customizedRoomDataSource)
{
customizedRoomDataSource.selectedEventId = tappedEvent.eventId;
}
[roomBubbleTableViewCell selectComponent:componentIndex];
break;
}
}
customizedRoomDataSource.selectedEventId = tappedEvent.eventId;
}
// Force table refresh
[self dataSource:self.roomDataSource didCellChange:nil];
}
else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellTapOnOverlayContainer])
{
@@ -945,21 +920,10 @@
self.currentAlert = nil;
}
// Cancel the current selection
NSArray* cellArray = self.bubblesTableView.visibleCells;
for (MXKRoomBubbleTableViewCell *tableViewCell in cellArray)
{
if (tableViewCell.blurred)
{
tableViewCell.blurred = NO;
}
else
{
[tableViewCell unselectComponent];
}
}
customizedRoomDataSource.selectedEventId = nil;
// Force table refresh
[self dataSource:self.roomDataSource didCellChange:nil];
}
#pragma mark - Segues