mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 21:26:57 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user