mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Pinned Events Timeline actions and differentiation (#3182)
This commit is contained in:
@@ -25,6 +25,7 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
private let timelineItemFactory: RoomTimelineItemFactoryProtocol
|
||||
private let appSettings: AppSettings
|
||||
private let serialDispatchQueue: DispatchQueue
|
||||
private let shouldHideStart: Bool
|
||||
|
||||
let callbacks = PassthroughSubject<RoomTimelineControllerCallback, Never>()
|
||||
|
||||
@@ -44,12 +45,14 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
init(roomProxy: JoinedRoomProxyProtocol,
|
||||
timelineProxy: TimelineProxyProtocol,
|
||||
initialFocussedEventID: String?,
|
||||
shouldHideStart: Bool,
|
||||
timelineItemFactory: RoomTimelineItemFactoryProtocol,
|
||||
appSettings: AppSettings) {
|
||||
self.roomProxy = roomProxy
|
||||
liveTimelineProvider = timelineProxy.timelineProvider
|
||||
self.timelineItemFactory = timelineItemFactory
|
||||
self.appSettings = appSettings
|
||||
self.shouldHideStart = shouldHideStart
|
||||
serialDispatchQueue = DispatchQueue(label: "io.element.elementx.roomtimelineprovider", qos: .utility)
|
||||
|
||||
activeTimeline = timelineProxy
|
||||
@@ -364,7 +367,7 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
// Check if we need to add anything to the top of the timeline.
|
||||
switch paginationState.backward {
|
||||
case .timelineEndReached:
|
||||
if !roomProxy.isEncryptedOneToOneRoom {
|
||||
if !shouldHideStart, !roomProxy.isEncryptedOneToOneRoom {
|
||||
let timelineStart = TimelineStartRoomTimelineItem(name: roomProxy.name)
|
||||
newTimelineItems.insert(timelineStart, at: 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user