mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
pr suggestions
This commit is contained in:
@@ -480,11 +480,12 @@ class TimelineController: TimelineControllerProtocol {
|
||||
case .readMarker:
|
||||
return ReadMarkerRoomTimelineItem(id: .virtual(uniqueID: uniqueID))
|
||||
case .timelineStart:
|
||||
if hasPredecessor {
|
||||
// We always display the timeline start item, if there is a predecessor room.
|
||||
guard !hasPredecessor else {
|
||||
return TimelineStartRoomTimelineItem(name: roomDisplayName)
|
||||
} else {
|
||||
return isDM ? nil : TimelineStartRoomTimelineItem(name: roomDisplayName)
|
||||
}
|
||||
// If not we only display the timeline start item if this is not a DM.
|
||||
return isDM ? nil : TimelineStartRoomTimelineItem(name: roomDisplayName)
|
||||
}
|
||||
case .unknown:
|
||||
return nil
|
||||
|
||||
+1
@@ -8,6 +8,7 @@
|
||||
import Foundation
|
||||
|
||||
struct TimelineStartRoomTimelineItem: DecorationTimelineItemProtocol, Equatable {
|
||||
// Using a static identifier makes the animations consistent in SwiftUI
|
||||
let id: TimelineItemIdentifier = .virtual(uniqueID: .init("TimelineStart"))
|
||||
let name: String?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user