mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
RoomDataSource: Add a property to show or hide timestamp when selecting an event.
This commit is contained in:
@@ -34,6 +34,11 @@
|
||||
*/
|
||||
@property(nonatomic) BOOL markTimelineInitialEvent;
|
||||
|
||||
/**
|
||||
Tell whether timestamp should be displayed on event selection. Default is YES.
|
||||
*/
|
||||
@property(nonatomic) BOOL showBubbleDateTimeOnSelection;
|
||||
|
||||
/**
|
||||
Check if there is an active jitsi widget in the room and return it.
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user