RoomDataSource: Add a property to show or hide timestamp when selecting an event.

This commit is contained in:
SBiOSoftWhare
2019-05-15 21:44:07 +02:00
parent 31828b7013
commit 8e03ebb56d
2 changed files with 11 additions and 1 deletions
@@ -58,6 +58,8 @@
self.markTimelineInitialEvent = NO;
self.showBubbleDateTimeOnSelection = YES;
// Observe user interface theme change.
kThemeServiceDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kThemeServiceDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
@@ -445,7 +447,7 @@
NSInteger selectedComponentIndex = cellData.selectedComponentIndex;
if (selectedComponentIndex != NSNotFound)
{
[bubbleCell selectComponent:cellData.selectedComponentIndex];
[bubbleCell selectComponent:cellData.selectedComponentIndex showEditButton:NO showTimestamp:cellData.showTimestampForSelectedComponent];
}
else
{
@@ -492,11 +494,14 @@
{
RoomBubbleCellData *cellData = [self cellDataOfEventWithEventId:_selectedEventId];
cellData.selectedEventId = nil;
cellData.showTimestampForSelectedComponent = NO;
}
if (selectedEventId.length)
{
RoomBubbleCellData *cellData = [self cellDataOfEventWithEventId:selectedEventId];
cellData.showTimestampForSelectedComponent = self.showBubbleDateTimeOnSelection;
if (cellData.collapsed && cellData.nextCollapsableCellData)
{